IoT-Based Multi-Sensor Fusion for Goat Behavioral Pattern Recognition Using K-Means Clustering in a Smart Farming Environment - Yudhistira Pratama; Normalina Napitupulu; Zulhamsyah Fachrurrazi Nasution; Adli Abdillah Nababan (PT FORMOSA CENDEKIA GLOBAL, 2026)
Monitoring goat behavior in commercial farms typically relies on direct observation, which does not scale and misses conditions that develop gradually. This study deployed an eight-sensor IoT network across two zones of a slatted-floor goat pen in North Sumatra, Indonesia, and applied K-Means clustering to 49 days of sensor data. After a systematic data cleaning step that removed sensor dropouts, ADC saturation events, and an isolated methane spike, 213,704 records were retained (98.6% of raw data). K-Means with K=8 on the cleaned dataset yielded a Silhouette Score of 0.297 and Davies-Bouldin Index of 1.177, identifying eight behavioral and environmental states without a dedicated anomaly cluster. Results include two heat stress levels (THI means 90.7 and 92.1), three nocturnal resting states differentiated by waste pit gas concentration, a daytime active-vocal state, and an evening post-feeding fermentation peak.