Farm sensing system and sensor data correction method thereof

By using the reference sensor in the farm sensor system to establish a correction table and perform a limited state correction program, the problem of inaccurate data caused by the failure of the sensor, and the accurate correction of the data and the efficient operation of the system.

CN113865638BActive Publication Date: 2025-01-28QUANTA COMPUTER INC
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010684131.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2020-06-30
Filing Date
2020-07-16
Publication Date
2025-01-28
Estimated Expiration
2040-07-16

AI Technical Summary

Technical Problem

In smart agricultural applications, sensors set up outdoors may fail or age, resulting in inaccurate data, which may in turn lead to improper use of water, pesticides or fertilizers on the farm, causing losses.

Method used

A farm sensing system is designed, including cloud servers, sensing devices and computer devices, connect a specific sensor through sensing device, use the reference sensor to establish a correction table, and use a limited state machine to correct Effective.

Benefits of technology

The accurate correction of sensor data is achieved, and the misunderstanding caused by the failure due to the sensor is avoided, saving time and cost, and reduced unnecessary sensor replacement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113865638B_ABST
    Figure CN113865638B_ABST
Patent Text Reader

Abstract

The present invention provides a farm sensing system and a sensor data correction method thereof. The farm sensing system includes: a cloud server; a sensing device for connecting to a specific sensor set in a farm; and a computer device for obtaining specific sensor data generated by the specific sensor from the sensing device through the cloud server. In response to a potential failure of the specific sensor, the sensing device enters a sensor calibration mode. In response to a reference sensor being connected to the sensing device, the sensing device periodically receives specific sensor data and reference sensor data to establish a correction table, and executes a finite state machine to perform a correction procedure on each item in the correction table. In response to the number of consecutive hits of the corresponding relationship of the specific item in the correction table reaching a predetermined number N, the finite state machine interrupts the correction procedure and determines that the specific item is correctable.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a sensing device, and in particular to a farm sensing system and a sensor data correction method thereof. Background Art

[0002] For various applications of the Internet of Things (IoT), different types of sensors are widely installed at required locations. Because many smart applications of the IoT often cause inaccurate sensor data due to failure, aging or interference of the installed sensors, sensor calibration is a very important issue, especially for applications where sensors are installed outdoors, such as smart agriculture. Because the application of smart agriculture requires the installation of many different types of sensors on farms (such as outdoor environments), if some sensors fail / age and cause inaccurate sensor data, water, pesticides or fertilizers may be improperly sprayed on the farm, causing agricultural losses.

[0003] Therefore, a farm sensing system and a sensor data correction method thereof are needed to solve the above problems. Summary of the invention

[0004] The present invention provides a farm sensing system, comprising: a cloud server; a sensing device for connecting to a specific sensor set in a farm, wherein the specific sensor detects environmental information of the farm to generate corresponding specific sensor data; and a computer device for obtaining the specific sensor data generated by the specific sensor from the sensing device through the cloud server. In response to the computer device determining that the specific sensor has a potential failure based on the sensor data, the computer device transmits a correction instruction to the sensing device through the cloud server to enable the sensing device to enter a sensor correction mode. In response to a reference sensor of the same type as the specific sensor being connected to the sensing device, the sensing device continuously and regularly receives the specific sensor data and the reference sensor data from the specific sensor and the reference sensor respectively to establish a correction table, wherein each item in the correction table records a one-to-one correspondence between the specific sensor data and the reference sensor data. The sensing device also executes a finite state machine to perform a correction procedure for each item in the correction table. In response to the number of consecutive hits of the corresponding relationship between the reference sensor data and the reference sensor data stored in a specific item in the correction table reaching a predetermined number N, the finite state machine interrupts the correction procedure of the specific item and determines that the specific item is correctable.

[0005] In some embodiments, in response to the number of consecutive misses of the correspondence between the reference sensor data and the reference sensor data stored in the specific item in the correction table reaching the predetermined number N, the finite state machine interrupts the correction procedure of the specific item and determines that the specific item cannot be corrected. In some embodiments, the predetermined number N is equal to 2.

[0006] In some embodiments, when the finite state machine determines that the specific item is uncorrectable, the sensing device determines that the specific sensor is failed, and sends a sensor failure message to the computer device to remind the farm manager to replace the specific sensor.

[0007] In some embodiments, when the sensing device determines that all items in the correction table are calibrable, the sensing device uses the correction table to calibrate the specific sensor data generated by the specific sensor, and transmits the calibrated specific sensor data to the computer device via the cloud server.

[0008] The present invention also provides a sensor data correction method for a farm sensing system, wherein the farm sensing system includes: a cloud server, a sensing device and a computer device, and the sensing device is connected to a specific sensor set in a farm, wherein the specific sensor detects environmental information of the farm to generate corresponding specific sensor data, the method comprising: using the computer device to receive the specific sensor data generated by the specific sensor from the sensing device through the cloud server; in response to determining that the specific sensor has a potential failure based on the sensor data, using the computer device to send a correction instruction to the sensing device through the cloud server to make the sensing device enter a sensor calibration mode; in response to the specific sensor being detected, the computer device sends a correction instruction to the sensing device through the cloud server to make the sensing device enter a sensor calibration mode; A reference sensor of the same type as the specific sensor has been connected to the sensing device, and the sensing device is used to continuously and regularly receive the specific sensor data and the reference sensor data from the specific sensor and the reference sensor respectively to establish a correction table, wherein each item in the correction table records a one-to-one correspondence between the specific sensor data and the reference sensor data; the sensing device is used to execute a finite state machine to perform a correction procedure for each item in the correction table; and in response to the number of consecutive hits of the correspondence between the reference sensor data stored in a specific item in the correction table and the reference sensor data reaching a predetermined number N, the finite state machine is used to interrupt the correction procedure for the specific item and determine that the specific item is correctable.

[0009] In some embodiments, the method further comprises: in response to the number of consecutive misses of the correspondence between the reference sensor data and the reference sensor data stored in the specific item in the correction table reaching the predetermined number N, interrupting the correction procedure of the specific item using the finite state machine and determining that the specific item cannot be corrected. In some embodiments, the predetermined number N is equal to 2.

[0010] In some embodiments, the method further includes: when the finite state machine determines that the specific item is uncorrectable, using the sensing device to determine that the specific sensor is failed, and sending a sensor failure message to the computer device to remind the farm manager to replace the specific sensor.

[0011] In some embodiments, the method also includes: when the sensing device determines that each item in the correction table is calibrable, using the sensing device to use the correction table to calibrate the specific sensor data generated by the specific sensor, and transmitting the corrected specific sensor data to the computer device via the cloud server. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] Figure 1 is a schematic diagram showing a farm sensing system according to an embodiment of the present invention.

[0013] Figure 2 FIG. 4 is a schematic diagram of a sensing device communicating with a cloud server according to an embodiment of the present invention.

[0014] Figures 3A to 3C Schematic diagram of different finite state machines according to an embodiment of the present invention.

[0015] Figure 4A FIG. 4 is a graph showing the relationship between the probability of successful calibration of the finite state machines FSM1 and FSM2 and the number of items in the calibration table according to an embodiment of the present invention.

[0016] Figure 4B FIG. 4 is a graph showing the relationship between the probability of calibration failure of the finite state machines FSM1 and FSM2 and the number of items in the calibration table according to an embodiment of the present invention.

[0017] Figure 5 FIG. 4 is a flow chart of a sensor calibration method according to an embodiment of the present invention.

[0018]

Explanation of symbols

[0019] 100: Farm Sensing System

[0020] 110: Sensing component

[0021] 111: Sensing device

[0022] 113: Controller

[0023] 114, 1121~112N: Sensor interface

[0024] 115, 1601-160N: Sensor

[0025] 116:Rain Gauge

[0026] 117: Anemometer

[0027] 1131: Volatile memory

[0028] 1132: Non-volatile memory

[0029] 1133: Device application

[0030] 1134:Sensor Application

[0031] 1135-1139: Submodule

[0032] 120: Cloud Server

[0033] 130: Actuating component

[0034] 131: Actuation control device

[0035] 133: Controller

[0036] 1331: Volatile memory

[0037] 1332: Non-volatile memory

[0038] 1334:Actuator Application

[0039] 140:Computer Device

[0040] 142: Display screen

[0041] 143: Monitoring interface

[0042] S X :sensor

[0043] S W :Reference Sensor

[0044] S510-S550: Steps DETAILED DESCRIPTION

[0045] The following description is a preferred implementation of the invention, which is intended to describe the basic spirit of the invention, but is not intended to limit the invention. The actual content of the invention must refer to the scope of the claims.

[0046] It must be understood that the words "comprise", "include" and the like used in this specification are used to indicate the existence of specific technical features, values, method steps, operation processing, elements and / or components, but do not exclude the addition of more technical features, values, method steps, operation processing, elements, components, or any combination of the above.

[0047] In the claims, words such as "first", "second", "third", etc. are used to modify elements in the claims. They are not used to indicate a priority order, a prior relationship, or that one element precedes another element, or a temporal order in performing method steps. They are only used to distinguish elements with the same name.

[0048] Figure 1 is a schematic diagram showing a farm sensing system according to an embodiment of the present invention.

[0049] The farm sensing system 100 mainly includes a sensing component 110, a cloud server 120, an actuating component 130 and a computer device 140, wherein the sensing component 110, the actuating component 130 and the computer device 140 are electrically connected to the cloud server 120. The sensing component 110 is used to detect various environmental information of the farm to generate various types of sensor data.

[0050] In one embodiment, the sensing component 110 includes a sensing device 111 and a plurality of sensors 1601-160N, and a sensor 115. In addition, the sensing device 111 includes a controller 113, a volatile memory 1131, a non-volatile memory 1132, and a plurality of sensor interfaces 1121-112N and 114. Each of the sensors 1601-160N can be connected to the sensing device 111, for example, through the corresponding sensor interface 1121-112N, and the sensor 115 can be connected to the sensing device 111, for example, through the sensor interface 114. The controller 113 can be, for example, a central processing unit, a general-purpose processor, or a microcontroller, but the present invention is not limited thereto.

[0051] For example, sensors 1601-160N may be disposed outside the sensing device 111, and sensors 1601-160N are sensors for detecting different types of information on the farm, such as but not limited to: temperature sensors, ultraviolet sensors, humidity sensors, carbon dioxide sensors, atmospheric pressure sensors, soil moisture sensors, soil temperature sensors, soil conductivity sensors, soil pH sensors, wherein the soil moisture sensors, soil temperature sensors, soil conductivity sensors, and soil pH sensors may be collectively referred to as soil sensors. It should be noted that the number of sensors of the same type is not limited to one, and the user may configure different numbers of sensors for each type of sensor data according to the size and actual conditions of the farm. For example, the user may respectively set humidity sensors and soil sensors at different corners or predetermined locations of the farm, so as to more accurately determine the environmental information of different locations of the farm. In addition, the sensing device 111 further includes a rain gauge 116 and an anemometer 117, wherein the rain gauge 116 and an anemometer 117 may be disposed, for example, inside the housing (not shown) of the sensing device 111, to detect the rainfall and wind speed of the farm.

[0052] In detail, the sensing device 111 further includes a volatile memory 1131 and a non-volatile memory 1132. The volatile memory 1131 may be, for example, a dynamic random access memory (DRAM) or a static random access memory (SRAM), but the present invention is not limited thereto. The non-volatile memory 1132 may be, for example, a hard disk drive, a solid state drive, a flash memory, or a read-only memory, etc., but the present invention is not limited thereto. The non-volatile memory 1132 stores a device application (DA) 1133 and a sensor application (SA) 1134.

[0053] The device application 1133 supports, for example, the Hyper-text Transfer Protocol Secure (HTTPS) and Message Queuing Telemetry Transport (MQTT) standards for IoT communication, so as to communicate with the cloud server 120. The sensor application 1134 is used to execute the sensor calibration mechanism, for example, a calibration table can be established to calibrate the raw sensor data. The controller 113 in the sensing device 111 can read the device application 1133 and the sensor application 1134 from the non-volatile memory 1132 to the volatile memory 1131 and execute them.

[0054] The controller 113 may receive corresponding raw sensor data from the sensors 1601-160N, the rain gauge 116, and the anemometer 117. The sensor application 1134 executed by the controller 113 calibrates the raw sensor data of each sensor, and the device application 1133 transmits the calibrated sensor data to the cloud server 120 via HTTPS and MQTT protocols in a wired or wireless transmission manner.

[0055] The cloud server 120 receives various environmental information of the farm detected by the sensing component 110, and can execute one or more artificial intelligence models to determine whether it is necessary to send an actuation instruction to the actuation control device 131 to control the farm actuators 150-156 to perform corresponding processing actions on the farm. In addition, the cloud server 120 also serves as a communication bridge between the sensing device 111, the actuation control device 131 and the computer device 140, that is, the computer device 140 needs to send a control instruction or a correction instruction to the actuation control device 131 or the sensing device 111 through the cloud server 120, and the sensor data obtained by the sensing device 111 is also sent to the computer device 140 via the cloud server 120.

[0056] In one embodiment, the actuator component 130 includes an actuator control device 131 and a plurality of farm actuators 150-156, wherein the farm actuators 150, 152, 154 and 156 are, for example, a sprinkler, an insect repellent sprayer, a fertilizer sprayer and an insect repellent lamp, respectively. In addition, the actuator control device 131 includes a controller 133, a volatile memory 1331 and a non-volatile memory 1332. The controller 133 may be, for example, a central processing unit, a general purpose processor or a microcontroller, but the present invention is not limited thereto. The volatile memory 1331 may be, for example, a dynamic random access memory (DRAM) or a static random access memory (SRAM), but the present invention is not limited thereto. The non-volatile memory 1332 may be, for example, a hard disk drive, a solid state drive, a flash memory or a read-only memory, etc., but the present invention is not limited thereto. The non-volatile memory 1332 stores an actuator application (SA) 1334. The controller 133 in the actuation control device 131 may read the actuator application 1334 from the non-volatile memory 1332 to the volatile memory 1331 and execute the actuator application 1334 .

[0057] The farm actuators 150-156 are connected to the actuator control device 131, and the controller 133 of the actuator control device 131 controls the farm actuators 150-156 to perform corresponding actions on the farm, such as spraying water, insect repellent, fertilizer, or starting insect repellent lamps according to the actuator instructions from the cloud server 120.

[0058] The computer device 140 may be a personal computer or a portable electronic device (such as a smart phone or a tablet computer). For ease of explanation, in the following embodiments, the computer device 140 is described by taking a smart phone as an example. The computer device 140 may communicate and transmit data with the cloud server 120 through a wireless communication protocol, for example, including 3G, 4G, 5G, WiFi, LTE, near field communication, Bluetooth, low-power wide area network (LPWAN), LoRaWAN, Sigfox, NB-IoT, etc., but the present invention is not limited thereto.

[0059] like Figure 1 As shown, the computer device 140 can, for example, execute a monitoring program (not shown) to display a web-based monitoring interface 143 on the display screen 142, and the monitoring program can display the sensor data detected by the sensing component 110 received by the computer device 140 from the cloud server 120 on the above-mentioned monitoring interface 143.

[0060] In one embodiment, the computer device 140 may perform a homogeneous test, a heterogeneous test, or a combination thereof on some types of sensors based on the received sensor data, so as to determine whether there is a potential failure of a sensor in the sensing component 111. When the computer device 140 determines that a sensor has a potential failure, it displays a warning message on the monitoring interface to notify the farmer, and transmits a failure detection message to the cloud server 120, so that the cloud server 120 transmits a calibration command to the sensing device 111, so that the sensing device 111 enters a sensor calibration mode from a normal mode.

[0061] For example, the co-location test performed by the computer device 140 refers to data analysis of sensor data generated by sensors of the same type in the same farm to determine whether there is a potential failure of a sensor of the same type. Taking a pressure sensor, a temperature sensor, a humidity sensor, and a carbon dioxide sensor as examples, in theory, the sensor data generated by multiple sensors of the same type installed in the same farm are highly correlated with each other. If the error between the sensor data generated by a specific sensor and the sensor data generated by other sensors of the same type is too large (for example, greater than one standard deviation, not limited), the computer device 140 can determine that the specific sensor has a potential failure.

[0062] In addition, if the locations and altitudes of different farms are very different, the sensor data detected by the above-mentioned multiple types of sensors in farms at different locations will theoretically be different. That is, in addition to comparing the sensor data of the same type of sensors in the same farm, the computer device 140 can also compare the sensor data of the same type of sensors in farms at different locations. In addition, if only one set of sensing components 110 is set in the same farm, the computer device 140 can obtain weather information from the nearest weather station and compare it with the sensor data of the corresponding sensors in the sensing component 110 to determine whether any sensor has potential failure.

[0063] The out-of-situ test performed by the computer device 140 requires the cooperation of sensors 1601-160N and farm actuators 150-156. For example, taking soil moisture sensors and sprinklers as an example, when the soil moisture sensors and sprinklers installed in the same farm are operating normally, the computer device 140 can calculate the delay time t between the opening and closing of the sprinklers. Based on the histogram of the delay time t, the computer device 140 can derive a distribution for selecting a suitable delay time threshold T. When it is not possible to determine whether the soil moisture sensor or sprinkler installed in the same farm is operating normally, the computer device 140 will continue to perform interactive tests on the soil moisture sensor and the sprinkler by measuring the above delay time t. If the sprinkler cannot be closed within the delay time threshold T after being turned on, the computer device 140 will determine that a potential failure has occurred.

[0064] In detail, when the sensor data of the soil moisture sensor received by the cloud server 120 from the sensing device 111 indicates that the RH value of the farm soil is too low (e.g., lower than 45% RH), the actuator application 1334 executed by the computer device 140 can send a control signal to the actuator control device 131 through the cloud server 120 to control the sprinkler to start watering. If the sprinkler can operate normally, the humidity of the farm soil should increase to a predetermined threshold value (e.g., 45% RH) after a predetermined time. When the soil moisture sensor detects that the humidity of the farm soil reaches the predetermined threshold value within the delay time threshold value T, the computer device 140 will determine that there may be a potential failure of the soil moisture detector or the sprinkler after receiving the sensor data of the soil moisture sensor through the cloud server 120. At this time, the monitoring interface 143 of the computer device 140 will display a warning message to notify the farmer, and at the same time, a warning message will be sent to the cloud server 120 to indicate that a potential failure has occurred.

[0065] Figure 2 FIG. 4 is a schematic diagram of a sensing device communicating with a cloud server according to an embodiment of the present invention.

[0066] like Figure 2 As shown, the device application 1133 and the sensor application 1134 executed by the sensing device 111 can be further divided into submodules used in the normal mode and the sensor calibration mode. For example, the sensor application 1134 includes submodules 1135 and 1136, and the device application 1133 includes submodules 1137, 1138, and 1139. The submodules 1137 and 1138 are, for example, input device features (IDFs), and can be referred to as IDF X and IDF C, respectively. bchannels, which can be considered as different communication channels between the sensing device 111 and the cloud server 120. For example, the sensing device 111 can x and S w The sensor data is respectively transmitted through IDFX and IDF C b The submodule 1139 may be, for example, an output device feature (ODF), which is used in the sensor calibration mode, for example, to receive a calibration request from the computer device 140 from the cloud server 120, so the submodule 1139 may also be called ODF. b module.

[0067] In the normal mode, the submodule 1135 of the sensor application 1134 and the submodule 1138 of the device application 1133 are not enabled. When the sensing device 111 is in the sensor calibration mode, the controller 113 enables the submodule 1135 of the sensor application 1134 and the submodules 1138 and 1139 of the device application 1133. It should be noted that, regardless of whether the sensing device 111 is in the normal mode or the sensor calibration mode, the submodule 1136 of the sensor application 1134 and the submodule 1137 of the device application 1133 are always enabled.

[0068] Sensor S x Indicates one of the sensors 1601-160N originally connected to the sensing device 111. In normal mode, the sensors 1601-160N are connected to the sensing device 111 and regularly detect the environmental information of the farm, but the sensor 115 is not connected to the sensing device 111. Different types of sensors have different detection cycles, and the user can adjust the detection cycle of each sensor or the cycle of the controller 113 extracting sensor data from each sensor according to actual conditions. Sensor S x The generated sensor data is sent to a submodule 1136 (e.g., SA) in the sensor application 1134. x Module), and sub-module 1136 processes the sensor data and transmits the processed sensor data to the cloud server 120 through sub-module 1137.

[0069] It should be noted that, taking the temperature sensor as an example, if the temperature range it detects is -40 degrees Celsius to 65 degrees Celsius, the temperature sensor may not be able to accurately detect the temperature in some temperature ranges due to damage or aging caused by being in an outdoor environment, defects in the manufacturing process of the sensor, or interference during the detection process. Such problems can also be regarded as potential failures of the temperature sensor. Other types of sensors can also be judged in a similar way to determine whether they have potential failures.

[0070] In the above embodiment, when the cloud server 120 sends a calibration command to the sensor device 111, the sensor device 111 enters a sensor calibration mode from a normal mode. At this time, the controller 113 activates the submodule 1135 of the sensor application 1134 and the submodule 1138 of the device application 1133. Before starting the sensor data calibration procedure, the sensor 115 (i.e., the sensor S w ) must first be connected to the sensing device 111 and placed at the sensor S where a potential failure occurs. x The sensor 115 can be called a standard sensor or a reference sensor, which means that the sensor 115 is a sensor that has been confirmed to work properly in advance, so the accuracy of the sensor data generated by it is trustworthy.

[0071] Given T x Sensor S for item X in the calibration table x The measured data value, and the variable V x For storing the slave sensor S x For the most recently received data, the submodule 1136 of the sensor application 1134 may, for example, execute the following virtual program code:

[0072] S1: Waiting for S x Receive sample v x

[0073] S2:V x ←v x

[0074] S3: If (T x (v x )=NIL), then T x (v x )←v x

[0075] S4: Transmission T x (v x ) to S x IDF

[0076] S5: Return to step S1

[0077] When you start to create the calibration table, you will first x The detected values ​​are sequentially filled into the items in the calibration table, for example, the first data is filled into item 1, the second data is filled into item 2, and so on. In simple terms, the contents of the calibration table are empty at the beginning, so the sensor S xThe detected different values ​​will continue to be filled in the various items of the calibration table. It should be noted that regardless of whether the sensing device 111 is in the sensor calibration mode, steps S1 to S5 will continue to be executed. This means that if the farm environment changes greatly, the number of items in the calibration table may increase.

[0078] In this embodiment, when the sensing device 111 is in the sensor calibration mode, the submodule 1135 of the sensor application 1134 executes a calibration procedure, for example, filling the standard value corresponding to each item in the calibration table into the sensor S w For example, the sensing device 111 uses the same cycle to simultaneously extract the detected values ​​from the sensor S w and S x Sensor data of sensor S x It can be called the device under test (DUT), sensor S w It can be called a standard sensor (STD for short). Taking the temperature sensor as an example, if the first item in the calibration table is DUT = 26.52 degrees, and the STD measured at the same time is 24.98 degrees, then 24.98 degrees will be filled in as the standard value corresponding to the first item in the calibration table. Similarly, if the second item in the calibration table is DUT = 27.41 degrees, and the STD measured at the same time is 25.79 degrees, then 25.79 degrees will be filled in as the standard value corresponding to the second item in the calibration table. By repeatedly executing the above steps, the standard values ​​corresponding to each item in the calibration table can be established, as shown in Table 1:

[0079]

[0080]

[0081] Table 1

[0082] In another embodiment, taking a humidity sensor as an example, if the first item in the calibration table is DUT = 78.47% (RH), and the STD measured at the same time is 77.24%, then 77.24% will be filled in as the standard value corresponding to the first item in the calibration table. Similarly, if the second item in the calibration table is DUT = 77.31%, and the STD measured at the same time is 76.56%, then 76.56% will be filled in as the standard value corresponding to the second item in the calibration table. By repeatedly performing the above steps, the standard values ​​corresponding to each item in the calibration table can be established, as shown in Table 2:

[0083] project DUT(%) STD(%) 1 78.47 77.24 2 77.31 76.56 3 72.41 72.29 4 63.63 64.31 5 57.47 58.80 6 58.28 58.67 7 50.80 52.58 8 51.06 52.16 9 46.56 45.85 10 45.86 47.69 11 45.07 46.92 12 43.71 46.09

[0084] Table 2

[0085] During the calibration process, the sensor Sx (i.e., DUT) may detect the same value that has been detected before, so sensor S x If the same value is detected, it refers to the same item in the calibration table. x (v x ) items have been previously filled in with the corresponding standard values ​​v W , if the sensor S x Detected value v x , and at this time the sensor S w Detected value v W , then it means the corresponding relationship hits. If the sensor S x Detected value v x , and at this time the sensor S w Detected not to be v W The above correction process is controlled by a finite state machine (FSM), and the hit or miss of the corresponding relationship is the input signal of the FSM, and can control the state of the FSM to switch, for example Figure 3A It should be noted that each sensor has a corresponding finite state machine to calibrate its sensor data.

[0086] In this embodiment, if the calibration message M=(s, id) is exchanged between the sensing device 111 and the cloud server 120 through the control channel, and the calibration message is sent from the cloud server 120 to the sensing device 111, then the state Ms=R, which indicates that this is a calibration request. If the calibration message is sent from the sensing device 111 to the cloud server 120, then the state Ms=C, which indicates that the calibration process has been successfully completed, and the state Ms=F indicates that the calibration process has failed. M.id indicates the number of the sensor to be calibrated. In the calibration table T x Each item T in x (v) The corresponding state in the finite state machine is represented by F x (v) Therefore, the above calibration procedure executed by the submodule 1135 of the sensor application 1134 can be represented by the following virtual program code:

[0087] W1: Waiting to receive a calibration request message M = (R, id) from the control channel

[0088] W2:X←M.id

[0089] W3: For Execute {F x (v)←0}

[0090] W4: Waiting for SW Receive value v W

[0091] W5: If T x (V x )=v W Then F x (V x )←1

[0092] Otherwise {T x (V x )←v W ; F x (V x )←F x (V x )+1}

[0093] W6: If (F x (v) = N) then {W6a: send calibration failure message M = (F, X) to channel IDF C b ; Go to step W1;}

[0094] W6b: Otherwise if ( F x (v) = 1) then {send calibration success message M = (C, X) to channel IDFC b ; Go to step W1;}

[0095] W6c: Otherwise proceed to step W4

[0096] It should be noted that steps S1 to S5 and steps W1 to W6 are performed independently. x The value is approximately the same as the time when step W4 is executed. In one embodiment, even if the sensor S x can be corrected, but due to the sensor S x There may be a low probability of random errors, so misses may still occur during the calibration process. If the probability of a miss is not zero, then theoretically Figure 3A The finite state machine in will eventually advance to F x (v) = N, and step W6a may determine that the calibration procedure has failed. In this case, the computer device 140 (or the cloud server 120) will notify the farmer that the hardware of the sensor that was mistakenly determined to be invalid needs to be replaced, but in fact the sensor S x It has not failed, so it may cause unnecessary cost increases.

[0097] In general, if the sensor S x If the calibration is possible, step W6b will be executed to successfully complete the calibration procedure. Figure 3AThe only stable state of the finite state machine FSM0 in x (v) = N. In order to ensure F x (v) = 1 is also a stable state. Figure 3A The finite state machine FSM0 in the Figure 3B Therefore, after the correction procedure is successfully completed, it will be terminated in step W6b, wherein the probability of successfully completing the correction procedure and terminating is derived as follows.

[0098] Order in Figure 3B The probability of the i-th state occurring in i =Pr[F x (v) = i], because state 0 is a transient state, its occurrence probability π0 = 0. Therefore, the sum of the occurrence probabilities of other states 1 to N is 1, which can be expressed by the following formula (1):

[0099] π1+π2+…+π N =1 (1)

[0100] Assuming the probability of data hit Pr(hit) = p and the probability of data miss Pr(miss) = 1-p, we can get formula (2):

[0101] π1=pπ1+pπ2+…+pπ N =p (2)

[0102] For 1<n<N, we can obtain equation (3) and equation (4):

[0103] π n =(1-p)π n-1 =p(1-p) n-1 (3)

[0104] π N =(1-p)π N-1 +(1-p)π N =(1-p) N-1 (4)

[0105] Therefore, if the sensor S x can be calibrated, then regardless of the selected N value, the sensor S x In the steady state, there is a probability that p can be successfully calibrated. x If it needs to be replaced, then according to formula (4), the sensor S needs to be replaced x The probability of N-1 In other words, if a larger N value is chosen, the sensor S xBefore replacement is needed, it takes a long time to perform the calibration procedure. In a preferred embodiment, N=2 is selected to perform the calibration procedure.

[0106] For example, for each value of v, when Figure 3B The finite state machine FSM1 in the first advances to F X When (v) = 1 or N, the correction of this v value may be terminated. Therefore, the finite state machine FSM1 will randomly enter state 1 or N and terminate. For the above random model, the probability of the correction process terminating in step W6b is:

[0107]

[0108] For N=2, the probability that the calibration procedure is terminated at step W6a is:

[0109]

[0110] When |T X When the value of | is large, the probability of reaching step W6b (i.e., the correction procedure is successfully completed) is quite low. Therefore, it is necessary to increase the probability of successfully completing the correction procedure in equation (5). In detail, Figure 3C As shown in the finite state machine FSM2, if the correction table T x If a specific item in has two consecutive hits, the specific item can be considered corrected (or correctable), and the finite state machine FSM2 for the specific item will be terminated. Therefore, the probability π 3,n represents the probability that the finite state machine FSM2 has visited state 1 n times before reaching state 3, which can be expressed as:

[0111] π 3,n =p[p(1-p)] n-1 (7)

[0112] Therefore, the probability that the finite state machine FSM2 ends up in state 3 is:

[0113]

[0114] Similarly, the probability π that finite state machine FSM2 has visited state 1 n times before reaching state 4 is 4,n , which can be expressed as:

[0115] π 4,n =(1-p) 2 [p(1-p)] n-1 (9)

[0116] Therefore, the probability that the finite state machine FSM2 ends up in state 4 is:

[0117]

[0118] Where equation (8) and equation (10) satisfy π 3,n +π 4,n =1.

[0119] Therefore, for the finite state machine FSM2, the probabilities of correction completion and correction failure can be obtained as shown in equations (11) and (12):

[0120]

[0121] Pr[Ms=F]=1-Pr[Ms=C] (12)

[0122] For example, refer to Figure 3C In the finite state machine FSM2, if the correspondence between the reference sensor data of the specific item and the reference sensor data is followed by a miss after the first hit, the finite state machine FSM2 will enter state 2. If a second hit occurs in state 2, the finite state machine FSM2 will enter state 1. When a third hit occurs in state 1, the finite state machine FSM2 will enter state 3 to determine that the specific item is calibrable. If a miss occurs again in state 2, the finite state machine FSM2 will enter state 4 and determine that the specific item is uncalibrable and the sensor S x (e.g. reference sensor) is invalid. In simple terms, if for the calibration table T x If a specific item in the query has two consecutive misses, the specific item can be considered uncorrectable.

[0123] Figure 4A FIG. 4 is a graph showing the relationship between the probability of successful calibration of the finite state machines FSM1 and FSM2 and the number of items in the calibration table according to an embodiment of the present invention. Figure 4B FIG. 1 is a graph showing the relationship between the probability of calibration failure of the finite state machines FSM1 and FSM2 and the number of items in the calibration table according to an embodiment of the present invention. Figure 2 and Figure 4A-4B .

[0124] In one embodiment, if the sensor S x The probability that the sensor data can be successfully hit is p = 0.999. Figure 4A The probability of successful correction of the finite state machine FSM1 will increase with the number of items in the correction table T X As the sensor S increases, the probability of successful correction of the finite state machine FSM2 is always maintained close to 1. x is truly failed and needs to be replaced (e.g., success probability p=0.1), Figure 4BThe relationship between the probability of calibration failure of the finite state machines FSM1 and FSM2 and the number of items in the calibration table is plotted. Figure 4B It can be seen that if the number of items in the correction table is T X If it is greater than or equal to 5, the finite state machine FSM1 and FSM2 determine that the sensor S x The failure probability Pr[Ms=C] is close to 1.

[0125] It can be seen from this that if the sensor S x For correction, Figure 3C The finite state machine FSM2 in can still successfully establish the correction table. In addition, compared with Figure 3B In the finite state machine FSM1, if the sensor S x When it is truly failed and needs to be replaced, Figure 3C The calibration procedure of the finite state machine FSM2 in the sensor can be terminated quickly, which means that the finite state machine FSM2 can quickly determine that the sensor S x Specifically, when the sensing device 111 determines that all items in the calibration table are calibrable, the sensing device 111 uses the calibrable items in the calibration table to calibrate the sensor S x The generated sensor data is sent to the computer device 140 through the cloud server 120 after correction without considering whether the sensing device 111 is in the sensor correction mode. x After calibration is completed, the farmer can use the sensor S w However, if any item in the calibration table is determined by the finite state machine FSM2 (or FSM1) to be uncalibrable, the sensing device 111 determines that the sensor S x Failure, and send a sensor failure message to the computer device 140 to remind the farm manager (such as the farmer).

[0126] Figure 5 This is a flow chart of a sensor calibration method according to an embodiment of the present invention. Figure 1 and Figure 5 .

[0127] In step S510, the computer device 140 receives specific sensor data generated by a specific sensor (e.g., sensor 1601) from the sensing device 111 through the cloud server 120. The specific sensor may be, for example, a temperature sensor, an ultraviolet sensor, a humidity sensor, a carbon dioxide sensor, an atmospheric pressure sensor, a soil moisture sensor, a soil temperature sensor, a soil conductivity sensor, or a soil pH sensor, but the present invention is not limited thereto.

[0128] In step S520, in response to the computer device 140 determining that the specific sensor has a potential failure according to the sensor data, the computer device 140 transmits a calibration instruction to the sensing device 111 through the cloud server 120 to cause the sensing device 111 to enter a sensor calibration mode. For example, the computer device 140 may perform co-location testing, out-of-location testing, or a combination thereof on some types of sensors according to the received sensor data, so as to determine whether there is a sensor in the sensing component 111 that has a potential failure. For details, please refer to the aforementioned embodiment.

[0129] In step S530, in response to a reference sensor of the same type as the specific sensor being connected to the sensing device 111, the sensing device 111 continuously and periodically receives specific sensor data and reference sensor data from the specific sensor and the reference sensor, respectively, to establish a correction table, wherein each item in the correction table records a one-to-one correspondence between the specific sensor data and the reference sensor data.

[0130] In step S540, a finite state machine is executed to perform a calibration procedure on each item in the calibration table. For example, the finite state machine may be Figure 3B The finite state machine FSM1 shown or Figure 3C The finite state machine FSM2 is shown.

[0131] In step S550, in response to the reference sensor data stored in a specific item in the calibration table and the number of consecutive hits with the reference sensor data reaching a predetermined number N, the finite state machine interrupts the calibration procedure of the specific item and determines that the specific item is calibrable. According to the above embodiment, the predetermined number N is a natural number greater than or equal to 2. In a preferred embodiment, the predetermined number N=2, but the present invention is not limited thereto, and those with ordinary knowledge in the present invention can adjust the value of the predetermined number N according to actual conditions.

[0132] For example, if Figure 3CAs shown, the finite state machine FSM2 includes, for example, state 0, state 1, state 2, state 3, and state 4. In state 0, it will always hit, so it must enter state 1. The state transition between states 1 to 4 depends on the input of the finite state machine FSM2 (such as hit and miss). If the correspondence between the reference sensor data and the reference sensor data of a specific item is followed by a miss after the first hit (state 0 to state 1), the finite state machine FSM2 will enter state 2. If a second hit occurs in state 2, the finite state machine FSM2 will enter state 1. When the third hit occurs in state 1, the finite state machine FSM2 will enter state 3 to determine that the specific item is correctable. If a miss occurs again in state 2, the finite state machine FSM2 will enter state 4 and determine that the specific item is uncorrectable and the sensor S x (e.g. reference sensor) is failed.

[0133] In summary, the present invention provides a farm sensing system and a sensor data calibration method thereof, which can use a reference sensor to perform a sensor data calibration procedure for a potentially failed sensor when it is determined that a potential failure has occurred in a farm sensor. In addition, the finite state machine in the calibration procedure can quickly and accurately determine whether the sensor is calibrable or has failed, thereby saving time and cost and avoiding unnecessary sensor hardware replacement.

[0134] Although the present invention is disclosed as above in terms of preferred embodiments, it is not intended to limit the scope of the present invention. Those skilled in the art may make some changes and modifications without departing from the spirit and scope of the present invention. Therefore, the scope of protection of the present invention shall be based on the scope defined in the attached claims.

Claims

1. A farm sensing system comprising: Cloud servers; A sensing device, used to connect to a specific sensor arranged in a farm, wherein the specific sensor detects environmental information of the farm to generate corresponding specific sensor data; as well as A computer device, used for obtaining the specific sensor data generated by the specific sensor from the sensing device through the cloud server; In response to the computer device determining that the specific sensor has a potential failure based on the sensor data, the computer device transmits a calibration instruction to the sensing device through the cloud server to cause the sensing device to enter a sensor calibration mode. In response to a reference sensor of the same type as the specific sensor being connected to the sensing device, the sensing device continuously and regularly receives the specific sensor data and the reference sensor data from the specific sensor and the reference sensor respectively to establish a correction table, wherein each item of the correction table records a one-to-one correspondence between the specific sensor data and the reference sensor data, The sensing device further executes a finite state machine to perform a calibration procedure on each item in the calibration table. In response to the number of consecutive hits between the reference sensor data stored in a specific item in the correction table and the corresponding relationship between the reference sensor data reaches a predetermined number N, the finite state machine interrupts the correction procedure of the specific item and determines that the specific item is correctable.

2. A farm sensing system as described in claim 1, wherein in response to the number of consecutive misses between the correspondence between the reference sensor data and the reference sensor data stored in the specific item in the correction table reaching the predetermined number N, the finite state machine interrupts the correction procedure of the specific item and determines that the specific item cannot be corrected.

3. A farm sensing system as described in claim 2, wherein the predetermined number N is equal to 2.

4. A farm sensing system as described in claim 2, wherein when the finite state machine determines that the specific item is uncorrectable, the sensing device determines that the specific sensor is failed and sends a sensor failure message to the computer device to remind the manager of the farm to replace the specific sensor.

5. A farm sensing system as described in claim 2, wherein when the sensing device determines that each item in the correction table is correctable, the sensing device uses the correction table to correct the specific sensor data generated by the specific sensor, and transmits the corrected specific sensor data to the computer device through the cloud server.

6. A sensor data correction method for a farm sensing system, wherein the farm sensing system comprises: A cloud server, a sensing device and a computer device, wherein the sensing device is connected to a specific sensor disposed in a farm, wherein the specific sensor detects environmental information of the farm to generate corresponding specific sensor data, the method comprising: Using the computer device to receive the specific sensor data generated by the specific sensor from the sensing device through the cloud server; In response to determining that the specific sensor has a potential failure according to the sensor data, using the computer device to transmit a calibration instruction to the sensing device through the cloud server to cause the sensing device to enter a sensor calibration mode; In response to a reference sensor of the same type as the specific sensor being connected to the sensing device, using the sensing device to continuously and regularly receive the specific sensor data and the reference sensor data from the specific sensor and the reference sensor, respectively, to establish a calibration table, wherein each item in the calibration table records a one-to-one correspondence between the specific sensor data and the reference sensor data; Utilizing the sensing device to execute a finite state machine to perform a calibration procedure on each item in the calibration table; and In response to the number of consecutive hits of the correspondence between the reference sensor data and the reference sensor data stored in the specific item in the correction table reaching a predetermined number N, the finite state machine is used to interrupt the correction procedure of the specific item and determine that the specific item is correctable.

7. A sensor data correction method as described in claim 6, wherein in response to the number of consecutive misses of the correspondence between the reference sensor data stored in the specific item in the correction table and the reference sensor data reaching the predetermined number N, the finite state machine is used to interrupt the correction program of the specific item and determine that the specific item cannot be corrected. The sensor data calibration method as claimed in claim 7 , wherein the predetermined number N is equal to 2.

9. The sensor data correction method according to claim 7, further comprising: When the finite state machine determines that the specific item cannot be corrected, the sensing device is used to determine that the specific sensor is invalid, and a sensor failure message is sent to the computer device to remind the manager of the farm to replace the specific sensor.

10. The sensor data calibration method as described in claim 7, when the sensing device determines that all items in the calibration table are calibrable, the sensing device uses the calibration table to calibrate the specific sensor data generated by the specific sensor, and transmits the calibrated specific sensor data to the computer device via the cloud server.

Citation Information

Patent Citations

  • Analog quantity sensor monitoring method and system based on redundant data

    CN104316099A

  • An agriculture temperature and humidity sensor which can be calibrated and is with infrared reception

    CN106768036A