# An Approach towards Motion-Tolerant PPG-Based Algorithm for Real-Time Heart Rate Monitoring of Moving Pigs

^{1}

^{2}

^{3}

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Materials and Methods

#### 2.1. Experimental Setup and Measurements

^{−1}i.m.) and Atropine (0.04–0.08 mg.kg

^{−1}i.m.) were used. The timing of this part of the experiment was 60 min after the awakening procedures of the anaesthetised pig took place. This time course of 60 min was divided into three time slots, 20 min each. For each time slot, the PPG sensor probe was placed on three different anatomical sight/locations of the test pig (Figure 1), namely ear, upper tail and left back leg (below the knee). These locations of the pig′s body were chosen because of their higher cutaneous perfusion, and being a place where body fat is low yet still suitable to place the sensor probe in practice.

^{2}total surface area. The duration of the test was 60 min in total. During the whole period of the test, continuous medical and ethological observations were performed by the trained staff (Laboratory Animal Science, Hannover Medical School, Hannover). Throughout the test period, it was noticed that the pig was freely moving and playing, with no events of laying on the floor, drowsiness or stress.

#### 2.1.1. Measurements and Sensors

#### PPG Signal

#### Gold Standard (ECG Signal)

^{®}ECG 3-channels (Figure 3b) Loop/Event recorder (IEM GmbH; Stolberg, Germany). It is an on-body portable ECG recorder, with three electrodes to stick on to the skin. The recorded ECG signal is automatically transferred from the BEAM

^{®}via Bluetooth to a smartphone, and is forwarded from there to a secure database. The BEAM

^{®}recorded the ECG data every 0.6 s.

#### 2.2. Signal Processing and Heart Rate Extraction

#### 2.2.1. Pre-Processing of PPG Signals

#### 2.2.2. Wavelet Analysis and Cardiogenic Signal Reconstruction

#### Continuous Wavelet Transform Method

- Compute the discrete Fourier transform (DFT) of the analysed signal $x\left(n\right)$, which includes $N$ samples, using Fast Fourier Transform (FFT) as follows:$$\widehat{x}\left(k\right)={{\displaystyle \sum}}_{n=0}^{N-1}x\left(n\right){e}^{-i\frac{2\pi}{N}nk},k=0,1,2\cdots N-1$$
- Obtain the DFT ($\widehat{\psi}$) of the analysing wavelet ($\psi $) at the appropriate angular frequencies as follows:$$\widehat{\psi}\left(k\right)={{\displaystyle \sum}}_{n=0}^{N-1}\psi \left(n\right){e}^{-i\frac{2\pi}{N}nk},k=0,1,2\cdots N-1$$
- Obtain the DFT of the analysing wavelet $\psi \left(n\right)$ at different scales.

#### 2.2.3. Signal Quality Indices (SQIs)

- Perfusion index (${P}_{SQI}$) is defined as the ratio of the pulsatile signal component to the non-pulsatile or static blood flow in the peripheral tissue. In other words, it is the difference in the amount of light absorbed by the pulse when light is transmitted through the finger [9], which can be defined as follows:$${P}_{SQI}=\left[\left({X}_{max}-{X}_{min}\right)/\left|\overline{x}\right|\right]\times 100$$
- Skewness index (${S}_{SQI}$) is a measure of the symmetry/asymmetry of a probability distribution of the signal about its mean, which is defined as:$${S}_{SQI}=\raisebox{1ex}{$1$}\!\left/ \!\raisebox{-1ex}{$N$}\right.{\displaystyle \sum}_{n=1}^{N}{\left[{x}_{n}-{\widehat{\mu}}_{x}/\sigma \right]}^{3}$$
- Signal to Noise ratio ($S{N}_{SQI}$) compares the level of a desired signal (pulsatile cardiogenic signal) to the level of background noise [9], and is given by$$S{N}_{SQI}=\frac{{\mathsf{\sigma}}^{2}{}_{\mathrm{x}}}{{\mathsf{\sigma}}^{2}{}_{\mathrm{noise}}}$$

#### 2.2.4. Peak Detection and Heart Rate Calculation

## 3. Results and Discussion

#### 3.1. Decoupling of the Pulse Wave in the Anaesthetised Pig

#### 3.1.1. Scales Selection

#### 3.1.2. Mother Wavelet Selection

#### 3.1.3. Assessment of PPG Signal Quality

#### 3.2. Heart Rate Estimation Based on Measured PPG From the Non-Anaesthetised (Moving) Pig

## 4. Conclusions

## Author Contributions

## Funding

## Conflicts of Interest

## References

- Kovacs, L.; Jurkovich, V.; Bakony, M.; Szenci, O.; Potì, P.; Tözsér, J. Welfare implication of measuring heart rate and heart rate variability in dairy cattle: literature review and conclusions for future research. Animal
**2013**, 8, 316–330. [Google Scholar] [CrossRef] [PubMed] [Green Version] - Hopster, H.; Blokhuis, H. Validation of a heart-rate monitor for measuring a stress response in dairy cows. Can. J. Anim. Sci.
**1994**, 74, 465–474. [Google Scholar] [CrossRef] - Von Holst, D. The Concept of Stress and Its Relevance for Animal Behavior. Adv. Study Behav.
**1998**, 27, 1–131. [Google Scholar] - Ivanov, K.P. The development of the concepts of homeothermy and thermoregulation. J. Therm. Boil.
**2006**, 31, 24–29. [Google Scholar] [CrossRef] - Whittow, G.C.; Tazawa, H. The Early Development of Thermoregulation in Birds. Physiol. Zool.
**1991**, 64, 1371–1390. [Google Scholar] [CrossRef] - Youssef, A.; Exadaktylos, V.; Berckmans, D. Modelling and quantification of the thermoregulatory responses of the developing avian embryo: Electrical analogies of a physiological system. J. Therm. Boil.
**2014**, 44, 14–19. [Google Scholar] [CrossRef] - Nie, L.; Berckmans, D.; Wang, C.; Li, B. Is Continuous Heart Rate Monitoring of Livestock a Dream or Is It Realistic? A Review. Sensors
**2020**, 20, 2291. [Google Scholar] [CrossRef] - Von Borell, E. Heart rate variability as a measure of autonomic regulation of cardiac activity for assessing stress and welfare in farm animals—A review. Physiol. Behav.
**2007**, 92, 293–316. [Google Scholar] [CrossRef] - Elgendi, M. Optimal Signal Quality Index for Photoplethysmogram Signals. Bioengineering
**2016**, 3, 21. [Google Scholar] [CrossRef] [PubMed] [Green Version] - Youssef, A.; Viazzi, S.; Exadaktylos, V.; Berckmans, D. Semi-invasive, non-contact measurements of chicken embryo heart rate using video imaging and signal processing. In Proceedings of the 6th European Conference on Precision Livestock Farming, Leuven, Belgium, 10–12 September 2013. [Google Scholar]
- Lee, Y.; Han, H.; Kim, J. Influence of motion artifacts on photoplethysmographic signals for measuring pulse rates. In Proceedings of the 2008 International Conference on Control, Automation and Systems, Seoul, Korea, 14–17 October 2008; pp. 962–965. [Google Scholar]
- Jang, D.-G.; Kwon, U.K.; Yoon, S.K.; Park, C.; Ku, Y.; Noh, S.W.; Kim, Y.H. A Simple and Robust Method for Determining the Quality of Cardiovascular Signals Using the Signal Similarity. In Proceedings of the 2018 40th Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBC), Honolulu, HI, USA, 17–21 July 2018; pp. 478–481. [Google Scholar]
- Sabeti, E.; Reamaroon, N.; Mathis, M.; Gryak, J.; Sjoding, M.; Najarian, K. Signal quality measure for pulsatile physiological signals using morphological features: Applications in reliability measure for pulse oximetry. Inform. Med. Unlocked
**2019**, 16, 100222. [Google Scholar] [CrossRef] - Tang, S.K.D.; Goh, Y.Y.S.; Wong, M.L.D.; Lew, Y.L.E. PPG signal reconstruction using a combination of discrete wavelet transform and empirical mode decomposition. In Proceedings of the 2016 6th International Conference on Intelligent and Advanced Systems (ICIAS), Kuala Lumpur, Malaysia, 15–17 August 2016; pp. 1–4. [Google Scholar]
- Elgendi, M.; Liang, Y.; Ward, R.K. Toward Generating More Diagnostic Features from Photoplethysmogram Waveforms. Diseases
**2018**, 6, 20. [Google Scholar] [CrossRef] [PubMed] [Green Version] - Daubechies, I. The wavelet transform, time-frequency localization and signal analysis. IEEE Trans. Inf. Theory
**1990**, 36, 961–1005. [Google Scholar] [CrossRef] [Green Version] - Torrence, C.; Compo, G.P. A Practical Guide to Wavelet Analysis. Bull. Am. Meteorol. Soc.
**1998**, 79, 61–78. [Google Scholar] [CrossRef] [Green Version] - Komorowski, D.; Pietraszek, S. The Use of Continuous Wavelet Transform Based on the Fast Fourier Transform in the Analysis of Multi-channel Electrogastrography Recordings. J. Med. Syst.
**2015**, 40, 1–15. [Google Scholar] [CrossRef] [PubMed] [Green Version] - Montejo, L.A.; E Suarez, L. An improved CWT-based algorithm for the generation of spectrum-compatible records. Int. J. Adv. Struct. Eng.
**2013**, 5, 26. [Google Scholar] [CrossRef] [Green Version] - Li, L.-C. A New Method of Wavelet Transform Based on FFT for Signal Processing. In Proceedings of the 2010 Second WRI Global Congress on Intelligent Systems, Wuhan, China, 16–17 December 2010; pp. 203–206. [Google Scholar]
- Sahambi, J.S.; Tandon, S.N.; Bhatt, R. Using wavelet transforms for ECG characterization. An on-line digital signal processing system. IEEE Eng. Med. Boil. Mag.
**1997**, 16, 77–83. [Google Scholar] [CrossRef] - Colquhoun, D.A.; Forkin, K.T.; Durieux, M.; Thiele, R.H. Ability of the Masimo pulse CO-Oximeter to detect changes in hemoglobin. J. Clin. Monit.
**2012**, 26, 69–73. [Google Scholar] [CrossRef] - Gehring, H.; Hornberger, C.; Matz, H.; Konecny, E.; Schmucker, P. The effects of motion artifact and low perfusion on the performance of a new generation of pulse oximeters in volunteers undergoing hypoxemia. Respir. Care
**2002**, 47, 48–60. [Google Scholar] - Cannesson, M.; Delannoy, B.; Morand, A.; Rosamel, P.; Attof, Y.; Bastien, O.; Lehot, J.-J. Does the Pleth Variability Index Indicate the Respiratory-Induced Variation in the Plethysmogram and Arterial Pressure Waveforms? Anesth. Analg.
**2008**, 106, 1189–1194. [Google Scholar] [CrossRef] - Krishnan, R.; Natarajan, B.; Warren, S. Two-Stage Approach for Detection and Reduction of Motion Artifacts in Photoplethysmographic Data. IEEE Trans. Biomed. Eng.
**2010**, 57, 1867–1876. [Google Scholar] [CrossRef] [Green Version] - Schrøder-Petersen, D.; Simonsen, H. Tail Biting in Pigs. Vet. J.
**2001**, 162, 196–210. [Google Scholar] [CrossRef] [PubMed] - Sonoda, L.T.; Fels, M.; Oczak, M.; Vranken, E.; Ismayilova, G.; Guarino, M.; Viazzi, S.; Bahr, C.; Berckmans, D.; Hartung, J. Tail biting in pigs—causes and management intervention strategies to reduce the behavioural disorder. A review. Berl. Munch. Tierarztl. Wochenschr.
**2013**, 126, 104–112. [Google Scholar] [PubMed]

**Figure 1.**The test pig under anaesthetisation with PPG sensor placed on the left ear (

**a**), on the tail (

**b**) and on the left back leg(

**c**).

**Figure 2.**The PPG sensor is placed on the left back leg (below the knee) of the non-anaesthetised pig (left photo) and then the animal is allowed to move freely in a pen (right photo).

**Figure 3.**(

**a**) the shimmer Optical Pulse sensing probe (PPG sensor) and data-logger, (

**b**) and the ECG recorder, BEAM

^{®}, used to record ECG signals from the pig as a gold standard for heart rate.

**Figure 4.**Block diagram showing the main processing steps to extract pig′s heart rate from PPG signal.

**Figure 5.**First and second order derivatives of Gaussian wavelets as examples of odd and even Gaussian wavelets.

**Figure 6.**One-minute sliding window with 50% (30 s) overlap to calculate the heart rate (bpm) based on the number of detected peaks per time window.

**Figure 7.**The scalogram of the chosen set of scales ($s={2}^{a}$) shows the scales dominated by the energy (high absolute CWT coefficients) from the cardiogenic pulse signal, calculated using the fourth order DOG wavelet.

**Figure 8.**The decoupled cardiac pulse signals using the CWTFT algorithm based on three different orders (m = 2, 4, 6) of DOG wavelet in comparison to one segment of the original raw PPG signal obtained from the ear of the anaesthetised pig.

**Figure 9.**Estimated heart rate from PPG signal vs. heart rate from the gold standard (ECG) measured from the anaesthetised pig′s ear (

**a**), the leg (

**b**) and the tail(

**c**).

**Figure 10.**The raw PPG signal vs. the decoupled (reconstructed) cardiac pulse waves obtained from moving pig.

**Figure 11.**The estimated HR of the non-anaesthetised (moving) pig using the developed CWTFT-based algorithm along the whole measurement period, including the awakening period.

**Table 1.**The Mean Absolute Error (MAE) and Root Mean Square Error (RMSE) of the estimated heart rate (bpm) from all the PPG segments, in comparison to the reference pulse rate calculated from the ECG signals obtained from the anaesthetised pig. Comparing the estimated heart rate based on three orders (2, 4 and 6) of DOG wavelet.

Wavelet | Ear | Leg | Tail | |
---|---|---|---|---|

MAE (± std) | 2nd order DOG | 2.66 (±1.3) * | 1.75 (±1.2) * | 1.38 (±0.8) * |

4th order DOG | 2.23 (±0.9) | 1.53 (±0.8) | 1.25 (±0.7) | |

6th order DOG | 2.20 (±1.1) | 1.56 (±0.9) | 1.32 (±0.8) | |

RMSE (± std) | 2nd order DOG | 3.50 (±1.6) * | 2.27 (±1.2) * | 1.45 (±0.9) * |

4th order DOG | 3.10 (±1.4) | 1.80 (±1.4) | 1.39 (±0.6) | |

6th order DOG | 3.23 (±1.5) | 2.11 (±1.6) | 1.36 (±0.7) |

**Table 2.**The average and standard deviation of the SQIs, perfusion index (${P}_{SQI}$), skewness index (${S}_{SQI}$) and signal to noise ratio index ($S{N}_{SQI}$) from all the PPG segments obtained from the ear, leg and the tail of the anaesthetised pig.

SQI | Ear | Leg | Tail |
---|---|---|---|

${P}_{SQI}$ | 10 (±2.9) | 8 (±2.2) | 7 (±2.5) |

${S}_{SQI}$ | 0.06 (±0.09) | 0.02 (±0.08) | 0.02 (±0.09) |

$S{N}_{SQI}$ | 3.85 (±0.40) | 3.62 (±0.35) | 3.51 (±0.43) |

© 2020 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**

Youssef, A.; Peña Fernández, A.; Wassermann, L.; Biernot, S.; Wittauer, E.-M.; Bleich, A.; Hartung, J.; Berckmans, D.; Norton, T.
An Approach towards Motion-Tolerant PPG-Based Algorithm for Real-Time Heart Rate Monitoring of Moving Pigs. *Sensors* **2020**, *20*, 4251.
https://doi.org/10.3390/s20154251

**AMA Style**

Youssef A, Peña Fernández A, Wassermann L, Biernot S, Wittauer E-M, Bleich A, Hartung J, Berckmans D, Norton T.
An Approach towards Motion-Tolerant PPG-Based Algorithm for Real-Time Heart Rate Monitoring of Moving Pigs. *Sensors*. 2020; 20(15):4251.
https://doi.org/10.3390/s20154251

**Chicago/Turabian Style**

Youssef, Ali, Alberto Peña Fernández, Laura Wassermann, Svenja Biernot, Eva-Maria Wittauer, André Bleich, Joerg Hartung, Daniel Berckmans, and Tomas Norton.
2020. "An Approach towards Motion-Tolerant PPG-Based Algorithm for Real-Time Heart Rate Monitoring of Moving Pigs" *Sensors* 20, no. 15: 4251.
https://doi.org/10.3390/s20154251