Skip to main content

Research Repository

Advanced Search

Evaluation of sampling frequency, window size and sensor position for classification of sheep behaviour


Emily Walton

Christy Casey

Jurgen Mitsch

Jorge A.

Juan Yan

Keith A. Ellis

Anthony Winterlich

Professor of Epidemiology & Precision Livestock Informatics


Automated behavioural classification and identification through sensors has the potential to improve health and welfare of the animals. Position of a sensor, sampling frequency and window size of segmented signal data has a major impact on classification accuracy in activity recognition and energy needs for the sensor, yet, there are no studies in precision livestock farming that have evaluated the effect of all these factors simultaneously. The aim of this study was to evaluate the effects of position (ear and collar), sampling frequency (8, 16 and 32 Hz) of a triaxial accelerometer and gyroscope sensor and window size (3, 5 and 7 s) on the classification of important behaviours in sheep such as lying, standing and walking. Behaviours were classified using a random forest approach with 44 feature characteristics. The best performance for walking, standing and lying classification in sheep (accuracy 95%, F-score 91%–97%) was obtained using combination of 32 Hz, 7 s and 32 Hz, 5 s for both ear and collar sensors, although, results obtained with 16 Hz and 7 s window were comparable with accuracy of 91%–93% and F-score 88%–95%. Energy efficiency was best at a 7 s window. This suggests that sampling at 16 Hz with 7 s window will offer benefits in a real-time behavioural monitoring system for sheep due to reduced energy needs.


Walton, E., Casey, C., Mitsch, J., Vázquez-Diosdado, J. A., Yan, J., Dottorini, T., …Kaler, J. (2018). Evaluation of sampling frequency, window size and sensor position for classification of sheep behaviour. Royal Society Open Science, 5(2),

Journal Article Type Article
Acceptance Date Jan 8, 2018
Publication Date Feb 7, 2018
Deposit Date Feb 9, 2018
Publicly Available Date Feb 9, 2018
Journal Royal Society Open Science
Electronic ISSN 2054-5703
Publisher The Royal Society
Peer Reviewed Peer Reviewed
Volume 5
Issue 2
Keywords sheep behaviour, classification algorithm, accelerometer and gyroscope, sensor, signal processing, precision livestock monitoring
Public URL
Publisher URL


171442.full.pdf (608 Kb)

Copyright Statement
Copyright information regarding this work can be found at the following address:

You might also like

Downloadable Citations