Cherry frost early warning system and method based on Kalman filtering
By adopting Karman filtering technology in the frost warning system, combined with historical and real -time temperature data, the problems that cannot accurately predict the frost in the existing technology have been solved, and a more accurate and reliable frost warning is achieved to help farmers prevent frost disasters in advance.
Patent Information
- Application Number
- CN201911210809.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-12-02
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2039-12-02
AI Technical Summary
The prior art cannot accurately predict the frost conditions in each specific location in frost warning, especially in mountainous areas with complex terrain, making it difficult for farmers to take anti-frost measures in advance.
The cherry frost warning system based on Kalman is used. The system uses the combination of temperature collection unit, embedded controller unit and communication unit to use historical data and current temperature data to make intelligent decisions to predict the frost trend in the next two hours.
The accurate prediction of frosting trends under the condition of mutation weather provides more reliable and accurate early warning information to help farmers take a good measure of frost in advance.
Smart Images

Figure CN110796562B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a cherry frost early warning technology in the field of Internet of Things and intelligent prediction, and in particular to a cherry frost early warning system and method based on Kalman filtering, that is, an intelligent decision-making algorithm based on historical data and current fitting data is used to predict the development trend of cherry frost within the next two hours; the present invention can be used in the field of single parameter trend prediction and other crop frost early warnings. Background Art
[0002] Frost in orchards has become a limiting factor affecting yields. Currently, frost warnings are often implemented based on weather forecasts, and some large planting companies use small meteorological stations to provide real-time frost warnings, and then take preventive measures in advance based on the frost warnings.
[0003] For farmers in mountainous areas, the terrain is completely different, and the arrival of frost is closely related to the location. The occurrence of frost is related to the specific terrain height, and the weather forecast cannot accurately predict every specific location. As ordinary farmers, they do not have the financial strength to purchase a small weather station.
[0004] According to the actual needs of fruit farmers, a very convenient micro-warning device is designed. It can be powered by 6 No. 7 batteries and can work continuously for 2 months. It can send frost warnings to farmers via text messages 2 hours, 1 hour, and half an hour in advance. According to the warnings, farmers can take various prevention and control measures.
[0005] Weather forecasting and model design have always been a hot topic in industry research. The most commonly used trend forecasting methods are polynomial curve fitting and gradient trend analysis. Curve fitting has a lot of randomness for a nonlinear system. It is difficult to make accurate predictions when the weather changes drastically in a short period of time by relying solely on curve fitting. Using the gradient model, the temperature change trend can be analyzed clearly. The current temperature change combined with the gradient change can be analyzed and predicted for the future temperature change trend. However, curve fitting and gradient trend analysis do not have the ability to resist strong disturbances in extreme weather, and there are uncontrollable factors in the forecast accuracy. Summary of the invention
[0006] The purpose of the present invention is to overcome the above-mentioned shortcomings and deficiencies of the prior art and to provide a cherry frost early warning system and method based on Kalman filtering, which has obvious advantages in temperature measurement reliability control, anti-jitter of sudden weather changes, and prediction of true reliability.
[0007] The object of the present invention is achieved in that:
[0008] The formation process of frost is that the supersaturated part of water vapor condenses on the surface of crops to form white ice crystals when the temperature is 0℃. The most important determinant of frost is the temperature value. To prevent frost disasters on crops, the key is to predict the time point when the critical frost temperature will fall in advance. For the prediction of future temperature trends, on the one hand, historical temperature data has a certain authenticity and reference value; on the other hand, the trend of temperature data actually collected on the day is also highly referenceable.
[0009] Specifically:
[0010] 1. Cherry frost early warning system based on Kalman filter (referred to as the system)
[0011] The system includes a manufacturer user mobile phone and a personal user mobile phone, and is provided with a temperature acquisition unit, an embedded controller unit, a battery management unit, a historical data storage unit, and a communication unit;
[0012] Its connection and connectivity relationships are:
[0013] The temperature acquisition unit, the embedded controller unit and the communication unit are connected in sequence, the battery management unit and the historical data storage unit are connected to the embedded controller unit respectively, and the manufacturer's user mobile phone and the personal user's mobile phone are connected to the communication unit respectively.
[0014] The temperature acquisition unit is connected to the embedded controller unit to realize the acquisition of temperature information, reliability verification and input of original temperature data;
[0015] The embedded controller unit is connected to the battery management unit to achieve real-time monitoring of the battery system and low-power control of the entire system;
[0016] The embedded controller unit is connected to the historical data storage unit to realize the reading and updating of historical data;
[0017] The embedded controller unit is connected to the communication unit, and the manufacturer's user mobile phone and the personal user's mobile phone are connected to the communication unit respectively, so as to realize the remote or local configuration, trend prediction and early warning information sending of the system.
[0018] 2. Cherry frost early warning method based on Kalman filter (referred to as method)
[0019] The method comprises the following steps:
[0020] ①Signal acquisition and reliability verification
[0021] The analog and digital dual sensor structure is used to compare and verify the reliability of the system and the authenticity of the sampled values; the digital sensor has high power consumption and slow measurement speed, and is sampled once per minute as a reliability test standard; the analog sensor has low power consumption and fast speed, sampling 10 times per second;
[0022] ② Temperature smoothing filter processing
[0023] The temperature value obtained from the analog sensor has a large fluctuation due to external disturbances. A 4th-order Butterworth low-pass filter is used to set the sampling frequency to 10Hz and the cutoff frequency to 0.1Hz. The original sampled data is subjected to Butterworth low-pass filtering, and then median and mean filtering are performed. A final temperature value after smoothing filtering is obtained every minute. The smoothing effect of the temperature curve is shown in the figure below. Figure 3 ;
[0024] ③Update historical data and calculate weight coefficients
[0025] As the climate changes every year, historical data needs to be continuously iterated. According to the golden ratio principle, the original historical data accounts for 0.618, and the newly collected temperature data accounts for 0.382. The temperature information that changes every year is brought into the new historical data;
[0026] The weight coefficient is determined based on the deviation of historical data, curve fitting value and current actual temperature value. The higher the accuracy, the higher the proportion. The weight coefficients α and β are used in step ⑥.
[0027] ④ Linear fitting of the curve using the least squares method
[0028] The temperature values obtained in the first 200 minutes were used to perform least square curve fitting, and the temperature fitting value after 30 minutes was calculated using a fifth-order polynomial;
[0029] ⑤Get historical temperature change data
[0030] Assuming that the temperature at the current time point is T0, use the historical record to read the temperature value at 30 minutes, recorded as T1; obtain the temperature change value ΔT1 at 60 minutes relative to 30 minutes, the temperature change value ΔT2 at 120 minutes relative to 60 minutes, and the temperature change value ΔT3 at 150 minutes relative to 120 minutes; ΔT1, ΔT2 and ΔT3 are provided as input core parameters to the trend prediction module;
[0031] ⑥Frost trend forecast
[0032] The final frost trend prediction is the core function of the present invention. The historical data and the current measured value are brought into the Kalman filter A to obtain the predicted value Ta, and the temperature fitting value and the current measured value after 30 minutes are brought into the Kalman filter B to obtain the predicted value Tb; the calculation formula for the final predicted value Tw of the temperature after 30 minutes is:
[0033] Tw=α*Ta+β*Tb (1)
[0034] Using Tw and the three historical temperature change differences of ΔT1, ΔT2, and ΔT3 obtained in step ⑤, calculate the predicted temperature values after 1 hour and 2 hours;
[0035] Tw1H=Tw+ΔT1 (2)
[0036] Tw2H=Tw+ΔT1+ΔT2 (3)
[0037] Among them, Tw1H is the warning temperature value after 1 hour, and Tw2H is the warning temperature value after 2 hours;
[0038] Tw, Tw1H and Tw2H are compared with the big cherry flowering period frost warning threshold and the big cherry fruit setting period frost warning threshold stored in the configuration storage module 26 respectively; TF_Threshold is the flowering period frost warning temperature threshold stored in the system, and TB_Fruitsetting is the fruit setting period frost warning temperature threshold stored in the system; the specific comparison formula is as follows:
[0039] TF_Threshold - 0.5 <Tw<TF_Threshold (4)
[0040] TB_Fruitsetting-0.5 <Tw<TB_Fruitsetting (5)
[0041] ΔT1<0 (6)
[0042] If the trigger conditions (4) and (6) are met, the communication unit sends a warning message MB;
[0043] If the trigger conditions (5) and (6) are met, the communication unit sends a warning message MF;
[0044] The message body formats of MF and MB are as follows:
[0045] MB: "Frost will come in 30 minutes during the flowering period. The current temperature is YY℃, the warning setting value is ZZ℃, and the current temperature is dropping at a rate of VV℃ per minute. Please take precautions in time";
[0046] MF: "Frost will come in 30 minutes. The current temperature is YY℃, the warning setting value is ZZ℃, and the current temperature drops at a rate of VV℃ per minute. Please take precautions in time";
[0047] The 1-hour and 2-hour time point warning judgment methods are similar to those for 30 minutes. Tw1H and ΔT2 determine whether to send a frost warning after 1 hour, and Tw2H and ΔT3 determine whether to send a frost warning after 2 hours.
[0048] The present invention has the following advantages and positive effects:
[0049] ① The system adopts a Kalman filter model based on historical experience values, which provides a relatively accurate and reliable prediction algorithm for long-term frost trend warning. At present, there is no frost warning product in China with relatively good warning duration and accuracy.
[0050] ② The system adopts analog and digital dual temperature sensor probes, which solves the problem of low accuracy of the fitting valuation algorithm introduced by frequent temperature fluctuations of a single temperature sensor when the external light is bright or dim, while ensuring reliability; combined with the Butterworth low-pass filter, a very smooth temperature change trend can be obtained, on this basis, a relatively accurate fitting curve can be obtained; it is conducive to the measurement of stable temperature signals in measurement systems with strong disturbances.
[0051] ③The system is completely aimed at the specific orchard crop of sweet cherry. According to the frost disaster triggering thresholds during the flowering and fruiting periods obtained by the Sweet Cherry Engineering Research Center through years of research, an early warning system suitable for specific crops has been set up, which plays an important role in increasing the production and income of the domestic special sweet cherry planting.
[0052] ④The system is battery-powered and has a waterproof sealed box design. It has a single service life of 2 months, which fully meets the warning time requirements for the flowering and fruiting periods. The absence of expensive materials such as solar panels and lithium batteries makes the cost of the entire product very low, and it is completely suitable for use in small plantations by farmers. The operation is set through SMS, and the warning is reminded through SMS, which is convenient and quick to use.
[0053] ⑤ The system records frost warning data in the medium and long term, which can be used as a data source for studying the relationship between orchard yield and temperature and frost, providing the most authentic data for scientific research.
[0054] In summary, the present invention utilizes the historical experience Kalman filter model to solve the problem that the frost warning time is too short so that farmers have no time to take proactive anti-frost measures when they know that frost is about to occur; according to the frost change characteristics of the big cherry specialty industry, the accurate critical temperature corresponding thereto is determined, and frost warnings are given for the flowering period and the fruit setting period respectively; the present invention fully considers reducing the difficulty and cost of use while improving the warning accuracy and warning time, and can be conveniently hung on the trunks of the orchard to provide warning information; the present invention plays an important role in promoting the research on agricultural Internet of Things technology and intelligent prediction algorithms.
[0055] The present invention uses past experience data and current measured temperature data, and targets different frost detection requirements during the flowering and fruiting periods of big cherries. It uses the Kalman filter algorithm to estimate the development trend of frost disasters within the next two hours and prompt fruit farmers to take preventive measures in advance through GSM mobile phone text messages. The present invention will achieve low-cost automatic early warning of frost disasters in different regions. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Figure 1 It is the structural block diagram of this system;
[0057] Figure 2 It is the core algorithm flow chart of the present invention;
[0058] Figure 3 System warning curve chart.
[0059] Figure 1 middle:
[0060] 10—Temperature measurement unit,
[0061] 11—analog temperature acquisition module, 12—digital temperature acquisition module;
[0062] 20—Embedded Controller Unit,
[0063] 21—Reliability verification module, 22—Temperature filtering module,
[0064] 23—historical data update module, 24—linear fitting module,
[0065] 25—Trend prediction module, 26—Configuration storage module,
[0066] 27—power management module;
[0067] 30—Battery Management Unit,
[0068] 31—power conversion module, 32—low power consumption management module;
[0069] 40—historical data storage unit;
[0070] 50—communication unit,
[0071] 51—message sending module,
[0072] 52—Local Settings Module,
[0073] 53—Remote setting module;
[0074] 60—Manufacturer user’s mobile phone;
[0075] 70—Personal user mobile phone. DETAILED DESCRIPTION
[0076] The following is a detailed description with reference to the accompanying drawings and embodiments.
[0077] 1. Core Algorithm of the Invention
[0078] like Figure 2 As shown, there are two prediction branches:
[0079] P10 predicts branch A, using the temperature value T1 30 minutes after the current time point in the same period of history and the current measured temperature value T2-1, inputting A Kalman filter Fa to obtain the prediction result Ta;
[0080] P20 predicts branch B, using the sampled temperature data T2-2 of the previous 200 minutes, using the least squares method to obtain a fitting curve, and calculates the temperature value T3 after 30 minutes; the temperature value T3 obtained by fitting calculation and the current measured temperature value T2-2 are input into the B Kalman filter Fb to obtain the prediction result Tb;
[0081] Then, according to the historical data of the same period at the current time point, the temperature value of the current time point predicted 30 minutes ago, and the actual temperature value at the current time point, two proportional coefficients of the credibility of the historical data and the curve fitting data compared with the actual temperature value at the current time are obtained. The proportion of historical data is recorded as α, and the proportion of curve fitting data is recorded as β, where α+β=1; then the actual predicted temperature Tw=α*Ta+β*Tb; the values of α and β are continuously and dynamically adjusted according to the accuracy of historical data and curve fitting data in the prediction process to ensure that the standard deviation of the predicted temperature is minimized; the predicted temperature Tw after 30 minutes is obtained; due to the poor accuracy of long-term curve fitting, the change of weather within a fixed time period has a certain regularity, so the historical data is used to obtain the temperature change ΔTa between 30 minutes and 60 minutes in the historical period and the temperature change ΔTb between 30 minutes and 90 minutes, and the predicted value after 1 hour is Twa=Tw+ΔTa, and the predicted value after 2 hours is Twb=Tw+ΔTb.
[0082] The calculated Tw, Twa, and Twb are compared with the frost warning threshold during flowering and the frost prediction threshold during fruit setting, respectively. If any predicted temperature exceeds the threshold, a frost disaster warning message is sent.
[0083] The above algorithm is continuously and dynamically executed and makes fusion warning judgments, while updating the Kalman filter coefficient, the historical data prediction credibility ratio α and the curve fitting data prediction credibility ratio β, so as to obtain more accurate prediction results.
[0084] 2. System
[0085] 1. Overall
[0086] The system includes a manufacturer user mobile phone 60 and a personal user mobile phone 70, which are provided with a temperature collection unit 10,
[0087] Embedded controller unit 20, battery management unit 30, historical data storage unit 40 and communication unit 50;
[0088] Its connection and connectivity relationships are:
[0089] The temperature acquisition unit 10 , the embedded controller unit 20 and the communication unit 50 are connected in sequence, the battery management unit 30 and the historical data storage unit 40 are connected to the embedded controller unit 20 respectively, and the manufacturer user mobile phone 60 and the personal user mobile phone 70 are connected to the communication unit 50 respectively.
[0090] Working mechanism:
[0091] The temperature acquisition unit 10 is connected to the embedded controller unit 20 to realize the acquisition of temperature information, reliability verification and input of original temperature data;
[0092] The embedded controller unit 20 is connected to the battery management unit 30 to achieve real-time monitoring of the battery system and low power consumption control of the entire system;
[0093] The embedded controller unit 20 is connected to the historical data storage unit 40 to realize the reading and updating of historical data;
[0094] The embedded controller unit 20 is connected to the communication unit 50, and the manufacturer user mobile phone 60 and the personal user mobile phone 70 are respectively connected to the communication unit 50 to realize the remote or local configuration, trend prediction and early warning information sending of the system.
[0095] 2. Functional Unit
[0096] 1) Temperature measurement unit 10
[0097] like Figure 1 , the temperature measurement unit 10 is divided into an analog temperature acquisition module 11 and a digital temperature acquisition module 12;
[0098] (1) Analog temperature acquisition module 11
[0099] The analog temperature acquisition module 11 is an analog temperature sensor, which uses TI's ADS1118 16-bit analog-to-digital converter with internal reference and temperature sensor;
[0100] The analog temperature sensor has the feature of going into sleep mode immediately after a single measurement, which can greatly reduce energy consumption;
[0101] Its function is to collect external temperature analog signals and convert them into digital quantities with an accuracy of 0.25°C and send them to the embedded controller unit 20.
[0102] (2) Digital temperature acquisition module 12
[0103] The digital temperature acquisition module 12 is a digital temperature sensor, and the digital temperature sensor DS18B20 produced by Dallas Semiconductor Corporation is selected;
[0104] Its functions are: directly measuring the external temperature signal and outputting a digital value with an accuracy of 0.5°C to the embedded controller unit 20;
[0105] The digital temperature acquisition module 12 is mainly used to verify the reliability of the analog temperature acquisition module 11. Under the same conditions, if the temperature value deviates by more than 1 degree, it is considered that the system hardware has failed and the user needs to be reminded to repair it.
[0106] 2) Embedded controller unit 20
[0107] like Figure 1 The embedded controller unit 20 is a 32-bit ultra-low power microcontroller based on the Cortex-M0 core (the controller unit integrates 64KB Flash, 8KB SRAM, 2KBEEPROM, timer, ADC, UART, SPI and IIC interfaces), embedded with a reliability verification module 21, a temperature filtering module 22, a historical data update module 23, a linear fitting module 24, a trend prediction module 25, a configuration storage module 26 and a power management module 27;
[0108] The interaction is:
[0109] The analog temperature acquisition module 11 and the digital temperature acquisition module 12 interact with the reliability verification module 21 respectively;
[0110] The reliability verification module 21, the temperature filtering module 22, the linear fitting module 24, the trend prediction module 25 and the message sending module 51 interact in sequence;
[0111] The temperature filtering module 22, the historical data updating module 23, the historical data storage unit 40 and the trend prediction module 25 interact in sequence;
[0112] The local setting module 52 and the remote setting module 53 interact with the configuration storage module 26 respectively;
[0113] The power management module 27 interacts with the battery management unit 30 .
[0114] (1) Reliability verification module 21
[0115] It is a software verification method for reliability verification based on the analog temperature value and digital temperature value sent by the temperature measurement unit 10. The digital temperature acquisition module 12 is inside the box and is rarely disturbed by the outside world. The digital temperature acquisition module 12 itself has high accuracy and stability, but the measurement time is long and the power consumption is high, which is not conducive to high-speed sampling and smoothing filtering. The digital temperature acquisition module 12 is set to measure once per minute as a benchmark for reliability verification of analog measurement. The analog measurement is performed 10 times per second, and high-frequency and high-precision sampling is conducive to later filtering processing.
[0116] (2) Temperature filter module 22
[0117] It is a 4th order Butterworth low pass filter implemented by software. According to the sampling frequency 10 Hz set by the temperature measurement unit 10, the cut-off frequency is set to 0.1 Hz to obtain the temperature data after smooth filtering.
[0118] (3) Historical data update module 23
[0119] It is a weight dynamic optimization adjustment algorithm, which mainly deals with two aspects of work: 1. Calculate the weight coefficients α and β of the historical data Th and the fitting data Tf. Assuming that the current temperature measurement data is Tc, the calculation formula is The obtained α and β are used for calculation in the trend prediction module 25; 2. Last year's historical data is updated each time according to the current actual temperature change value. The update is designed according to the golden ratio principle that the historical data accounts for 0.618 and the current new measurement data accounts for 0.382. The update of the new data and the original historical data can bring the dynamic change factors of the annual climate into the historical data sequence.
[0120] (4) Linear fitting module 24
[0121] It is a least squares polynomial fitting algorithm. Based on the 200 minutes of measurement data obtained after smoothing and filtering, a 5th-order fitting polynomial is obtained. The 5th-order temperature fitting polynomial obtained in the first 200 minutes is used to calculate the temperature fitting value at 30 minutes.
[0122] (5) Trend prediction module 25
[0123] like Figure 2 The trend prediction module 25 is composed of two Kalman filter algorithms, which are mainly used for trend prediction. The frost alarm is only a measurement and warning device, and does not consider the influence of the control quantity. The historical data and the current measurement data are input into the Kalman filter to obtain the prediction data Ta, and the polynomial fitting data and the current measurement data are input into the Kalman filter to obtain the prediction data Tb, and then brought into the fusion judgment formula to finally obtain the predicted temperature value Tw after 30 minutes. The simplified Kalman filter formula is as follows:
[0124] K=P / (P+R) (7)
[0125] T0=T0+K*(T1-T0) (8)
[0126] P=PK*P+Q (9)
[0127] Among them, P is the prediction error covariance matrix, R is the measurement noise covariance matrix, Q is the system state transfer matrix, and K is the Kalman filter gain.
[0128] (6) Configuration storage module 26
[0129] It is an EEPROM storage medium integrated inside the microcontroller chip, which is specially used for storing the setting parameters of specific scenes. The storage space is 2KB in total, which can accommodate all the current optimization setting parameters. With the help of the configuration storage module, the dynamic change of the user setting parameters can be realized.
[0130] (7) Power management module 27
[0131] It includes battery charge detection circuit and hardware-based power management optimization strategy. In order to reduce power consumption, the power supply of the system peripheral chips is directly supplied by the IO pins of the ultra-low power microprocessor. When it is necessary to access external devices, the IO port is started to power the peripherals, and the peripherals that are not accessed are in a power-off state. The core work of the system is the measurement of the temperature sensor unit and the execution of the trend prediction algorithm. According to the set sampling interval, the device is started every 100ms to complete the sampling work, and then it enters the sleep state to reduce power consumption. When the battery charge is measured through the voltage divider resistor, the power consumption of the sampling resistor is relatively high. Two MOS tubes are used in the system design. When measuring the battery voltage, the MOS tube is turned on so that the current passes through the sampling resistor, and the battery charge is measured using AD. When the battery voltage is not measured, the MOS tube is turned off so that the current consumption of the sampling resistor is 0.
[0132] The working mechanism of the embedded controller unit 20 is:
[0133] After the two-way temperature information obtained by the temperature measurement unit 10 is input, the reliability verification module 21 first performs reliability analysis and redundancy calculation on it to prevent measurement errors caused by short circuit or open circuit of external devices. If the measured data is wrong, the subsequent information processing flow will not be executed, and the information will be directly pushed to prompt the user that the device is abnormal; the data that passes the reliability analysis is sent to the temperature filtering module 22 by the reliability verification module 21 for filtering and smoothing to prevent the sensor from being affected by external factors. The data processed by the temperature filtering module 22 is sent to the historical data updating module 23 in one way to update and correct the historical data and calculate the credibility proportional factor, and the other way is sent to the linear fitting module 24 for polynomial curve fitting, and the polynomial fitting result is used to calculate the temperature change trend after 30 minutes; the trend prediction module 25 reads the historical data, the calculated data obtained by linear fitting, and the credibility proportional factor generated by the historical data updating module 41, and uses the trend prediction module 25 to The temperature change trend is intelligently calculated to obtain frost forecast information within the next 2 hours. If the frost triggering conditions of the flowering period and the fruit setting period are met, the information is sent to the communication unit 50, and the corresponding information is pushed to the user by the message sending module 51; the configuration storage module 26 is mainly used for global parameter storage, including the optimization parameters of the temperature filtering module 22, the coefficients of the trend prediction module 25, the result parameters of the linear fitting module 24, the weight coefficients of the historical data update module 23, and the trigger alarm thresholds of the flowering period and the fruit setting period are all stored in the configuration storage module 26, which is used for the system to dynamically adjust various parameters in real time. The configuration storage module 26 mainly communicates with the communication unit 50 to receive various configuration commands for transmission; the power management module 27 is mainly used for ultra-low power consumption management and battery power detection inside the unit. The low power management module 32 of the battery management unit 30 is used to control the energy consumption of the communication unit 50. The communication unit 50 is completely in power-off mode in normal working state, with the lowest energy consumption.
[0134] 3) Battery Management Unit 30
[0135] like Figure 1 The battery management unit 30 is a hardware design circuit, which is divided into a power conversion module 31 and a low power consumption management module 32 according to hardware functions.
[0136] (1) Power conversion module 31
[0137] It is an LDO power conversion circuit, designed with Infineon TLE4476 chip. This chip can realize that when the voltage is greater than 5.7V and less than 42V, the chip can output two DC voltages at the same time, one 3.3V and one 5V. It has short circuit, overvoltage, overload and over-temperature protection.
[0138] (2) Low power management module 32
[0139] It is a hardware design circuit based on Infineon TLE4476 chip, mainly used to control GSM power output.
[0140] The working mechanism of the battery management unit 30 is:
[0141] The low-power control module 32 uses Infineon's TLE4476 power conversion chip to output 3.3V DC voltage to drive the system to work stably. The 5V output is set to a disabled state through the IO pin of the microcontroller. Only when GSM needs to send an early warning message, the EN pin of the TLE4476 chip is used to enable the 5V power output and start the communication unit 50 to send the early warning message. When idle, the power supply of the GSM module is completely turned off to reduce the power consumption of the system. At the same time, multiple large capacitors are connected in parallel to solve the problem of large current pulses when the chip is started and sent.
[0142] 4) Historical data storage unit 40
[0143] like Figure 1 The hardware configuration of the historical data storage unit 40 is a 32MB Flash storage circuit based on the SPI interface.
[0144] The working mechanism of the historical data storage unit 40 is:
[0145] The historical data storage unit 40 is responsible for storing historical data and providing the trend prediction module 25 with reference to historical temperature change trends; the initialization data of the historical data storage unit 40 comes from the historical query data of the weather forecast website. The data is sorted and optimized during the production stage of the early warning device and stored as the initial data source. During the execution of the device, the historical data update module 23 of the embedded controller unit 20 optimizes and updates the data according to the weight coefficient every day to prevent special weather data from affecting the accuracy of the prediction.
[0146] 5) Communication unit 50
[0147] like Figure 1 The hardware configuration of the communication unit 50 is a SIM800C mobile communication module produced by SIMCOM.
[0148] It has a message sending module 51 , a local setting module 52 and a remote setting module 53 embedded therein.
[0149] (1) Message sending module 51
[0150] It is the data sending and SMS sending function integrated inside the SIM800C module.
[0151] The message sending module 51 is used to send device status information, frost warning information and setting confirmation reply information, and mainly interacts with the embedded controller unit 20. When information needs to be sent, the embedded controller unit 20 first enables the 5V linear power output of the power conversion module through the low power management module 32, and then starts the communication unit 50, and uses the information sending module 51 to send the frost warning information generated by the trend prediction module 25.
[0152] (2) Local settings module 52
[0153] It is a Bluetooth submodule integrated inside the SIM800C module. Through the official chip internal development kit, the internal integrated Bluetooth 2.0 protocol function can be started and used.
[0154] The local setting module 52 communicates directly with the manufacturer user's mobile phone 60 via Bluetooth, and uses the mobile phone Bluetooth assistant software to implement five functions: changing the user communication password, changing the mobile phone number for receiving warning information, querying system error records, setting the frost warning threshold during flowering, and setting the frost threshold during fruit setting.
[0155] (3) Remote setting module 53
[0156] It is the data receiving and SMS receiving function integrated inside the SIM800C module.
[0157] The setting command performs different functions for the manufacturer user mobile phone 60 and the individual user mobile phone 70:
[0158] The permissions and functions of the manufacturer user mobile phone 60 are exactly the same as those implemented by the local setting module 52, and are mainly used for system and core parameter control. The difference between the manufacturer user mobile phone 60 and the local setting module 52 is that the local setting uses Bluetooth to send setting commands, while the remote setting uses SMS to send setting commands;
[0159] The setting functions that can be realized by the personal user mobile phone 70 mainly include modifying the warning receiving mobile phone number, disabling the frost warning function, querying the working status of the equipment, enabling the frost warning function during the flowering period, enabling the frost warning function during the fruit setting period, and receiving frost warning information. After receiving the corresponding setting information, the embedded controller unit 20 stores it in the configuration storage module 26 as a global configuration parameter for each module to call.
[0160] 6) Manufacturer user mobile phone 60
[0161] It is a mobile phone used by factory managers. The difference between it and personal user mobile phones is the different operation functions and permission passwords. Introducing permission passwords can prevent unsafe SMS setting operations and can also distinguish between system settings and user setting commands. The operation functions and SMS formats of manufacturer user mobile phones are:
[0162] Modify user communication password
[0163] Command format: <111111XGMM123456QR123456>
[0164] Function: Change the user communication password from 111111 to 123456
[0165] Early warning system response information: <success>
[0166] Modify the mobile phone number to receive warning information
[0167] Command format: <111111XGSJ13900000001QR13830876050>
[0168] Function: Change the mobile phone number for receiving frost warning information to 13830876050
[0169] Early warning system response information: <success>
[0170] Query system error log
[0171] Command format: <123456CXXTCW>
[0172] Function: Query the error records of the early warning equipment system
[0173] Early warning system response information: <mmcw5wdcgcw5dcsysj1210ccqfwcw10gsmcw3>
[0174] Set frost warning threshold during flowering period
[0175] Command format: <111111HQWDYZ0.5>
[0176] Function: Set the temperature threshold for early warning during flowering period
[0177] Early warning system response information:<HQWDYZ=0.5>
[0178] Set frost warning thresholds during fruit setting
[0179] Command format: <111111ZGQWDYZ-3.5>
[0180] Function: Set the temperature threshold for early warning during flowering period
[0181] Early warning system response information:<ZGQWDYZ-3.5>
[0182] The above information, where 111111 is the manufacturer user's communication password, can be set for all alarm devices.
[0183] 7) Personal user mobile phone 70
[0184] It is a mobile phone used by fruit farmers personally. It can send setting commands or receive prompt information from the early warning system through SMS. For operational safety, each early warning module has a default password when it leaves the factory. When sending command SMS, the password needs to match to set the corresponding hardware function. The operating functions and SMS formats of personal user mobile phones are:
[0185] Modify the mobile phone number to receive warning information
[0186] Command format: <123456XGSJ13800000001QR13830876050>
[0187] Function: Change the mobile phone number for receiving frost warning information to 13830876050
[0188] Early warning system response information: <success>
[0189] Deactivate frost warning function
[0190] Command format: <123456TYYJ>
[0191] Function: Disable frost warning function
[0192] Early warning system response information: <success>
[0193] Query the working status of the device
[0194] Command format: <123456CXSBZT>
[0195] Function: Query the status of early warning equipment
[0196] Warning system reply information: <Status: Idle / Flowering warning / Fruit setting warning, Current temperature: 18.6, Remaining power: 30%, Phone balance: 33.5>
[0197] Enable frost warning during flowering period
[0198] Command format: <123456QYHQYJ>
[0199] Function: Enable frost warning function during cherry blossom period
[0200] Early warning system response information: <success>
[0201] Enable frost warning function during fruit setting period
[0202] Command format: <123456QYZGQYJ>
[0203] Function: Enable frost warning function during cherry fruit setting period
[0204] Early warning system response information: <success>
[0205] The above information, 123456 is the communication password of the alarm device, and each alarm device has a different password.
[0206] 3. Experimental Results
[0207] This system has been deployed and tested in the cherry plantation in Tianshui area. During operation, the system first obtains early warning information 2 hours in advance, then obtains early warning information 1 hour in advance, and finally obtains frost warning information 30 minutes in advance. Compared with the actual frost occurrence time point, the 2-hour warning time point deviates by about 10 minutes, the 1-hour warning point deviates by about 5 minutes, and the 30-minute warning point deviates by about 1 minute. The frost intelligent control module designed by the inventor has also been applied to the intelligent anti-frost machine produced by Tianshui Forging Group Co., Ltd., and won the third prize of Tianshui Science and Technology Progress. The specific frost warning curve is as follows: Figure 3 , the vertical axis in the figure is the temperature value, and the horizontal axis is the time value in minutes. The set warning value is 12.5℃, and the 2-hour warning prompt information is issued at 6 o'clock; the 1-hour warning prompt information is issued at 7:13; and the 30-minute frost prompt information is issued at 7:49. There was no 0℃ scene in the actual test environment at that time, so 12.5℃ was selected as the alarm threshold during the test. In normal frost warning, the alarm threshold is generally set between 1.0℃ and 1.5℃. When the temperature drop rate predicted by the system in the future is about 1℃ / 10 minutes, the frost disaster warning prompt will be triggered.< / success> < / success> < / success> < / success> < / success> < / success>
Claims
1. A cherry frost early warning system based on Kalman filtering, characterized in that: It comprises a manufacturer user mobile phone (60) and a personal user mobile phone (70), and is provided with a temperature collection unit (10), an embedded controller unit (20), a battery management unit (30), a historical data storage unit (40) and a communication unit (50); Its connection and connectivity relationships are: The temperature collection unit (10), the embedded controller unit (20) and the communication unit (50) are connected in sequence, the battery management unit (30) and the historical data storage unit (40) are respectively connected to the embedded controller unit (20), and the manufacturer user mobile phone (60) and the personal user mobile phone (70) are respectively connected to the communication unit (50); The temperature collection unit (10) is connected to the embedded controller unit (20) to realize the collection of temperature information, reliability verification and input of original temperature data; The embedded controller unit (20) is connected to the battery management unit (30) to achieve real-time monitoring of the battery system and low power consumption control of the entire system; The embedded controller unit (20) is connected to the historical data storage unit (40) to realize the reading and updating of historical data; The embedded controller unit (20) is connected to the communication unit (50), and the manufacturer user mobile phone (60) and the personal user mobile phone (70) are respectively connected to the communication unit (50) to achieve remote or local configuration of the system, trend prediction and early warning information transmission; The temperature acquisition unit (10) is divided into an analog temperature acquisition module (11) and a digital temperature acquisition module (12); The analog temperature acquisition module (11) is an analog temperature sensor; The digital temperature acquisition module (12) is a digital temperature sensor; The embedded controller unit (20) is a 32-bit ultra-low power microcontroller based on the Cortex-M0 core, and is embedded with a reliability verification module (21), a temperature filtering module (22), a historical data update module (23), a linear fitting module (24), a trend prediction module (25), a configuration storage module (26) and a power management module (27); The interaction is: The analog temperature acquisition module (11) and the digital temperature acquisition module (12) interact with the reliability verification module (21) respectively; The reliability verification module (21), the temperature filtering module (22), the linear fitting module (24), the trend prediction module (25) and the message sending module (51) interact in sequence; The temperature filtering module (22), the historical data updating module (23), the historical data storage unit (40) and the trend prediction module (25) interact in sequence; The local setting module (52) and the remote setting module (53) interact with the configuration storage module (26) respectively; The power management module (27) interacts with the battery management unit (30); The battery management unit (30) is divided into an electric energy conversion module (31) and a low power consumption management module (32); The electric energy conversion module (31) is an LDO electric energy conversion circuit, which is designed using the Infineon TLE4476 chip; The low power consumption management module (32) is a hardware design circuit based on the Infineon TLE4476 chip and is mainly used to control the GSM power output; The hardware configuration of the communication unit (50) is a SIM800C mobile communication module produced by SIMCOM; It is embedded with a message sending module (51), a local setting module (52) and a remote setting module (53); The message sending module (51) is a data sending and SMS sending function integrated inside the SIM800C module; The local setting module (52) is a Bluetooth submodule integrated inside the SIM800C module; The remote setting module (53) is a data receiving and SMS receiving function integrated inside the SIM800C module.
2. A cherry frost early warning method based on the system of claim 1, characterized in that: ①Signal acquisition and reliability verification The analog and digital dual sensor structure is used to compare and verify the reliability of the system and the authenticity of the sampling value; the digital sensor samples once per minute; the analog sensor samples 10 times per second; ② Temperature smoothing filter processing The temperature value obtained from the analog sensor is filtered using a 4th-order Butterworth low-pass filter with a sampling frequency of 10 Hz and a cutoff frequency of 0.1 Hz. The original sampled data is filtered using a Butterworth low-pass filter and then subjected to median and mean filtering. ③Update historical data and calculate weight coefficients According to the golden ratio principle, the original historical data accounted for 0.618, the newly collected temperature data accounted for 0.382, and the temperature information that changes every year is brought into the new historical data; The weight coefficient is determined based on the deviation of historical data, curve fitting value and current actual temperature value. The weight coefficients α and β are used in step ⑥; ④ Linear fitting of the curve using the least squares method The temperature values obtained in the first 200 minutes were used to perform least squares curve fitting, and the temperature fitting value after 30 minutes was calculated using a fifth-order polynomial; ⑤Get historical temperature change data Assuming that the temperature at the current time point is T0, the temperature value at 30 minutes is read using the historical record and recorded as T1; obtaining the temperature change value ΔT1 at 60 minutes relative to 30 minutes, the temperature change value ΔT2 at 120 minutes relative to 60 minutes, and the temperature change value ΔT3 at 150 minutes relative to 120 minutes; ΔT1, ΔT2 and ΔT3 are provided as input core parameters to the trend prediction module (25); ⑥Frost trend forecast The final frost trend prediction is the core function of the present invention. The historical data and the current measured value are brought into the Kalman filter A to obtain the predicted value Ta, and the temperature fitting value and the current measured value after 30 minutes are brought into the Kalman filter B to obtain the predicted value Tb; the calculation formula for the final predicted value Tw of the temperature after 30 minutes is: Tw=α*Ta+β*Tb (1) Using Tw and the three historical temperature change differences of ΔT1, ΔT2, and ΔT3 obtained in step ⑤, calculate the predicted temperature values after 1 hour and 2 hours; Tw1H=Tw+ΔT1 (2) Tw2H=Tw+ΔT1+ΔT2 (3) Among them, Tw1H is the warning temperature value after 1 hour, and Tw2H is the warning temperature value after 2 hours; Tw, Tw1H and Tw2H are compared with the big cherry flowering period frost warning threshold and the big cherry fruit setting period frost warning threshold stored in the configuration storage module (26) respectively; TF_Threshold is the flowering period frost warning temperature threshold stored in the system, and TB_Fruitsetting is the fruit setting period frost warning temperature threshold stored in the system; the specific comparison formula is as follows: TF_Threshold - 0.5 <Tw<TF_Threshold (4) TB_Fruitsetting-0.5 <Tw<TB_Fruitsetting (5) ΔT1<0 (6) If the trigger conditions (4) and (6) are met, the communication unit (50) sends a warning message MB; If the trigger conditions (5) and (6) are met, the communication unit (50) sends a warning message MF; The message body formats of MF and MB are as follows: MB: "Frost will come in 30 minutes during the flowering period. The current temperature is YY℃, the warning setting value is ZZ℃, and the current temperature is dropping at a rate of VV℃ per minute. Please take precautions in time"; MF: "Frost will come in 30 minutes. The current temperature is YY℃, the warning setting value is ZZ℃, and the current temperature is dropping at a rate of VV℃ per minute. Please take precautions in time"; The 1-hour and 2-hour time point warning judgment methods are similar to those for 30 minutes. Tw1H and ΔT2 determine whether to send a frost warning after 1 hour, and Tw2H and ΔT3 determine whether to send a frost warning after 2 hours.
Citation Information
Patent Citations
Cherry frost early warning device based on Kalman filtering
CN210895550U