# Using Acceleration Data to Automatically Detect the Onset of Farrowing in Sows

^{1}

^{2}

^{3}

^{4}

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Materials and Methods

#### 2.1. Animals and Housing

#### 2.2. Sensor Systems

_{t}, y

_{t}, z

_{t}) at time t, actively, autonomously, and unidirectionally to any of the four installed receivers. The predefined sampling rate of 1 Hz for the present data set resulted from limitations in battery life. Higher sampling rates (5 or 10 Hz) reduced battery life enormously, while sampling rates lower than 1 Hz reduced analysis accuracy. Further information on the sensor system can be found in [13].

#### 2.3. Acceleration Transformation Procedure

_{t}, y

_{t}, and z

_{t}triples of acceleration at time t as follows:

#### 2.4. CUSUM Control Charts

^{+}) for the acceleration index (X) at time point i is calculated according to the following formula:

- Distribution characteristic: standard deviation, variance, and variation of 1st, 2nd, and 3rd order.
- Acceleration index: Orig, Diff, Quot, Over, CumDi, CumQ, CumAv.
- Time period: 10, 30, 60 min.
- Interval of moving average, depending on time period (10 min: 1, 5, 9, 13, 19, and 25; 30 min: 1, 3, 5, and 9; 60 min: 1, 3, and 5).
- Allowance value k: 0.1, 0.25, 0.5, 1, 1.5, … 12.5, 15, 20, 25, and 30.
- Smoothing value h: 4, …, 10.
- Parameterization period (Day −4, Day −5, and Days −4 and −5).

## 3. Results

## 4. Discussion

## 5. Conclusions

## Acknowledgments

## Author Contributions

## Conflicts of Interest

## References

- Oliviero, C.; Kothe, S.; Heinonen, M.; Valros, A.; Peltoniemi, O. Prolonged duration of farrowing is associated with subsequent decreased fertility in sows. Theriogenology
**2013**, 79, 1095–1099. [Google Scholar] [CrossRef] [PubMed] - Oliviero, C.; Pastell, M.; Heinonen, M.; Heikkonen, J.; Valros, A.; Ahokas, J.; Vainio, O.; Peltoniemi, O.A.T. Using movement sensors to detect the onset of farrowing. Biosyst. Eng.
**2008**, 100, 281–285. [Google Scholar] [CrossRef] - Cornou, C.; Lundbye-Christensen, S.; Kristensen, A.R. Modelling and monitoring sows’ activity types in farrowing house using acceleration data. Comput. Electron. Agric.
**2011**, 76, 316–324. [Google Scholar] [CrossRef] - Erez, B.; Hartsock, T.G. A microcomputer-photocell system to monitor periparturient activity of sows and transfer data to a remote location. J. Anim. Sci.
**1990**, 68, 88–94. [Google Scholar] [CrossRef] [PubMed] - Pastell, M.; Hietaoja, J.; Tiusanen, J.; Yunm, J.; Valros, A. A model to detect farrowing based on sow activity. In Proceedings of the International Conference of Agricultural Engineering (AgEng 2014), Zurich, Switland, 6–10 July 2014. [Google Scholar] [CrossRef]
- Haskell, M.J.; Hutson, G.D. The pre-farrowing behaviour of sows with access to straw and space for locomotion. Appl. Anim. Behav. Sci.
**1996**, 49, 375–387. [Google Scholar] [CrossRef] - Illmann, G.; Chaloupková, H.; Neuhauserová, K. Effect of pre- and post-partum sow activity on maternal behaviour and piglet weight gain 24 h after birth. Appl. Anim. Behav. Sci.
**2015**, 163, 80–88. [Google Scholar] [CrossRef] - Mainau, E.; Dalmau, A.; Ruiz-de-la-Torre, J.L.; Manteca, X. Validation of an automatic system to detect position changes in puerperal sows. Appl. Anim. Behav. Sci.
**2009**, 121, 96–102. [Google Scholar] [CrossRef] - Cornou, C.; Lundbye-Christensen, S. Modeling of sows diurnal activity pattern and detection of parturition using acceleration measurements. Comput. Electron. Agric.
**2012**, 80, 97–104. [Google Scholar] [CrossRef] - Aparna, U.; Juul Pedersen, L.; Jørgensen, E. Hidden phase-type Markov model for the prediction of onset of farrowing for loose-housed sows. Comput. Electron. Agric.
**2014**, 108, 135–147. [Google Scholar] [CrossRef] - Pastell, M.; Hietaoja, J.; Yun, J.; Tiusanen, J.; Valros, A. Predicting farrowing of sows housed in crates and pens using accelerometers and cusum charts. Comput. Electron. Agric.
**2016**, 127, 197–203. [Google Scholar] [CrossRef] - Manteuffel, C.; Hartung, E.; Schmidt, M.; Hoffmann, G.; Schön, P.C. Towards qualitative and quantitative precidtion and detection of parturition onset in sows using light barriers. Comput. Electron. Agric.
**2015**, 116, 201–210. [Google Scholar] [CrossRef] - Pichler, M.; Rudic, B.; Breitenberger, S.; Auer, W. Robust positioning of livestock in harsh agricultural environments. In Proceedings of the 14th Mechatronics Forum International Conference (Mechatronics 2014), Karlstad, Sweden, 16–18 June 2014; De Vin, L.J., Ed.; Curran: Red Hook, NY, USA, 2014; pp. 527–534. [Google Scholar]
- Montgomery, D.C. Statistical Process Control: A Modern Introduction; John Wiley & Sons, Inc.: Hoboken, NJ, USA, 2009. [Google Scholar]
- Hartsock, T.G.; Barczewski, R.A. Prepartum behavior in swine: Effects of pen size. J. Anim. Sci.
**1997**, 75, 2899–2904. [Google Scholar] [CrossRef] [PubMed] - Rushen, J.; Robert, S.; Farmer, C. Evidence of a limited role for prolactin in the preparturient activity of confined gilts. Appl. Anim. Behav. Sci.
**2001**, 72, 309–319. [Google Scholar] [CrossRef] - Harris, M.J.; Gonyou, H.W. Increasing available space in a farrowing crate does not facilitate postural changes or maternal responses in gilts. Appl. Anim. Behav. Sci.
**1998**, 59, 285–296. [Google Scholar] [CrossRef]

**Figure 1.**Sows were equipped with an ear tag (

**a**,

**b**) including an accelerometer. The tag actively sent their information to the receivers (

**c**).

**Figure 2.**Exemplary distribution characteristics for one sow from Day −4 until onset of farrowing at 2:11 p.m. on Day 0 (corresponds to Hour 0 in the figures) for one sow.

**Figure 3.**Exemplary acceleration indices of one sow based on the distribution characteristic variance for a time period of 60 min and a range of the moving average of 1 for one sow.

**Figure 4.**Time intervals 10, 30, and 60 min exemplary for the original values (Orig:

**a**,

**b**,

**c**) and the acceleration index CumDi (

**d**,

**e**,

**f**) for the distribution parameter 1st variation with a range of the moving average of 1 for one sow.

**Figure 5.**The range (1, 3, 5) for the moving average in acceleration indices Diff (

**a**,

**b**,

**c**) and CumDi for 60 min period (

**d**,

**e**,

**f**) of the distribution characteristic variance for one sow. Note that 0 indicates the onset of farrowing.

**Figure 6.**Cumulative sum of the number of sows detected within the whole prediction period exemplarily for the 10 and 60 min period. Time window from Hour −6 to Hour −12 is marked.

**Figure 7.**Influence of the k value on the alarm time (Chart exceeds control limit (CL)) of the CUSUM chart (h = 4) exemplarily for two sows and the acceleration index 1st variation and the distribution characteristic CumDi with the time interval of 60 min and a range of the moving average of 1. Note that, for a better presentation, the CUSUM statistic is transformed on a log scale.

**Table 1.**Maximal frequency of sows detected (%) for the onset of farrowing within 12 or 48 h before the onset of farrowing (first alarm for each sow) per type of acceleration index (Orig, … CumAv), distribution characteristic (Std, …3rd variation), and time period (10, 30, 60 min) for parameterization period of Day −4 independent of the interval length of the moving average and the k and h values. Bold font indicates the best performance.

Index Time Period | Orig | Diff | Quot | Over | CumDi | CumQ | CumAv | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|

N to find | 20 | 19 | 19 | 19 | 19 | 19 | 19 | ||||||||

Time period | 12 h | 48 h | 12 h | 48 h | 12 h | 48 h | 12 h | 48 h | 12 h | 48 h | 12 h | 48 h | 12 h | 48 h | |

Std | 60 | 70.0 | 90.0 | 78.9 | 94.7 | 63.2 | 89.5 | 63.2 | 89.5 | 78.9 | 100.0 | 68.4 | 94.7 | 73.7 | 94.7 |

30 | 65.0 | 85.0 | 73.7 | 89.5 | 57.9 | 84.2 | 57.9 | 84.2 | 73.7 | 100.0 | 63.2 | 89.5 | 73.7 | 94.7 | |

10 | 50.0 | 80.0 | 63.2 | 84.2 | 52.6 | 78.9 | 47.4 | 78.9 | 73.7 | 100.0 | 63.2 | 84.2 | 73.7 | 94.7 | |

Var | 60 | 70.0 | 90.0 | 78.9 | 94.7 | 52.6 | 94.7 | 57.9 | 89.5 | 78.9 | 100.0 | 73.7 | 94.7 | 78.9 | 100.0 |

30 | 60.0 | 85.0 | 73.7 | 89.5 | 42.1 | 78.9 | 52.6 | 78.9 | 78.9 | 100.0 | 63.2 | 89.5 | 78.9 | 94.7 | |

10 | 50.0 | 80.0 | 57.9 | 84.2 | 42.1 | 78.9 | 42.1 | 73.7 | 78.9 | 100.0 | 52.6 | 78.9 | 78.9 | 94.7 | |

1st-var | 60 | 60.0 | 90.0 | 78.9 | 94.7 | 73.7 | 94.7 | 73.7 | 94.7 | 84.2 | 100.0 | 73.7 | 94.7 | 73.7 | 94.7 |

30 | 50.0 | 85.0 | 73.7 | 89.5 | 68.4 | 89.5 | 68.4 | 89.5 | 78.9 | 100.0 | 68.4 | 89.5 | 73.7 | 94.7 | |

10 | 45.0 | 75.0 | 57.9 | 84.2 | 57.9 | 89.5 | 57.9 | 94.7 | 78.9 | 100.0 | 63.2 | 89.5 | 73.7 | 94.7 | |

2nd-var | 60 | 65.0 | 90.0 | 78.9 | 94.7 | 57.9 | 94.7 | 63.2 | 94.7 | 78.9 | 100.0 | 68.4 | 94.7 | 73.7 | 94.7 |

30 | 55.0 | 85.0 | 68.4 | 89.5 | 47.4 | 84.2 | 47.4 | 84.2 | 78.9 | 100.0 | 52.6 | 89.5 | 73.7 | 94.7 | |

10 | 50.0 | 80.0 | 57.9 | 84.2 | 36.8 | 78.9 | 42.1 | 78.9 | 78.9 | 100.0 | 52.6 | 78.9 | 73.7 | 94.7 | |

3rd-var | 60 | 60.0 | 90.0 | 68.4 | 94.7 | 41.1 | 84.2 | 36.8 | 73.7 | 78.9 | 94.7 | 52.6 | 89.5 | 78.9 | 94.7 |

30 | 55.0 | 85.0 | 63.2 | 89.5 | 26.3 | 68.4 | 31.6 | 78.9 | 73.7 | 94.7 | 47.4 | 78.9 | 73.7 | 94.7 | |

10 | 45.0 | 85.0 | 57.9 | 84.2 | 31.6 | 68.4 | 26.3 | 68.4 | 73.7 | 94.7 | 42.1 | 73.7 | 73.7 | 94.7 |

**Table 2.**Maximal detection rate (%) for the onset of farrowing within 12 h before the onset of farrowing (first alarm for each sow) per type of acceleration index (Diff, …, CumQ), parameterization period (m4: Day −4, m5: Day −5, m45 = Days −4 and −5), and interval length of the moving average (Int

_{x}, x = ±1,5,9,13,19,25) for the distribution characteristic 1st variation and 10 min period independent of the k and h values.

Int_{1} | Int_{5} | Int_{9} | Int_{13} | Int_{19} | Int_{25} | ||
---|---|---|---|---|---|---|---|

Diff | m4 | 42.1 | 47.4 | 52.6 | 57.9 | 57.9 | 57.9 |

m5 | 44.4 | 44.4 | 55.6 | 55.6 | 55.6 | 55.6 | |

m45 | 44.4 | 44.4 | 55.6 | 55.6 | 55.6 | 55.6 | |

Quot | m4 | 36.8 | 36.8 | 47.4 | 57.9 | 52.6 | 57.9 |

m5 | 38.9 | 44.4 | 38.9 | 44.4 | 50.0 | 50.0 | |

m45 | 44.4 | 44.4 | 44.4 | 50.0 | 50.0 | 50.0 | |

Over | m4 | 31.6 | 36.8 | 52.6 | 52.6 | 52.6 | 57.9 |

m5 | 44.4 | 44.4 | 44.4 | 44.4 | 44.4 | 50.0 | |

m45 | 38.9 | 44.4 | 38.9 | 50.0 | 50.0 | 50.0 | |

CumDi | m4 | 78.9 | 78.9 | 78.9 | 78.9 | 78.9 | 78.9 |

m5 | 55.6 | 55.6 | 55.6 | 55.6 | 61.1 | 61.1 | |

m45 | 72.2 | 72.2 | 72.2 | 66.6 | 66.6 | 66.6 | |

CumQ | m4 | 36.8 | 36.8 | 42.1 | 52.6 | 63.2 | 63.2 |

m5 | 44.4 | 38.9 | 44.4 | 55.6 | 50.0 | 55.6 | |

m45 | 38.9 | 38.9 | 44.4 | 50.0 | 50.0 | 55.6 |

© 2018 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Traulsen, I.; Scheel, C.; Auer, W.; Burfeind, O.; Krieter, J.
Using Acceleration Data to Automatically Detect the Onset of Farrowing in Sows. *Sensors* **2018**, *18*, 170.
https://doi.org/10.3390/s18010170

**AMA Style**

Traulsen I, Scheel C, Auer W, Burfeind O, Krieter J.
Using Acceleration Data to Automatically Detect the Onset of Farrowing in Sows. *Sensors*. 2018; 18(1):170.
https://doi.org/10.3390/s18010170

**Chicago/Turabian Style**

Traulsen, Imke, Christoph Scheel, Wolfgang Auer, Onno Burfeind, and Joachim Krieter.
2018. "Using Acceleration Data to Automatically Detect the Onset of Farrowing in Sows" *Sensors* 18, no. 1: 170.
https://doi.org/10.3390/s18010170