In the traditional dairy farming industry,we mainly rely on manual detection methods to detect and record the estrus and health status of dairy cows.However,with the rapid development of large-scale,intensive and intelligent aquaculture,the traditional manual inspection method will not meet the needs of large-scale aquaculture.In recent years,domestic and foreign scholars have mainly explored the estrus detection of dairy cows by using information technology,At present,there are commercial products for estrus detection of dairy cows abroad.This kind of product is mainly based on the detection of cow’s movement steps as the basis of cow estrus,However,the change of dairy cow’s posture is neglected because it only detects the moving steps of dairy cows.This kind of products can only detect the oestrus of dairy cows,and can not make an effective judgment on the health status of dairy cows through the change of the movement posture of dairy cows.In this paper,the attitude recognition of dairy cows based on micro-electro mechanical system(MEMS)sensors is studied.The attitude information of dairy cows is collected by using the MEMS sensor,and the attitude angle of dairy cows is calculated by multi-sensor data fusion algorithm.Then,according to the time and frequency domain characteristics of dairy cow’s attitude,an algorithm of dairy cow’s attitude recognition is designed to achieve the purpose of identifying dairy cow’s attitude.Firstly,the hardware platform of cow motion attitude acquisition system based on MEMS sensor is designed.The platform mainly includes attitude recognizer(sensor acquisition node with three-axis accelerometer,three-axis gyroscope and magnetometer sensor as the main body)and LoRa gateway.LoRa wireless network transmission scheme is used to realize the communication between multiple attitude recognizers and LoRa gateway.At the same time,SD card and 4G module are used to solve the problem of local storage and upload of data to the server.Then,the errors of three-axis accelerometer,three-axis gyroscope and magnetometer sensors are analyzed,and the error model is established.The error correction of threeaxis accelerometer and magnetometer sensors is carried out by using the least square ellipsoid fitting algorithm.Meanwhile,the mean value method and sliding filter algorithm are used to process the bias error and pulse error of the three-axis gyroscope.In order to solve the attitude angle of dairy cows,this paper designs a multi-sensor data fusion algorithm based on Extended Kalman Filter(EKF)and complementary filter.Finally,the experiment was designed to wear the cow posture recognizer under the neck of the cow and collect 16 dairy cows’ motion posture data in the dairy farm of Taige.The dairy cow attitude data collected in MATLAB environment were analyzed in time domain and frequency domain,and the attitude angle was calculated.Based on the attitude characteristics,a decision tree algorithm for dairy cow attitude recognition was designed.The experimental results show that the recognition accuracy of the cow posture recognition algorithm designed in this paper is higher than 91% for resting state(standing and lying),scratching and lying.The recognition accuracy of feeding,walking and standing movements of cows is relatively low,but the recognition accuracy can also be guaranteed to be above 86%.The experimental results show that the algorithm achieves the recognition of seven kinds of cow postures。... |