Abstract:
In the dairy farming industry, there is a close relationship between estrus and the crawling behavior of dairy cows. Timely detection of the crawling behavior of dairy cows is an important issue to be considered to detect the estrus of cows and improve breeding income. Due to the traditional wearable sensing method is easy to cause animals' stress response and generally detrimental to their welfare, it is necessary to find a new way. In 802.11 a/g/n standards, channel response can be partially extracted from off-the-shelf Orthogonal Frequency Division Multiplexing (OFDM) receivers in the format of the Channel State Information (CSI), which reveals a set of channel measurements depicting the environment changes. To reliably detect and effectively recognize the crawling behavior of dairy cows and avoid stress response in a natural farming environment, a method based on the CSI of Wi-Fi signals was proposed in this study. Firstly, in the breeding shed of about 150 m2, a wireless router was used as the signal transmitter, and a computer equipped with Intel 5300 wireless Network Interface Card (NIC) was used as the signal receiver to set up a Multiple Input and Multiple Output (MIMO) wireless communication system, which could be used to obtain dairy cows' motion state data in the format of the CSI. Secondly, the obtained CSI series data was preprocessed step by step (i) the CSI values of 30 subcarriers in each radio beam were aggregated into one by using the algorithm of carrier aggregation so that the module of signal jump detection could be run; (ii) the environmental noise caused by factors such as temperature and shed layout were filtered by using the algorithm of moving weighted average filtering; (iii) based on the algorithm of local outlier factor, a signal jump detection module was designed to find out the beginning and end time of the dairy cows' motion in each CSI sequence fragment. Thirdly, the characteristics of CSI sequences were designed and extracted to construct a dataset containing 8 127 samples of three types of cows' movements. Finally, given the advantages and recent success of recurrent neural networks in the domains of time series, a multi-classification recognition model was build based on the Long Short Term Memory (LSTM) network. The LSTM network is constructed with an 8-layer architecture and was trained by 5 630 samples in the dataset. Through repeated training model and modification of network parameters, a set of optimized network parameters was finally obtained. To evaluate the model, the indices of classification accuracy and Kappa coefficient were defined. Meanwhile, the remaining 2 497 samples in the dataset were fed into the model to verify its performance. The test result showed that (i) the proposed method reliably captured the CSI series signal fragments containing dairy cows' movements; (ii) the validity and accuracy of the model were closely related to the model structure and the quality of the dataset. Generally, the higher the number of layers in the network and the higher the quality of the dataset, the better performance of the model can be achieved; (iii) when the LSTM network adopts an 8-layer structure and trained under specific parameters setting, the Kappa coefficient of the trained model on the test set was 0.934 1, and the classification accuracy was 96.67%. Based on the channel state information of the Wi-Fi signal and combined with the machine learning method, a high-performance behavior recognition model can be constructed in specific application fields. The key to the problem lies in the construction of the dataset and the careful tuning of the model. This study introduced wireless sensing technology based on the Wi-Fi signal into the field of agricultural informatization, the results could expand the technical means of animal behavior monitoring and provide a reference for the application of wireless sensing technology in intelligent agriculture.