Alternative measurement systems for recording cardiac activity in animals: a pilot study

Monitoring and assessing cardiac activity in animals, especially heart rate variability, has been gaining importance in the last few years as an indicator of animal health, well-being and physical condition. This pilot study tested the sensors based on ballistocardiography sensing the mechanical vibrations caused by the animal’s cardiovascular system, which have proved useful in measuring cardiac activity in humans. To verify the accuracy of these measurement systems, the conventional measurements based on electrocardiography were carried out and the outcomes were compared. The main objectives were to verify the suitability of these sensors in measuring cardiac activity in animals, to determine the advantages and disadvantages of these sensors, and to identify future challenges. Measurements were performed on various animals, specifically a goat, a cow, a horse, and a sheep. Electrocardiographic measurement, which has demonstrated high accuracy in procedures for animals, was used as the study’s gold standard. A disadvantage of this method, however, is the long time required to prepare animals and shear spots to attach electrodes. The accuracy of a ballistocardiographic sensor was compared to reference electrocardiographic signals based on Bland–Altman plots which analysed the current heart rate values. Unfortunately, the ballistocardiographic sensor was highly prone to poor adhesion to the animal’s body, sensor movement when the animal was restless, and motion artefacts. Ballistocardiographic sensors were shown only to be effective with larger animals, i.e., the horse and the cow, the size of these animals allowing sufficient contact of the sensor with the animal’s body. However, this method’s most significant advantage over the conventional method based on electrocardiography is lower preparation time, since there is no need for precise and time-demanding fixation of the sensor itself and the necessity of shaving the animal’s body.


Introduction
Monitoring cardiac activity in animals is currently an important tool in the assessment of an animal's overall health. The first mention of the potential diagnostic importance of heart sounds in animals was written in 1819 by French doctor René-Théophile-Hyacinthe Laënnec [1]. However, up to the early 1950s, only a few articles had discussed monitoring cardiac activity in horses and other animals, see [2]. A great change came in the 1960s, when David K. Detweiler, known as the "father of veterinary cardiology", brought animal cardiology to the forefront of veterinary practice [1]. Detweiler focused mainly on cardiovascular diseases in dogs, horses and cattle [2][3][4][5][6][7]. He examined animals with systemic auscultation and electrocardiography (ECG). Over time, special cardiologic procedures were introduced and recognised globally, and animal cardiology became an essential part of veterinary practice [1].
Over the last few years, clinical assessment of cardiac activity in animals has been gaining importance, not only with regard to physiological and pathophysiological indicators, but also as an indicator of an animal's mental health and well-being [8][9][10][11][12][13]. The stress levels can be measured using different physiological indicators, such as heart rate (HR) or serum levels of various stress hormones (e.g., cortisol) [14][15][16]. The advantage of using the HR (or heart rate variability, HRV) is that it can be monitored non-invasively and continually. The other mentioned methods require the blood to be collected repetitively which is another stress factor for animals and can lead to distorted results [10]. Thus, recording HR as an indicator of stress seems to be a better option.
The HR assessment is used to identify stress in animals based on the assumption that HR reflects the activity of the sympathetic nerve fibres. However, changes in HR are not exclusively in response to stress, i.e., a negative or painful stimulus, but also in response to other behavioural and physiological influences, such as low oxygen levels [11], physical activity, temperature [12], illness [37,38], and overall welfare of the animal [13]. Therefore, interpretation of mental state based solely on HR measurement is not always unambiguous [17]. The HRV may be a suitable alternative as a quantitative indicator of animal health and well-being. This parameter represents the comprehensive degree of a physiological function derived from the heart cycle. It expresses the variability which exists between consecutive heart rhythms and is measured from the R wave of the QRS complex, which allows more accurate and detailed assessment of the physical or mental condition of the animal [18][19][20][21][22].
The HR can be measured by various techniques for cardiac activity monitoring, see section II.B. Among the most commonly used methods is electrocardiography, which is considered a gold standard in cardiac monitoring in humans. However, this method faces multiple challenges in animal monitoring, especially due to presence of fur and differences in their anatomy, see section II.C. Therefore, this article presents an alternative approach in measuring HR, so-called ballistocardiography (BCG), which is based on monitoring body movements caused by accelerated blood flow inside large vessels. The method proved to be efficient in HR monitoring in humans and is considered low-cost, simple to prepare, and easy to operate [23].
For cardiac monitoring in animals, the BCG method provides several benefits over the conventional ECGbased approach. The BCG has lower requirements on surface quality than ECG as it does not require shaving the animal, applying gel or otherwise address the conductivity between the electrode and the skin. Moreover, when acquiring the ECG signal, several electrodes need to be placed in different locations of the animal's body, whereas to obtain BCG signal, a single sensor can be used. When incorporated into a saddle or belt, this method could offer a quick, simple, and durable attachment to the animal and become an ideal tool for cardiac monitoring in animals. This paper, therefore, aims to test a prototype of the BCG-based measuring system to evaluate its accuracy and suitability for this task.

Background
Developments in sensing technology have made it possible to accurately monitor vital signs in humans, but in the case of animals, measurement is more complicated. This is mainly due to the different body structure and unpredictability of their behaviour. By monitoring the vital functions of animals, it is possible to obtain a large amount of valuable information about their physical and mental health. Ensuring the welfare of animals and preventing the occurrence of stress is associated with their improved performance and thus positive economic impact [24][25][26][27][28][29][30][31][32][33][34][35][36]. The goal of the researchers is, therefore, to design and put into practice an automated, non-invasive system enabling long-term monitoring of animals. This section summarizes examples of the practical use of measuring animal cardiac activity, including monitoring techniques and evaluation parameters that have been used in the past.

Cardiac monitoring in animals
Changes in cardiac activity can be assessed according to numerous parameters with regard to time or frequency. In the time domain, the immediate HR can be determined at any point in time or in the intervals between consecutive QRS complexes, i.e., the normal-to-normal (NN) intervals [20,21]. The average NN interval, the average HR, or the difference between the longest and the shortest NN intervals are also simple parameters which can be determined in the time domain. More complex parameters can be calculated according to the immediate HR, the direct measurement of NN intervals, or the differences between NN intervals [20]. Several studies [22][23][24][25][26][27][28][29][30][31][32][33][34][35][36][37] have reported that HRV or HR parameters are objective indicators of the mental and physical well-being of animals during veterinary and breeding practices. Examples of specific uses of measurements of HRV or HR parameters in animals are summarised in the following subsection and in Table 1.
The effect of the environment and the presence of humans on HR and HRV parameters in animals (cows and horses) was investigated in [19,[24][25][26][27][28][29][30]. In cows, these parameters were most frequently monitored in connection with the volume of milk the animals produce [24][25][26][27]. The results of the studies show that the stress caused by the change of environment, such as their transfer to isolated stable [24], or adverse human behaviour [25], lead to increase in HR and reduction milk yield. Human-horse interaction can be estimated through the assessment of HRV, since the presence of rider or handler affects the horses' inner behaviour [19,[28][29][30]. These findings can be applied in equineassisted therapy or in monitoring the effect of therapeutic horseback riding [30].
The same parameters (HRV and HR) were monitored in horses to improve the quality of training and improve the performance of the animals [47][48][49]. In terms of performance in racing horses, the higher values of HRV parameters, the better results [47]. The training can be thus adjusted (by, e.g., selecting a proper exercise) according to the parameters and the aerobic work load needed for a given horse [48]. Moreover, for the training to be effective, it should not induce an unnecessary stress to the animal, this can be also assessed by the HR and HRV parameters [49].
Further investigations were focused on monitoring animals' well-being, especially early detection of illness or pain in cattle, sheep and horses. The research topics covered, for example, relation of HR changes caused by stress due to lameness in cow [37] and sheep [38], changes of HRV during labor in mares [39], or variations of HRV in horses with diseases, such as grass sickness [40], laminitis [41], atrial fibrillation [42], or gastrointestinal disease treated by exploratory laparotomy [43]. The findings show that HRV can be used to differentiate between healthy and sick animals [40,42] but also assess presence of pain [41] and severity of the illness [38], since its development is associated with significant increase in the HRV parameters [38]. Furthermore, a reduction of HRV after surgery was used to predict a non-survival and thus HRV can be used both for diagnostic and prognostic purposes [43]. As suggested in [41], such HRV-based indicator would be considered a more practical and less expensive assessment Measurements of HRV and HR parameters in animals were also used in research that aimed to model human diseases [44][45][46]. Several studies used pigs to model diseases, such as sudden infant death syndrome [45], or cardiovascular autonomic neuropathy in subjects with diabetes [44]. The monitored HRV parameters showed significant changes correlating with symptoms of the investigated diseases and HRV has thus proved as a suitable method for early detection and therapeutic strategy development [44,45].
Besides the HR evaluation, it is possible to analyze the cardiac activity in animals using more sophisticated parameters. For example, in [50], the authors focused on evaluating the cardiac activity in calves using the RR interval mean, RR interval standard deviation (SDRR), and root mean square of successive differences (RMSSD) parameters in the time domain. The spectral band power (VLF, LF, HF) and the LF/HF ratio were calculated in the frequency domain. In [51], the mean interbeat interval, RMSSD, and pNN50 parameters were studied in horses. In [37], HRV in dairy cows was measured as an indicator of chronic stress caused by lameness. The animals were assessed according to RMSSD, HF, LF/HF, geometric measurements (triangular interpolation of normal to normal, R-R triangular index), Poincaré measurements, and non-linear measurements (Shannon entropy, shortterm fluctuations in HRV, long-term fluctuations in HRV, correlation dimension). A more detailed overview of HRV parameters can be found in [20,21,52].

Acquisition of cardiac activity
Electrocardiography (ECG), ballistocardiography (BCG), photoplethysmography (PPG) and phonocardiography (PCG) are among the most frequently used techniques which have proved effective in monitoring cardiac activity in humans. An example of all four curves is shown in Fig. 1. The ECG-based monitoring is the most common method in both human and animal cardiac monitoring, but only limited number of studies [53][54][55][56][57][58][59][60][61][62][63][64] have explored the application of the alternative methods in measuring the cardiac activity of animals. The basic principles of the individual techniques and their practical use in veterinary can be summarised as follows: a) Phonocardiography-a passive, low-cost method and one of the oldest techniques for recording the sounds of the heart. The method captures the heart sounds produced by the opening and closing of the heart valves and blood flow [65]. The simplest method of capturing heart sounds is in the use of a microphone placed on the surface of the body [66]. Other meth-ods use, for example, a piezoelectric crystal placed on the head of a metal shaft which contacts a membrane [67], principle of induction [68], or non-invasive fibre-optics [69]. The PCG method was used for the HR monitoring in dogs [53], horses [54,55], and to monitor pregnancy in cattle [56]. b) Photoplethysmography-uses a light source and a photodetector to measure variations of volume in blood circulation [70]. A light source shines light into tissue and a photodetector then measures the quantity of reflected light, which is proportional to any change in blood volume. The most common PPG sensors use infrared LEDs or green LEDs as the main light source [70,71]. In veterinary medicine and research, the PPG was tested in guided pulse checks during cardiopulmonary resuscitation [57], or to diagnose cardiovascular diseases in domestic animals [58]. The use of PPG for continuous monitoring of cardiac activity was assessed in dogs and cats [59], farm animals [60] and stress monitoring in sheep during transport [61]. Moreover, besides external PPG sensors, there are also internal sensors available, which enable continual subcutaneous data collection. For example, the authors in [62] used an implantable but extravascular sensor for measuring blood oxygen saturation in sheep. c) Ballistocardiography-method based on capturing the body movements caused by accelerated blood flow inside large vessels [72]. Various types of sensors can be used to capture these movements and are able to generate a voltage as a result of mechanical Example of ECG, BCG, PPG, and PCG waveforms. Compared to the R peak in ECG, the other signals are physiologically delayed by the pulse transit time [81] deformation or changes in pressure. For example, a piezopolymer film pressure sensors [73,74], electromechanical film-based sensors [75,76], hydraulic sensors [77,78], hydraulic sensors or fibre optic sensors [79,80]. So far, BCG measurements were tested in domesticated animals [63] and in dogs [64]. d) Electrocardiography-captures the electric potentials produced by the heart that are projected on the body's surface using electrodes placed on the skin. This method is well known and used as a gold standard in medicine. However, this technique faces many obstacles when measured in animals, such as relatively demanding preparation and low quality of the ECG signal due to numerous artefacts. This will be discussed in detail in following section.

Standard monitoring and its challenges
The ECG based monitoring requires relatively demanding preparation in animals [82]. First, an optimal location to fix the electrodes must be identified to prevent movement or removal of the electrodes; the selected locations on the animal's body then need to be shaved. A disadvantage is that the quality of the ECG signal is often deteriorated by artefacts recorded simultaneously with the useful signal. When ECG data is measured in an animal, the motion artefacts are mainly caused by the animal's restlessness, since the measurement procedure itself is rather stressful to animals [83,84]. Additional processing of the ECG signal requires suitably selected filtering methods to obtain as precise information about the animal's health as possible. Recording for at least 5 min during stationary conditions is recommended for adequate analysis of HRV [20]. Many devices for short-term and long-term monitoring exist for the recording, storage and analysis of human ECG data. Unfortunately, this is relatively costly equipment adapted to the analysis of human cardiac activity [22]. There are only a few commercially available external ECG monitoring devices designed for use in veterinary medicine on the market. These include, for example, the Televet 100 ECG monitor produced by Engel Engineering Service GmbH (Heusenstamm, Germany), which can be used for continuous ECG monitoring in large and small animals. Another is the 6-channel veterinary ECG ek3008monitor with connection to the smartphone is provided by Chip Ideas Electronics, S.L. eKuore (Valencia, Spain). The Veterinary ECG/Heart Monitor Universal Adapter manufactured by Woodley Equipment Company Ltd (Bolton, UK) enabling wireless communication with a mobile application or the 3-channel veterinary ECG system ECG-T3V is manufactured by Shinova Medical Co., Ltd (Shanghai, China). However, higher purchase price of these specialized devices is an obstacle in broader use in research.
Many authors [82][83][84][85][86][87][88][89][90][91][92][93][94][95] have, therefore, opted for the use of ECG-based HR monitors in researching animal HRV, since these are more affordable. These devices record the times between the two main depolarisation waves (R-R intervals) and then convert these data into HR values. HR monitors produced by Polar Electro Oy (Kempele, Finland) are frequently used. The Polar S810i model was used, for example in [82,[85][86][87][88][89]; the Polar Vantage NV model was used in [93]; the Polar Sport Tester monitor was used in [13,95]; and the Polar RS800 monitor was used in [37,38]. However, these devices are not capable of recording all aspects of cardiac activity, and this leads to a loss of clinically important information which can otherwise be obtained using ECG.
The absence of any gold standard for measurement and electrode placement is one of the major obstacles in capturing ECG in animals. Measurement using base-apex leads (the electrodes are placed along the mean electrical axis; one electrode on the lower thorax between the elbow and xiphoid and a second in the region between the lower neck and the withers), while the animal stands is performed most frequently in cattle, goats, sheep, and horses [92,[94][95][96]. Examples of electrode placement during ECG capture are summarised below (Table 2 and Fig. 2).
With the use of the base-apex lead, ECG monitoring was performed on cows in [95]. ECG was captured using disposable adhesive electrodes and gel. The negative electrode was placed in the caudal angle of the left scapula; the right electrode was placed in the left intercostal region caudally to the olecranon; and the ground electrode was placed in the region of the left paralumbar fossa. Similarly, the base-apex lead was also successfully used in [96] for ECG-based monitoring of sheep. Alligator-type electrodes attached to the skin were used for measurement. The negative electrode was attached to the left side of the neck in the jugular furrow area; the positive electrode was positioned at the fifth intercostal space; and the ground electrode was placed away from these two electrodes.
In [50], the ECG was measured with the use of adhesive ECG electrodes attached to the shaved skin of a calf. Secured with a band of elastic, one electrode was placed along the sternum, and the second was placed above the right scapula. In [97], the authors compared the baseapex lead method and the Dubois method of monitoring cardiac activity in horses. Placement of the four ECG electrodes in the Dubois method was identified as a more precise and reliable option. In this case, one electrode was placed on the left scapula, the second electrode on the right scapula, the third in the region of the sternum (over the xiphoid), and the ground electrode was positioned on the left front leg. Finally, in [57] and [88], the ECG was acquired using five electrodes in horses. The positive electrodes of both leads were placed on the left side of the thorax behind the olecranon; the negative electrodes of both leads were positioned on the left side of the chest behind the withers; and the ground electrode above the left mid-thorax was placed between the remaining two pairs of electrodes.
The studies [19,83,84] presented a wearable ECG monitoring system for the capture of cardiac activity in horses. The system consisted of an electronic unit, a band of elastic and two textile electrodes integrated into the belt. Both electrodes were placed in the area behind the left front leg (modified base-apex system). In [19], the quality of the recorded ECG signal was compared (especially in relation to motion artefacts) to a signal recorded simultaneously with conventional Ag/AgCl electrodes. The comparison showed that the capture system with textile electrodes was less prone to motion artefacts than ECG tracing using conventional Ag/AgCl.
In addition to external monitors, one can also find implanted loggers, which are defined as miniature, animal-borne, electronic devices for logging and/or relaying   [96], e Guidi et al. [19], f Zucca et al. [88], and g Costa et al. [97] of data about an animal's movement, behavior, physiology and/or environment [98]. The advantage of these loggers is that they can also be used for measurements in small animals, where the placement of external sensors may be problematic or completely impossible, especially in animals moving in the air or water. In addition, as with external monitors, the sensor does not lose contact with the animal's body. On the other hand, the risks associated with the invasiveness of the method, such as inflammation or encapsulation at the site of implementation, must be considered [98]. One of the companies offering a wide range of different types of implanted loggers is Star-Oddi hf (Garðabaer, Iceland). Star-Oddi implanted loggers allowing to monitor HR derived from a leadless single channel ECG, temperature, real-time telemetry or the depth at which the animal is located. Star-Oddi implanted logger was used to assess ECG-derived HR in Atlantic cod in [99], for evaluation of HR and swimming activity as stress indicators for Atlantic salmon in [100], or for HR monitoring in large decapod crustaceans [101]. In mammals, the leggers were used for example in [102], where the authors monitored cattles. Moreover, in [103], the loggers were used in domestic sheep monitoring.

Materials and methods
This pilot study focuses on comparison of ECG and BCG measurement systems based on sensing electrical and mechanical activity of the animal's heart, respectively. These systems have proved effective in measuring cardiac activity in humans. This section describes the equipment, attachment of the measurement systems, placement of the ECG electrodes and BCG sensor, methods used to process the measured signals, and the parameters used to assess the accuracy of measurement. Measurement was performed in four subjects: a goat, a cow, a horse, and a sheep. The subjects were provided by the Clinic of Ruminant and Pig Diseases and the Clinic of Horse Diseases of the Veterinary and Pharmaceutical University in Brno. A summary of the measured subjects is presented in Table 3.

Measurement systems
This pilot study compares two methods of monitoring cardiac activity: the standard ECG-based system and an alternative method based on ballistocardiography. The details of the measurement systems are as follows: 1. ECG measurement system-adhesive silver/silver chloride (Ag/AgCl) electrodes and a bioamplifier by g.tec medical engineering (Schiedlberg, Austria) were used for ECG measurement. The g.USBamp RESEARCH amplifier is a device of great accuracy for measuring and processing biological signals (the physiological activity of the eyes, brain, muscles, heart, and other organs). The amplifier is supplied with a USB interface and 16 simultaneous A/D delta-sigma type converters with 24-bit resolution and sampling frequency range of 64 Hz-38.4 kHz. The input range of this amplifier is ± 250 mV, which allows direct voltage signals to be recorded without saturation. The amplifier includes an internal unit for calibrating individual input channels and circuits for measuring the impedance of individual electrodes. The block diagram of attachment for ECG measurement is shown in Fig. 3. All hardware and software used is summarised in Table 4. 2. BCG measurement system-BCG measurement using a mechanical vibration sensor was performed simultaneously with ECG measurement. This measurement system was implemented with the following devices by National Instruments (Austin, TX, USA): NI cDAQ-9185, which is a configurable chassis, and the NI-9234 module. A microphone and sensor were also used to capture the mechanical vibrations produced by the movement of blood inside large vessels. The sensor was made from a spiral-shaped deformable plastic tube.
Movements of the animal's body caused by quicker blood flow vibrated the particles of the acoustically enclosed environment inside the spiral. Pressure changes were transferred via a plastic tube to the measuring microphone GRAS 40PP CCP by G.R.A.S. (Holte, Denmark) and then converted into voltage signals. The microphone has a wide frequency range from 10 Hz to 20 kHz and sensitivity of 50 mV/Pa. The signals were then digitalised using the NI-9234 module, which is suitable for measuring sounds or vibrations from accelerometers or microphones. The module has four channels, 24-bit resolution, a sampling frequency of 51.2 kS/s and an input range of ± 5 V. The digitalised signal was sent via the cDAQ-9185 ethernet chassis to a PC. This ethernet interface is a four-slot compact data acquisition (DAQ) system designed for the collection of data or switching slow action members. The chassis has a controller with configurable firmware responsible for timing, synchronisation of measurement tasks and data transfer between the I/O modules and the external control unit. The block diagram of attachment for BCG measurement is shown in Fig. 4.

Electrode and bcg sensor placement
For the ECG measurements, the electrodes were positioned and attached according to the Einthoven triangle, i.e., one electrode was placed on the right front leg, the second on the left front leg, and the third electrode in the abdominal area to ensure that the animal's heart was in the centre of the Einthoven triangle. To improve the electrode adhesion and ECG signal quality, we sheared the locations, where the electrodes were to be placed with electrical shears and the skin was cleaned with gelalcohol disinfectant solution septoderm from Schülke & Mayr GmbH (Norderstedt, Germany). To reduce skin resistance and artifacts, these positions were also cleaned with abrasive fine sandpaper. The BCG sensor was placed on the left front leg to be as close to the animal's heart as possible while sufficiently adhering to the animal's body in view of its size. Details and examples of attachment in the case of individual animals are summarised below.  The goat was cleaned and sheared thoroughly in locations selected for attachment of the ECG electrodes before commencing the measurement. The positions according to the Einthoven triangle were used to capture ECG signals. The BCG sensor was attached on the left front leg (see Fig. 5).
Attachment of the ECG electrodes on the cow was also according to the Einthoven triangle. The cow was partially immobilised (enclosed in a cattle chute) for the purposes of measurement, subsequently cleaned at the selected points and connected to the measurement system via electrodes. The BCG sensor was attached on the left front leg (see Fig. 6).
The ECG measurement on the horse was performed according to a modified Einthoven triangle. The electrodes were relocated to the abdominal area. The BCG sensor was attached to the left front leg (see Fig. 7).
Finally, the attachment and placement of electrodes for the ECG measurement system was the most complicated on the sheep due to the presence of lanolin on the sheep's skin, although the selected parts were sheared and carefully cleaned with gel-alcohol disinfectant solution. While the electrodes were placed according to the general model, the exact positions of the electrodes are not evident in the image in Fig. 8b because of the animal's thick coat of wool. The BCG sensor was attached to the left front leg (see Fig. 8).

Signal processing
The first step in processing the ECG signals was filtering. Poorly selected filters can affect the resulting signals and their analysis significantly. The captured ECG signals were first filtered with the digital filters included with the bioamplifier. MATLAB software by Math-Works (Natick, Massachusetts, USA) and the IIR Butterworth filter [104][105][106][107][108] BPF type were then applied for subsequent processing of the measured signals. In our tests, the IIR Buttherworth filter was more effective in filtering interference than the FIR filter, which altered the shape of the ECG signal, and may potentially cause unnecessary loss of clinically significant information. The ECG signals for each animal and lead were processed using a sixth order filter with cutoff frequencies set at 2 Hz and 40 Hz. This frequency band was selected, since most of the ECG signal energy occupies this frequency band. It is important to note that this is sufficient for the HR determination based on R peak detection, not for precise ECG morphological analysis. An example of the originally measured ECG signal from the LL lead on the goat and filtered signals is provided in Fig. 9a, b. Once the ECG signals were filtered, R peaks were detected using a detector which applied a continuous wavelet transform (Gaussian mother wavelet with a width of one and five levels of decomposition) [109]. The distances between individual R peaks, i.e., RR intervals, were calculated and applied to ascertain the values of the current HR, the average HR, and the HRV parameters.
The BCG signals were processed using a IIR Butterworth BPF type third order filter with cutoff frequencies 5 Hz and 20 Hz in combination with a WT method [110][111][112][113][114] which applied the symlet8 wavelet and three levels of decomposition. The same detector used for ECG processing, was used to detect the J peak, which corresponds to the R peak in the ECG signal. The BCG signals were also processed using MATLAB software. An example of the originally measured (noisy) BCG signal from horse and the filtered BCG is provided in Fig. 9c, d, respectively.

Evaluation metrics
To verify the suitability of ECG for the purposes of monitoring cardiac activity in animals and whether it can be used as a reference, we calculated and compared three very frequently used parameters and the average HR obtained from the individual leads. The standard deviation of the length of the NN interval (SDNN) is the simplest to calculate, as it is the square root of the variance. The SDNN parameter may be interpreted according to the statement that the higher the SDNN parameter, the greater HRV, which also indicates increased adaptability of the autonomic nervous system. As the SDNN value decreases, the variability is less and only limited autonomic regulation is present. SDNN is expressed according to where NN i indicates the value of the ith NN interval, N is the total number of intervals, and NN is the average value of the NN intervals. Since the variance mathematically equals the total power of spectral analysis, SDNN reflects all the cyclic elements responsible for variability in the period of recording [20]. In practice, it is not suitable to compare the SDNN obtained from recordings of Fig. 9 Comparison of the noisy and filtered signals with significant peaks highlighted: a noisy ECG signal from the LL lead in the goat and b is the ECG signal after application of the IIR Buttherworth filter, R peaks are marked red c noisy BCG signal from horse, and d the BCG signal filtered by IIR-WT, J peaks are marked red different duration (because this quantity depends on the length of the recording period) [20]. The RMSSD parameter defined as the square root of the mean quadratic differences of consecutive NN intervals can also be used. The RMSSD parameter is used to estimate the vagally mediated changes, which are also reflected in HRV. When an animal is stressed, parasympathetic activation is reduced and the RMSSD values are thus lower. RMSSD is expressed according to The AVNN parameter is defined as the average NN interval duration. All these measurements of short-term variation estimate the high-frequency variation in the HR and are, therefore, heavily correlated [20,37].
The HR traces were also used to assess the precision of the ECG signals measured from individual leads. We also evaluated whether the values of the average HR matched the mental condition of the animals during the measurement. To capture this, values of the current HR values had to be derived first. This was achieved using a R peaks detector. The intervals between individual R peak positions were derived and converted to the current HR values in BPM according to where T is the peak-to-peak time difference, and HR is the resulting heart rate. The moving average was applied as a final step; the window was selected for each animal (according to its HR) and ranged from 15 to 25 samples. Finally Bland-Altman plots were used to evaluate the accuracy of the measured BCG signals in comparison to the reference ECG signals. These plots are often used to compare two medical measurements. The average of the measured pairs is recorded on the horizontal axis, and the difference between these two measurements is recorded on the vertical axis. A 95% confidence interval is frequently applied to estimate the interval μ ± 1.96σ, where we can expect to find 95% of the difference values [115]. Using Bland-Altman plots, the present study compares the vectors and HR values obtained from the BCG signals to the HR values obtained from the ECG signals.

Results
To obtain the best possible results, we tested the effect of the filtering on the measured signals and assessed them visually. The best results were obtained using the IIR Buttherworth filter with cutoff frequencies of 2 Hz and 40 Hz (i.e., the range of the useful ECG signal). An example of the resulting filtered signals in all the animals tested is given in Fig. 10. The LA lead is shown for the goat, and cow, and the LL lead is shown for the horse and sheep. The results in the figure show that the signals were filtered suitably and that the ECG signal did not deteriorate because of an inappropriately selected filtering technique. Despite some of the animals being calm during measurement, a small proportion of the signals were affected by motion artefacts. Therefore, some of the R-peaks could not be detected and this caused minor differences between individual leads in the analysis (see Table 5). The effect of the animals' movements on the quality of ECG capture is shown in Fig. 10e, f. Example (e) represents part of the signal ECG signal in the goat from the LA lead, example (f ) shows the ECG signal of the sheep from the LL lead. Figure. 11 shows the examples of the BCG signals after filtration. We can see that the visual quality of the signals is lower than in case of ECG measurement. To compare the quality of those methods objectively, we used Bland-Altman analysis ( Table 6 and Fig. 14) and investigated the differences between the obtained HRV traces (Figs. 12 and 13). Table 5 summarizes the obtained values of the average HR and values of the HRV measured in individual animals. Higher values of average HR were expected in the case of the goat and sheep, since both of these animals were stressed and trembling during measurement. Measurement in the cow and horse proceeded without problems, since the cow and horse were calm during measurement. The values of the average HR were, therefore, expected to fall within the physiological range.
The signals from all leads (LL, RA, LA) during ECG measurement in the goat were captured in high quality and could, therefore, be used for further analysis along with the BCG signal. As shown by results in Table 5, there were similar average values of HR and the HRV parameters obtained from individual ECG leads with a negligible difference between individual leads in the evaluation metrics. The average HR for the LL lead was 122.87 BPM, the average HR for the RA lead was 121.55 BPM, and the   Only two ECG signals (RA, LA leads) measured in the cow were used for further analysis along with the BCG signal, since the data measured from the third lead was not of suitable quality and thus could not be used. An analysis was, therefore, performed on the data obtained from the leads on the right and left sides (RA and LA, respectively). The values of the parameters obtained from the signals in both leads showed only slight deviation in the evaluation metrics. The average HR was 57.89 BPM in the RA lead and 57.94 BPM in the LA lead. An average HR of 57.42 BPM was calculated from the BCG signal in the cow.
Signals from the LA and LL leads were also captured from the horse. The values of the HR and HRV parameters obtained from both leads were similar, with a negligible difference in in evaluation metrics. The average HR was 36.51 BPM in the LL lead and 36.56 BPM in the LA lead, while the SDNNs for these leads were 98.00 ms, and 59.60 ms, respectively. In case of BCG channel, an average HR of 36.66 BPM was calculated from the BCG signal.
Measurement of the sheep was the most difficult due to significant restlessness in the animal. Only one captured signal (from the LL lead) was useful for further analysis. The average HR measured with the LL lead was 135.30 BPM.
To obtain accurate information about the HR, the signals must be of sufficient quality so that the significant peaks can be detected. This is illustrated in Figs. 12   the reference ECG trace. This deviation resulted from interference which reduced the quality of the signal. Finally, to objectively compare the quality of the signals acquired by the ECG and BCG methods, Bland-Altman analysis was used, see Table 6 and Fig. 14. We can interpret the data in a way that the less the range of the confidence interval, the less the difference between the HR from the BCG signals and the HR from the reference ECG. The values should ideally be near the bias horizontal line, which should be close to zero, and show a mean d for all differences. The mean values d and values of ±1.96s are summarised in Table 6. The BCG signals could only be captured in the goat, cow, and horse, while the attempt in the sheep was not successful. According to the results presented in Table 6 and because high values of d and ±1.96s were determined, we can state that the BCG method was not effective in the goat. The BCG method in the cow and horse was effective, because low values of d and values of ±1.96s were achieved in each case. Figure 14a shows the Bland-Altman plots for signals captured in the goat, where measurement with BCG failed entirely, and examples (b) and (c) present the signals measured in cow and horse, respectively, where the measurements were effective.

Discussion
The present study examined the usability of alternative measurement systems in monitoring the cardiac activity of animals. The accuracy of the ballistocardiography method was compared to the verified standard, i.e., the ECG measurement system. Herein, this assumption was verified for the used ECG measurement system by comparing the values obtained from individual leads ( Table 5). Measurement of the cardiac activity in animals using ECG was considered representative and was, thus, used as a reference or ground truth. During the measurements, we encountered several problems and were unable to satisfactorily measure all the signals in some animals. This section discusses the possible reasons for these problems and offers practical insights into each method.
Measurement in the cow and horse proceeded without problems, since the cow and horse were not unsettled during measurement. The values of the average HR were, therefore, expected to fall within the physiological range. As for the measurement in cow, the average HR was 57.89 BPM and 57.94 BPM in the RA and LA lead, respectively, indicating slightly lower values than the physiological values in cows, which fall in the range of 60-80 BPM with an average value of 70 BPM [116]. The results confirmed the hypothesis that the cow was calm during measurement. In case of the measurement in horse, the average HR was 36.51 BPM and 36.56 BPM in the LL and LA ECG lead, respectively. This reflects the physiological values, which fall in the range of 30-40 BPM with an average value of 35 BPM [117]. The values confirm the assumption that the animal was not stressed.
However, the situation in the goat and sheep was different, which is evident in HR values and also on the signal quality. The average HR in goat for the LL, LA, and RA ECG lead was 122.87 BPM, 121.55 BPM, and 122.87 BPM, respectively. These values were slightly higher than the physiological values, which were expected within the range of 70-100 BPM with an average value of 90 BPM [116]. The average HR values, therefore, confirm the hypothesis that the goat was stressed, and the ECG measurement can be considered precise. These results (high HR values) are also consistent with our observations that the goat appeared unsettled during HR recordings.
The sheep was the most problematic subject in ECG measurement mainly because of the animal's thick coat of wool and lanolin layer on the skin. In this case, the electrodes could not be attached securely on the animal's body despite shaving and addressing the skin with alcohol solution. Only one of the ECG signals was, therefore, used for analysis. The average HR measured with the LL lead was 135.30 BPM. These is an extremely high value compared to the physiological values, which fall in the range of 70-90 BPM [116]. It is, therefore, evident, similarly as in the case of the results in goat, that the animal was highly stressed and unsettled during the measurement procedure.
The problem regarding the measurements was that the animals were not used to this (or any) kind of monitoring and thus the preparations, especially in case of ECG, were stressful for them. The ECG measurement included shaving in several parts of their body, application of alcohol to clear these areas and also addressing the conductivity between the electrode and the skin by means of sandpaper. This procedure of shaving fur, attaching the electrodes and measuring ECG was particularly demanding in goat and sheep, which was also reflected in the measurements (higher HR values, motion artefacts). Therefore, the future research should include comparison of the measurements when it is used along with the ECG and alone. We believe that when the BCG sensor is incorporated in a saddle or a belt and thus placed on the animal quickly and easily, the HR will be lower (i.e., the animal will be less stressed) than when the process includes preparations for the ECG based monitoring.
One of the advantages of the BCG sensor was quick and simple attachment to the animal without the need for shaving. As this is an alternative method for the measurement of cardiac activity, no standard guidelines or recommendations are available for sensor placement.
The BCG sensor was placed on the left front leg to be as close as possible to the animal's heart and for the best adherence to the animal's body according to its size. However, the size of the sensor contributed to poor adhesion to the body of the animal and motion artefacts in the captured signal due to movement of the sensor with small animals. During measurement of BCG signal in the goat, the sensor moved frequently because of the animal's restlessness, resulting in motion artefacts and significant distortions to the signal. A high-quality BCG signal could not be obtained from the goat even after filtering, and the detector was unable to detect the J peaks correctly. The BCG signal could not be captured at all in the sheep because of the wool covering the animal's body.
However, sufficient contact between the sensors and the animal's body was achieved with the larger animals, i.e., the cow and horse. The BCG signals were only affected slightly by motion artefacts, and high-quality signals were captured. This was confirmed by the results obtained from the Bland-Altman plots, where in horse and cow, the results showed agreement between the two methods. On the other hand, in case of the poor BCG measurements in goat, the results of Bland-Altman analysis show lack of agreement with the ECG reference. The findings are also reflected in the HR analysis of the animals on both data, especially on the average HRs. Obtaining a high-quality signal to monitor the cardiac activity of animals by means of BCG method thus depends on the selection of suitable sensor size (corresponding to the animal's size), placement of sensors and sufficient contact with the animal's skin. We, therefore, recommend integrating sensors into a sensor belt or a saddle (for horses) in future research. This monitoring method may provide sufficient contact to minimise the movement of the sensors. In addition to the sensors which capture cardiac activity, a reference sensor can be placed elsewhere on the animal to capture the signals with interference from motion, while the animal is moving (in particular horses under load). The signal which includes the horse's cardiac activity and motion artefacts and the signal which contains only motion signals from the reference sensor could be used as inputs for an adaptive algorithm which can suppress the interference in the useful signal. These adaptive algorithms have proved useful in the past in processing human biological signals, such as BCG and ECG in adults [118][119][120], fetal ECG [121][122][123], speech signals [124,125], or signals used in telecommunications [126].
The pilot study introduced research in the given area, and future research will focus on measuring the cardiac activity in cattle and horses. Measurement of BCG in these animals is shown to be precise, and the benefits may be economically significant (e.g., in milk production or racehorse training). In future, additional sensor types and measurement methods to obtain HR at rest or in motion will be tested. This has an important contribution, for example, in horse training. Advanced filtering methods (adaptive algorithms) will also be tested to measure the cardiac activity of animals under load. In the case of horses, measurement of HR recovery, which is defined as the reduction in the HR 1 min after training, is a major indicator of the horse's form.
Future research will also focus on determining a gold standard for the placement of sensors and electrodes in individual animal species and thereby facilitate the best possible quality in future records. This could also lead to the creation of a measurement system for use in small farms up to large breeding operations to monitor the health and well-being of animals. Creating optimal conditions for the life of animals or the early detection of disease may help reduce economic loss and increase productivity in farms. The use of HRV monitoring during the training of race animals is a separate topic which is currently enjoying attention. This method may help optimise the training, recuperation and physical readiness of animals and thus improve their form and performance.

Conclusions
The present study focused on the measurement of cardiac activity in animals using ECG and BCG systems in four animals: a goat, a cow, a horse, and a sheep. First, the suitability of ECG was verified by comparing the calculated evaluation parameters (the average HR, RMSSD, SDNN and AVNN) and comparing the HR traces from individual leads. The relation between the average HR values and the observed mental state and behaviour of the animals during measurement was also discussed. Because ECG was considered a valid baseline for comparison, it was used in this study as a reference for assessing the accuracy of the BCG method. The captured signals were analysed by comparing the accuracy of the current HR values using Bland-Altman plots. Measurements of the BCG signals were accurate in the goat, cow, and horse. BCG signals could not be measured in the sheep, since BCG sensor was highly prone to poor adhesion to the animal's body and movement, while the animal was restless, which resulted in motion artefacts. The BCG sensor was only shown to be effective with the large animals, i.e., the horse and cow, where sufficient contact between the sensor and the animal's body was achieved owing to their size.
In the future research, the placement of sensors should be optimised for individual species to allow capture of the highest possible quality of signal. The measurement system could be embedded into a tailor-made saddle or belt so that the contact of the sensor is ensured, and the time required for the attachment is minimized. Further tests should also focus on testing additional sensor types and measurements with animals which are at rest but also in motion. Finally, advanced signal processing methods will play a crucial role to eliminate the motion artifacts more efficiently.