CN-122017188-A - Temperature compensation method and device for soil moisture sensor
Abstract
The embodiment of the invention relates to the technical field of environmental monitoring of the agricultural Internet of things, and provides a temperature compensation method and a temperature compensation device of a soil moisture sensor, wherein first historical soil humidity data and first historical soil temperature data which are acquired by a target soil moisture sensor to be subjected to temperature compensation are acquired, and the first historical soil humidity data and the first historical soil temperature data are synchronously acquired within a first preset time period before the current moment; the method comprises the steps of acquiring current soil humidity data acquired at the current moment by a target soil moisture sensor, inputting the first historical soil humidity data, the first historical soil temperature data and the current soil humidity data into a temperature correction model, and carrying out temperature compensation processing on the current soil humidity data through the temperature correction model to obtain temperature corrected target soil humidity data. The soil moisture measurement accuracy is improved, and the operation and maintenance cost is reduced.
Inventors
- ZHANG SHIRUI
- LI TENG
- ZHANG XIN
- SHI KAILI
- Yue Shaowei
- DUAN JIANGFENG
Assignees
- 北京市农林科学院智能装备技术研究中心
Dates
- Publication Date
- 20260512
- Application Date
- 20251222
Claims (10)
- 1. A method for temperature compensation of a soil moisture sensor, comprising: acquiring first historical soil humidity data and first historical soil temperature data acquired by a target soil moisture sensor to be subjected to temperature compensation, wherein the first historical soil humidity data and the first historical soil temperature data are synchronously acquired data in a first preset time period before the current moment; acquiring current soil humidity data acquired by the target soil moisture sensor at the current moment; Inputting the first historical soil humidity data, the first historical soil temperature data and the current soil humidity data into a temperature correction model, and performing temperature compensation processing on the current soil humidity data through the temperature correction model to obtain temperature corrected target soil humidity data; the temperature correction model is obtained through training the following steps: acquiring second historical soil humidity data and second historical soil temperature data which are recorded by a sample soil moisture sensor and have the same time stamp; And training the initial model through the second historical soil humidity data and the second historical soil temperature data, and determining that model training is completed when the training result meets the multidimensional standard to obtain a temperature correction model.
- 2. The method of claim 1, wherein training the initial model with the second historical soil moisture data and second historical soil temperature data comprises: Dividing the second historical soil humidity data and the second historical soil temperature data with the same time stamp into a plurality of training samples according to a fixed time window, wherein each training sample comprises a second historical soil temperature and humidity data pair synchronously recorded hour by hour in a continuous time period, and obtaining a time sequence dependent training data set; Constructing an initial model based on a time sequence decomposition method; Taking second historical soil temperature data and corresponding time sequence derivative characteristics in the training data set as input variables, taking the second historical soil humidity data as a target to be corrected, and learning a nonlinear mapping relation between a temperature interference component and soil humidity measurement deviation through the initial model; and training the initial model by iteratively optimizing an objective function of the initial model.
- 3. The method of claim 2, wherein determining that model training is complete when the training results meet the multidimensional criteria results in a temperature correction model, comprising: and when the objective function converges and meets a preset multidimensional standard, obtaining a trained temperature correction model, wherein the objective function comprises a plurality of antagonism constraint terms, and the multidimensional standard comprises evaluation standards of a plurality of model output results.
- 4. The method of claim 1, wherein obtaining the second historical soil moisture data and the second historical soil temperature data recorded by the sample soil moisture sensor having the same time stamp comprises: Acquiring historical time sequence data recorded by a sample soil moisture sensor in at least one complete rainfall period, wherein the historical time sequence data comprises a historical soil humidity data sequence and a historical soil temperature data sequence which are synchronously acquired; identifying and removing mutation data segments caused by external factors in the historical soil humidity data sequence through a data screening model, and retaining effective data segments with natural slow-change trend of soil humidity, wherein the external factors comprise rainfall and/or irrigation; And determining second historical soil humidity data and second historical soil temperature data with the same time stamp based on the valid data segment.
- 5. The method according to claim 4, wherein identifying and removing the abrupt change data segment caused by the external factor in the historical soil humidity data sequence through the data screening model, and retaining the valid data segment with the natural gradual change trend of the soil humidity, comprises: dividing the historical soil humidity data sequence according to a first time scale and a second time scale, and respectively inputting a first bidirectional gating circulation unit network and a second bidirectional gating circulation unit network which run in parallel, wherein the first time scale is smaller than the second time scale; gaussian weighted combination is carried out on the prediction output results of the first bidirectional gating circulating unit network and the second bidirectional gating circulating unit network to obtain a combined prediction value; when the error of the combined predicted value and the actual measured value at a certain moment is larger than or equal to an error threshold value, determining that the historical soil humidity data at the moment is external factor interference data, removing the data, and reserving an effective data segment of which the soil humidity is in a natural gradual change trend.
- 6. The method according to any one of claims 1-5, further comprising: And after the target soil moisture sensor acquires the latest data in a period of time, performing parameter fine adjustment on the temperature correction model by utilizing the latest data.
- 7. A temperature compensation device for a soil moisture sensor, comprising: The data acquisition module is used for acquiring first historical soil humidity data and first historical soil temperature data acquired by a target soil moisture sensor to be subjected to temperature compensation, wherein the first historical soil humidity data and the first historical soil temperature data are synchronously acquired data in a first preset time period before the current moment; The data acquisition module is used for acquiring current soil humidity data acquired by the target soil moisture sensor at the current moment; The data correction module is used for inputting the first historical soil humidity data, the first historical soil temperature data and the current soil humidity data into a temperature correction model, and performing temperature compensation processing on the current soil humidity data through the temperature correction model to obtain target soil humidity data after temperature correction; the model training module is used for acquiring second historical soil humidity data and second historical soil temperature data which are recorded by the sample soil moisture sensor and have the same time stamp, training the initial model through the second historical soil humidity data and the second historical soil temperature data, and determining that model training is completed when a training result meets a multidimensional standard to obtain a temperature correction model.
- 8. An electronic device comprising a memory, a processor and a computer program stored on the memory and running on the processor, characterized in that the processor implements the method of temperature compensation of a soil moisture sensor according to any one of claims 1 to 6 when executing the computer program.
- 9. A non-transitory computer readable storage medium having stored thereon a computer program, wherein the computer program when executed by a processor implements the temperature compensation method of a soil moisture sensor according to any one of claims 1 to 6.
- 10. A computer program product comprising a computer program, characterized in that the computer program, when executed by a processor, implements a method of temperature compensation of a soil moisture sensor according to any one of claims 1 to 6.
Description
Temperature compensation method and device for soil moisture sensor Technical Field The invention relates to the technical field of environmental monitoring of the agricultural Internet of things, in particular to a temperature compensation method and device of a soil moisture sensor. Background In the global climate warming background, the frequency and intensity of drought occurrence are in an increasing trend, and the water resource deficiency, grain crisis, ecological deterioration (such as desertification) and the like caused by drought disasters directly threaten the grain safety and the socioeconomic development. By implementing effective soil moisture content monitoring, drought occurrence is mastered in time, and regional water resource scheduling is advanced in real time, so that drought occurrence can be effectively prevented, scientific irrigation can be implemented according to soil moisture changes, and the influence of drought on agricultural production is reduced. The soil moisture content automatic monitoring technology has gradually replaced the traditional soil moisture content monitoring mode of manual sampling due to the advantages of high measurement timeliness, less labor consumption, capability of obtaining continuous data and the like, and becomes a main development direction. The soil moisture measurement method includes tensiometry, neutron method, dielectric method, etc. Because the tensiometer method measurement results are difficult to access an informationized network, the neutron method has the problem of radiation pollution, and currently, the dielectric method becomes the most common method for measuring soil moisture. The dielectric method is to invert the soil water content by utilizing the difference of the soil dielectric constants with different water contents and utilizing the difference of electric signal conduction in the media with different dielectric constants. Common soil moisture sensors include time domain reflectometry (Time Domain Reflectometry, TDR), frequency domain reflectometry (Frequency Domain Reflectometer, FDR), standing wave Ratio (STANDING WAVE Ratio, SWR), and the like, which enable long-term in-situ monitoring of soil moisture. FDR is widely applied to soil moisture measurement due to low cost and simple circuit, and a tubular multi-section soil moisture sensor widely applied at present is designed by adopting FDR. The temperature can obviously influence the measurement result of the FDR sensor, and the core reason is that the temperature changes the dielectric property of the soil and the circuit parameters of the sensor, so that the calculated value of the water content of the soil is finally deviated. The measurement principle of the FDR sensor is that the water content is reversely pushed by emitting electromagnetic waves with specific frequency according to the reflection and absorption characteristics (namely dielectric constant) of the electromagnetic waves by the soil. The temperature is mainly influenced by the following three layers, namely 1, changing the dielectric constant of soil. The dielectric constant of the soil increases with the temperature, and the variation range of the soil (such as clay and sand) with different textures is different. This causes the sensor to erroneously determine that the change in the dielectric constant due to the temperature has changed the water content in the soil, and the phenomenon of "the higher the temperature, the higher the measured water content becomes". 2. Interfering with sensor circuit performance. The electronic components such as capacitance, resistance and the like inside the sensor are sensitive to temperature. The temperature fluctuation can cause element parameter drift, so that the frequency and the signal intensity of electromagnetic waves emitted by the sensor deviate, the signal detection precision is directly affected, and the deviation is more obvious especially in low-temperature (lower than 5 ℃) or high-temperature (higher than 35 ℃). 3. Affecting the physical and chemical state of the soil. The temperature rise can accelerate the evaporation and migration of water in the soil, change the actual water content distribution of local soil, and simultaneously can influence the dissolution and ion activities of soil salinity, and the salinity can also interfere the dielectric constant measurement, so that the indirect influence of the temperature on the result is further amplified. The performance of the influence under different scenes is different, namely, in a laboratory constant temperature environment, the temperature interference can be reduced to the minimum through calibration, but in a field natural environment, the temperature variation caused by day-night temperature difference and season alternation can lead the measurement error of the FDR sensor which is not subjected to temperature compensation to reach 5-15%, and even to exceed the normal measurement range when ser