Research on Six-Axis Sensor-Based Step-Counting Algorithm for Grazing Sheep

Sensors (Basel). 2023 Jun 22;23(13):5831. doi: 10.3390/s23135831.

Abstract

Step counting is an effective method to assess the activity level of grazing sheep. However, existing step-counting algorithms have limited adaptability to sheep walking patterns and fail to eliminate false step counts caused by abnormal behaviors. Therefore, this study proposed a step-counting algorithm based on behavior classification designed explicitly for grazing sheep. The algorithm utilized regional peak detection and peak-to-valley difference detection to identify running and leg-shaking behaviors in sheep. It distinguished leg shaking from brisk walking behaviors through variance feature analysis. Based on the recognition results, different step-counting strategies were employed. When running behavior was detected, the algorithm divided the sampling window by the baseline step frequency and multiplied it by a scaling factor to accurately calculate the number of steps for running. No step counting was performed for leg-shaking behavior. For other behaviors, such as slow and brisk walking, a window peak detection algorithm was used for step counting. Experimental results demonstrate a significant improvement in the accuracy of the proposed algorithm compared to the peak detection-based method. In addition, the experimental results demonstrated that the average calculation error of the proposed algorithm in this study was 6.244%, while the average error of the peak detection-based step-counting algorithm was 17.556%. This indicates a significant improvement in the accuracy of the proposed algorithm compared to the peak detection method.

Keywords: behavior classification; grazing sheep; step counting; window peak detection.

MeSH terms

  • Algorithms
  • Analysis of Variance
  • Animals
  • Problem Behavior*
  • Running*
  • Sheep
  • Walking