ON SENSOR FAULT INSTABILITY PREDICTION FOR THE INTERNET OF AGRICULTURAL THINGS BASED ON LARGEST LYAPUNOV EXPONENT

Original scientific paper This study uses the largest Lyapunov exponent algorithm to predict the fault types in the wireless sensor network of the Internet of Agricultural Things. System fault data are collected from the Internet of Agricultural Things, which is composed of a calibrated TDR soil moisture sensor network, to develop a sensor fault instability prediction model based on the largest Lyapunov exponent algorithm. To verify the applicability of this model in forecasting training samples under various conditions, this study tests and compares such algorithm with the C4.5 algorithm model as a fault data account for different percentages of training samples. The largest Lyapunov exponent instability prediction method is also applied on the training set that mostly comprises normal data. The algorithm achieves a prediction accuracy of 90,43 %, which is 5,55 % higher than that of the C4.5 algorithm (84,88 %). Different algorithms demonstrate a certain degree of adaptability in various application conditions. The largest Lyapunov exponent instability prediction method achieves better results when many accurate samples are used. The results from the application adaptability test show that the sensor fault instability prediction model based on the largest Lyapunov exponent algorithm provides a reliable approach for collecting sensor fault information collection and predicting faults in the Internet of Agricultural Things.


Introduction
The Internet of Things aims to connect the information collection terminal with the Internet as well as to provide information exchange and communication services to its clients through radio frequency identification, infrared sensors, global positioning system, laser scanner, and other information sensing devices according to the agreed protocol in order to realize intelligent recognition, positioning, tracing, monitoring, and management through the Internet.The Internet of Agricultural Things continuously improves the intelligence level of agriculture in order to change the mode of agricultural development, transform and upgrade modern agriculture, promote agricultural production, and increase the income of farmers [1].With encouragement from the government, the Internet of Agricultural Things has been widely used in several agricultural activities in China, such as flower farming [2], water-saving irrigation in precision agriculture [3], soil moisture measurement and prediction [4], pest monitoring and early warning [4], and quality traceability of agricultural products [5].With the continuous development of wireless sensor network applications, sensors are always installed in relatively extreme environments (such as farmlands) to collect data.Given the frequency of information exchanges in the Internet of Agricultural Things, the relatively complicated information transmission environment easily causes instability in the information transmission process.A limited power supply, storage, and calculation capability make the sensor node highly prone to defects.However, predicting the sensor faults in the Internet of Agricultural Things has been rarely investigated in previous literature.The failure testing and prediction of sensors in the Internet of Agricultural Things must be investigated before such sensors can be effectively installed in a complicated environment.
The wireless sensor network fault test methods are usually divided into centralized and distributed methods according to the locations of the main bodies.In the centralized method, the center nodes are physically or logically responsible for monitoring the network as well as for tracking the failed or suspicious nodes.In the distributed method, the nodes are given a certain level of decision before communicating with the center node.In this light, less information will be transmitted to the center node if sensor node can make more decisions, thereby reducing the communication volume.Both the center and sensor nodes are restricted by the limited energy state of the wireless sensor network.Energy consumption, communication cost, fault detection rate, and false alarm rate often fail to satisfy the requirements for practical application.To address this problem, this study introduces the largest Lyapunov exponent algorithm, which can effectively typify the evolution of variables over time.This model predicts sensor fault instability in the Internet of Agricultural Things by combining historical data with real-time data in order to reduce the amount of energy that is consumed during the wireless sensor node fault detection and to improve the accuracy of the failed node identification.The applicability of the largest Lyapunov exponent algorithm is then compared with that of the C4.5 algorithm, which has a higher accuracy and a comprehensible classification regulation.
The C4.5 algorithm has several advantages, such as high accuracy, a generated classification regulation that can be easily realized, and high representativeness of prediction and classification algorithms.However, this algorithm also has obvious disadvantages.For example, multiple sequential scanning and sorting processes are required for the dataset during the tree construction process, thereby lowering the efficiency of the C4.5 algorithm.In addition, the C4.5 algorithm is only suitable for a dataset with enough memory.The program cannot run when the size of the training set is beyond the memory capacity.The largest Lyapunov Exponent algorithm has several advantages, which include its capability to extract data from a chaotic time series, high accuracy, strong anti-noise capacity, short computing time, small memory space, and capability to achieve an online algorithm.However, the largest Lyapunov exponent algorithm has a larger sensitivity of initial value.This study aims to improve such algorithm to induce its implicit function for optimization.By performing a series of experiments, this study compares the largest Lyapunov exponent algorithm with the C4.5 algorithm in terms of adaptability and reliability in collecting sensor fault information as well as predicting faults in the Internet of Agricultural Things.

The largest Lyapunov exponent algorithm
A time series refers to the collected information that is sent from the wireless sensor node of the Internet of Agricultural Things to the communication server.According to the observed time series, the largest Lyapunov exponent of the system can be obtained by reconstructing the phase space.The reconstruction process is outlined as follows [6]: Suppose that {X k } is the measured time series and that k = 1, 2,…, N; N refers to the number of sampling points.To reconstruct time series {X k }, the reconstruction result is recorded as ), where n = 1, 2,…, N -m + 1, τ = KΔt refers to time delay, Δt refers to collection interval, K refers to any integer, and m refers to the dimension of the reconstructed phase space.

Randomly select { ( ), ( ), ( [ 1] )} x t x t
x t m t t + + −  in the reconstructed phase space, and find the nearest point The ratios of the distance in each calculating interval within the phase space are calculated and then summed to obtain the largest Lyapunov exponent of the system, which is expressed as follows [6]: where Δ refers to the calculating interval in the reconstructed phase space and M refers to the total iteration times.
For time series {X k }, the largest Lyapunov exponent, k = 1, 2,…, N, is defined as follows [7,8]: To obtain λ max without orthogonalization, Hantz is introduced as follows [9]: where w u (t) refers to the local characteristic vector corresponding to the largest Lyapunov exponent λ max .
An m dimension Delay Coordinate y t = (x t−m+1 ,…, x t ) is selected from x(t), and all delay vectors in the ε neighbourhood of y t are used to construct a set of U t .An adjacent vector (track) of the reference vector (track), y t , y t  U t , is defined as follows [7,8]: .) , , ( The following expression is used to average all times t [7,8] The largest Lyapunov exponent to be calculated λ max is just the slope of S(τ) by the change of τ (τ in the proper range).
The convergence problem wherein the initial state is orthogonal to the target state must be solved to enhance the universality of the largest Lyapunov exponent algorithm.An implicit function perturbing control item is introduced to solve the convergence problem in the case of multi-control Hamiltonian system degeneration.The derivation of the control law and convergence of the control system becomes more complicated for a multicontrol Hamiltonian system.When designing the control law based on Lyapunov stability theory, an implicit function perturbing control item is introduced in the control law.Therefore, the first derivative of the Lyapunov function contains the first derivative term of the implicit function perturbing control item, which makes the symbol of such term difficult to judge.Therefore, this term must be removed.At this point, the problem becomes more complicated than when a perturbing control item is introduced in a single-control Hamiltonian system.Some mathematical techniques are needed.The target state is expanded to the superposition state by introducing a constant perturbing control item in the control law.This method is then expanded to the orthogonal case of the initial state to the target state by designing a proper control law.
The N-level closed quantum system is described by the following Schrdinger equation: where H 0 refers to the Hamiltonian in the system, H k refers to the control Hamiltonian, H 0 and H k do not contain time and are Hermitian, and u k (t) refers to the control laws that must be designed and which scalar quantities must be achieved.The eigenstates and values of H 0 are recorded as With regard to the Schrdinger equation, people often study the transfer problem from the arbitrary initial state to the eigenstate in the case of non-degeneration, and rarely study the convergence problem from the arbitrary pure state to the superposition and target states.In order to achieve the state transition of the control system from the target state f ψ to the superposition state, we may introduce the constant perturbing item η k in the control law.Thus, the control system model will be changed as follows [10,11,12]: where v k (t) and η k refer to the control laws that must be designed.By adding η k , f ψ becomes the eigenstate of , η which may be considered as the inner Hermitian of the control system.The target state f ψ becomes the eigenstate of H' 0 to meet the following equation: where λ' f refers to the eigenvalue of the target state,

Experiments and results
The wireless sensor network data collection system of the Internet of Agricultural Things comprises calibrated TDR soil moisture sensors [13], which are used to verify the above algorithm.The wireless sensor network node fault types include additional fault, fixed fault, shortcircuit fault, multiple fault, and accuracy drop fault.This study focuses on the instability that is generated by the wireless sensor node fault.
The experimental data were collected between April 1, 2010 and September 30, 2010 from the network nodes of 62 wireless sensors that were installed in a farmland.The collected data covered the temperature, relative humidity, and pressure of the air, as well as the temperature of the land surface and the soil moisture.The data were collected in one-hour intervals.The data collection was not performed in April 14, May 11, May 5, June 3, June 30, July 21, August 7, August 22, and September 17 because of battery replacement, failed node replacement, and routine inspections.Therefore, the data collection was performed in 174 days.A total of 4,176 data were collected, of which 447 were incomplete because of various reasons.
Experimental database made use of the collected data with five kinds of complete attributes to form the data base.A total of 3,729 complete data were calibrated through manual inspection.The status of the wireless sensor is divided into six types, namely, normal, additional fault, fixed fault, short-circuit fault, multiple fault, and accuracy drop fault.Several other types of wireless sensor network nodes exist, the wireless sensor network technology is still at its experimental stage, and the real industrial production scale has not been formed yet.Therefore, the number of failures remains higher than the normal value.A total of 2,784 data were manually calibrated as normal, 178 data as additional fault, 407 data as fixed fault, 149 data as short-circuit fault, and 211 data as accuracy drop fault.
A total of 945 fault data were selected from the experimental database and were used as test samples.The fault data in Tab. 1 were manually calibrated and accurately diagnosed.Fault percentage refers to the percentage of different calibration modes in the fault data.Test accuracy number refers to the accurate number of fault data, which is determined through system predictions and by judging the diagnosis type.Test accuracy rate refers to the ratio of the test accuracy number to the total fault number.Accuracy of the class refers to the proportion of the judgment accuracy in the fault types of the class.The accuracy drop fault achieved the highest test accuracy rate.The largest Lyapunov exponent instability predicting method was used to predict the fault data, achieving an accuracy rate of 77,46 %.The model achieved high accuracy rates in forecasting fixed and accuracy drop faults, but attained lower accuracy rates in forecasting additional and short-circuit faults.The method also achieved a higher forecast accuracy rate when used on a large sample quantity.To verify further the applicability of the largest Lyapunov exponent algorithm in forecasting instability, this study excavates fault diagnosis association rules based on the C4.5 algorithm to establish a fault diagnosis model, which is subsequently compared with the largest Lyapunov exponent.
All fault data were used as the training samples for the C4.5 algorithm.This algorithm was used to excavate 22 association rules with complete attributes.A total of 945 fault data were selected from the experimental database and were used as test samples.The 22 excavated association rules with complete attributes were used as the fault diagnosis rules to test all the fault data (Tab.2).The definitions of fault data, fault percentage, test accuracy rate, and accuracy of the class are similar to those presented in Tab. 1. Number of test accuracy is used to judge the diagnosis type through the association rule.The largest Lyapunov exponent instability predicting method demonstrated a slightly higher prediction accuracy rate than the C4.5 algorithm.The accuracy of this model was also higher than that of the C4.5 algorithm when extracting fault data under the association rule for fault type identification.However, most of the collected data were considered normal in practical application.The increasing proportion of normal data in the training set may affect the overall diagnosis result.Given that most data in practical applications are considered normal, normal data must be added in the training sample to meet the requirements for practical application.Similarly, given the rare nature of fault data, those data that contain 60 % of all fault data must be randomly extracted and used as training samples for the C4.5 algorithm.These two algorithms used all the data as test samples.The test results are shown in Tabs. 3 and 4.
The prediction accuracy of the largest Lyapunov exponent instability predicting method becomes higher when applied on all data rather than only on fault data because such method also achieves a higher prediction accuracy rate when the sensor network for the Internet of Agricultural Things is stably running.However, the prediction accuracy rate of such method on various fault types is lower than that on fault data.By using the C4.5 algorithm, the test accuracy rate of the fault data and the accuracy of the class decrease to a certain degree after the proportion of normal data in the training sample is increased.This phenomenon may be attributed to the formation of additional association rules based on normal samples when normal data account for a larger proportion of the entire sample.Therefore, the fault diagnosis accuracy rate also decreases when only fault data are used as training samples.Given their significant amount, normal data are required during practical applications to form normal judgments.A diagnosis model that is formed by training data with additional normal samples can achieve a diagnosis accuracy of 84,88 %, which satisfies the requirement of practical application.The effects of the two algorithms in practical applications were tested by comparing their results using the same training set.The proportions of the fault data in

Figure 1
Figure 1 Prediction results of the two algorithms with different proportions of fault data

Table 2
Fault diagnosis of the test samples (fault data) based on the C4.5 algorithm

Table 3
Fault diagnosis results of increasing the amount of normal data under nonlinear instabilities based on the largest Lyapunov exponent

Table 4
Fault diagnosis results of increasing the amount of normal data based on the C4.5 algorithm