Sensors and Signal Processing Methods for a Wearable Physiological Parameters Monitoring System

1 Abstract —The present paper presents some of the specific aspects of the development of a smartphone-based physiological parameters monitoring system intended for occupational safety applications. The system consists of a comfortable garment with integrated wireless sensors and a personal smartphone connected to the sensors via Bluetooth. A smartphone is used for data gathering and processing, heart and respiratory rate evaluation and information transmission. A reliability of the physiological parameter values obtained by the system highly depends on the signal processing and evaluation methods applied. The methods must ensure robustness for human motion artefacts in the signal and other noise prevailing in industrial environment. The monitoring system presented here combines relatively simple data gathering tools with certain novel digital signal processing algorithms that are useful in solving reliability problems caused by human motion artefacts and electromagnetic interference. The proposed method for the evaluation of respiratory and heart rate and the developed algorithms are based on the detection of distinctive peaks in respiratory and electrocardiogram signals using digital filtering and a moving difference window with an adaptive length. A median threshold criterion is applied to reject the false peaks in those signals caused by noise. The sensors and data processing algorithms were tested experimentally and the results were verified with a portable medical patient monitor MEC-1000. The differences between the values of corresponding parameters were insignificant, which means that the indications of the wearable monitoring system could be trustworthy and practically applicable.

1 Abstract-The present paper presents some of the specific aspects of the development of a smartphone-based physiological parameters monitoring system intended for occupational safety applications.The system consists of a comfortable garment with integrated wireless sensors and a personal smartphone connected to the sensors via Bluetooth.A smartphone is used for data gathering and processing, heart and respiratory rate evaluation and information transmission.A reliability of the physiological parameter values obtained by the system highly depends on the signal processing and evaluation methods applied.The methods must ensure robustness for human motion artefacts in the signal and other noise prevailing in industrial environment.The monitoring system presented here combines relatively simple data gathering tools with certain novel digital signal processing algorithms that are useful in solving reliability problems caused by human motion artefacts and electromagnetic interference.The proposed method for the evaluation of respiratory and heart rate and the developed algorithms are based on the detection of distinctive peaks in respiratory and electrocardiogram signals using digital filtering and a moving difference window with an adaptive length.A median threshold criterion is applied to reject the false peaks in those signals caused by noise.The sensors and data processing algorithms were tested experimentally and the results were verified with a portable medical patient monitor MEC-1000.The differences between the values of corresponding parameters were insignificant, which means that the indications of the wearable monitoring system could be trustworthy and practically applicable.

I. INTRODUCTION
The interest in the monitoring systems of the personal wearable vital signals has been growing in the last few years.A recent advance in integration of sensors and mobile technologies stimulates the development of more advanced monitoring systems and extends their functionality, thus, making them more attractive and affordable for people.A lot of publications present different implementations of wearable monitoring systems designed specifically for a Manuscript received 10 February, 2017; accepted 2 June, 2017.real-time proactive rehabilitation surveillance, sportsmen training, physiological data monitoring of firefighters and workers of some other hazardous occupations, and other E-Health applications [1]- [6].A few outstanding projects, such as Wealthy [7], LifeShirt [8], Life-Guard, MyHeart, SmartLife, and others [9], [10] have been developed, and some of them have been proposed as commercial products already.However, most of these systems are still in the under-development stage.In our opinion, the key elements for a successful commercialization of those projects could be reducing the price of the overall system and making it more convenient and acceptable for the user.
In this paper, we focus on the physiological parameters monitoring system of the workers doing certain hazardous activities, such as dispatchers at chemical plants, electricians at electric power enterprises or building site operators.The availability of the mentioned devices on the market is limited.One of the monitoring aspects in terms of occupational safety is the fact that the person being monitored is healthy initially and any restriction and interference with any diagnostic medical equipment is unacceptable.What is more, the condition of health of the monitored person might rapidly change at any time, and the monitoring system must detect these changes instantly.These factors define certain guidelines and the developers of the wearable monitoring systems must follow the following directions: designing lightweight, comfortable and low power sensors, implementing low power wireless data transmission and gathering units, and developing fast and reliable computation-efficient signal processing methods.Signal processing techniques should be suitable for battery powered data processing devices, including smartphones, which recently have been gaining more and more popularity with various mobile solutions [11]- [13].
Signal processing methods proposed in this work enable a reliable real-time evaluation of primary physiological parameters during rest periods, as well as during activities requiring intense body motions.All body sensors and transmitters are smoothly integrated into the worker's garment and create no obstacles during their daily activities.

Sensors and Signal Processing Methods for a Wearable Physiological Parameters Monitoring System
Use of a smartphone as the data gathering, processing and transmitting device significantly reduces the cost of the system and significantly contributes to its simplification.The monitoring system described here is supposed to serve as a prototype for a potential commercial product.The rest of the paper is organized as follows: Section II describes the developed system in general, Section III describes the implementation of respiratory inductance plethysmography and electrocardiogram (ECG) sensors in more detail, Section IV presents signal processing and parameters evaluation methods which were suggested in this work and implemented in the system, Section V is assigned to experimental verification.Conclusions are presented in Section VI.

II. DESCRIPTION OF THE SYSTEM
In order to enable an effective long-term vital signs monitoring and detection of high-risk situations, sensors should continuously track the most distinguishing primary physiological parameters.The set of parameters depends on the area of the system application, as well as the complexity of the equipment implemented into the system.According to the medical practice, physiological parameters that specify the work of both respiratory and heart systems are crucial for the instant evaluation of the patient health status.At the present stage of our investigation, we confined ourselves to the monitoring of respiratory function and ECG and focused on the health state evaluation algorithms based on respiratory rate (RR) and heart rate (HR) estimation.However, other physiological parameters (body temperature, blood pressure) could also be used in the monitoring system as complementary sources of information.
Figure 1 presents a schematic diagram of the wireless monitoring system proposed in this work.The whole system consists of the worker's wearable equipment, a smartphone, and remote units: the co-worker's or principal staff's cellphones and a server at the medical observation centre.The wearable equipment includes the respiratory sensor and ECG sensor units, while each of them combines passive sensors integrated into the T-shirt and a hardware for analog signals conditioning.All signal processing and transmission circuits are placed into a separate data transmission unit (DTU), which is attached to the same T-shirt through special clip-contacts.DTU performs three main functions: analog signal conditioning, conversion into digital and raw data transmission via Bluetooth to the smartphone.In order to increase a lifetime of the built-in rechargeable battery, all advanced data processing functions are shifted from DTU to the phone.A smartphone performs all procedures of digital signal processing: filtering of the respiratory and ECG signals, detection of distinctive points in these signals, estimation of the HR and the RR from these signals, and formation of the alarm signal, when the values of HR or RR exceed the predefined ranges.
The smartphone is also used for a Bluetooth transmission control, data visualization (a real-time visual feedback of physiological parameters), and alarm signal transmission through the General Packet Radio Service (GPRS).The inner services of the smartphone Global Positioning System (GPS) are used for expanding functional abilities of the system.Currently, the monitoring system uses GPS information for the detection of the worker's location when the alarm signal goes off.The price of overall monitoring system with a smartphone could be reduced since almost every ordinary smartphone could be incorporated into the system without any additional expenses.
The arrangement of the remote units of the monitoring system depends mainly on the area of application.The arrangement proposed hereto involves two additional smartphones and a remote computer.The system works as follows: after the alarm signal is transmitted, the co-worker receives this signal with the identification, location and the cause of the alarm to their own smartphone.The same information is also sent to the principal staff of the worker.A more comprehensive information is transmitted to the server of the medical centre.Along with the alarm signal and data about the user, the server receives data on HR and RR values and processed signals of the ECG and Respiratory Inductive Plethysmography (RIP).All data and signals received by the server are stored in its memory.

A. RIP Sensor Unit
In order to ensure the mobility and comfort of the person under observation, a fairly non-invasive respiratory rate monitoring technique has been proposed in this article.It involves an RIP method, which is one of the non-invasive methods used to measure a respiratory rate and other respiratory function parameters for medical treatment purposes and has been approved by major healthcare institutions.
RIP uses an inductive sensor made of insulated wires woven or sewn in a sine wave pattern on an expandable belt.A wavy formation of the wires allows an easy expansion of the belt.Usually, the method involves two belts placed around the rib cage and the abdomen.During respiration, the length of the belts varies and, also, the self-inductance of the coils changes proportionally.By measuring the variation in the self-inductance of the coil, the variation of the circumference of the rib cage and abdomen can be detected.This circumference is proportional to the tidal breath.After obtaining these data, the system calculates the respiratory rate.
The method has its own limitations, which are discussed in literature.One of the most challenging problems is the sensitivity to body movements and posture changes [14].In fact, various approaches to the technical realization of the inductive sensors presented in different works still cannot provide the answer to the question of how the parameters wire pattern woven or sewn along the belt affect the characteristics of the RIP sensor.In addition, the equipment requires calibration by a spirometer and balancing of the abdominal and chest wall signals, respectively.
This paper provides certain experiments that were used to find the parameters and the effectiveness of the differently shaped respiratory sensors that mainly affect the reliability of the acquired data.The experiments included the dependency evaluation of the inductive coil sensitivity on its geometrical parameters: height, density and shape of the wire waves.Also, the experiments with several parallel coils connected in series were made in attempt to achieve a higher sensitivity of the sensor.
Based on the experimental results, the respiratory belt was designed and manufactured.It is composed of three parallel wires interwoven into one textile belt during manufacturing process (Fig. 2).The belt itself is attached to the textile Tshirt and surrounds the lower part of the rib cage.The special low wave formation of the wire (approx.height of the wave -5 mm) allows a low resistance stretch along the belt and at the same time it is robust to the cross folds up of the wire.The respiratory signal processing circuit proposed in this article contains a variable frequency oscillator with an inductive sensor in the oscillatory circuit, respiratory signal demodulator, band-pass filter, and amplifier (Fig. 3).

Filter Amplifier
To ADC Fig. 3. Structure of respiratory signal processing unit.
Frequency of the signal generated by the oscillator varies according to the inductance changes produced by the inductive sensor.The nominal frequency is set to 300 kHz.
A demodulator and filter together present frequency to a voltage converter.The demodulator transforms the oscillator signal into a pulse signal with a constant pulse width and frequency the same as generated by the oscillator.A bandpass filter cuts off noise beyond the frequency range from 0.02 Hz to 80 Hz.Signal amplifier is used to adjust the output signal to match the input of the microcontroller.The microcontroller used for primary signal processing and transmitting is Texas Instrument's MSP430F168.12-bit resolution ADC module integrated within MSP430F168 is used for the RIP signal sampling.Sampling rate for RIP sensor signal is set to 100 Hz.

B. ECG Sensor Unit
The ECG sensor unit uses ECG electrodes and signal conditioning circuit for obtaining an amplified and preprocessed electrocardiogram signal.The output signal of the unit is used to calculate the heart rate.
A textile T-shirt is used as a basis of wearable sensors, in which the flexible ECG electrodes are pre-integrated by a manufacturer.One flexible electrode takes an area of about 65 mm × 20 mm and is connected to the signal processing unit through a metal snap.The electrodes on the shirt are arranged in the way that the first (I) standard lead of the ECG is measured.
The active part of the heart rate sensor unit was developed and implemented by the authors.The structure of this analog preprocessing module of the ECG signal is shown in Fig. 4. The so-called right-leg scheme is used for the common mode noise reduction in the ECG sensor unit.The common mode voltage (DC electrode offset potential and 50 Hz ACinduced interference) of the first amplification stage is amplified by the common mode signal (CMS) amplifier inverted by the inverter and fed back to the human body.In this case, the negative feedback reduces the common mode voltage to a low value.
The processed and amplified analog ECG signal is passed to the analog-to-digital converter (ADC) in a microcontroller.ADC module of MSP430F168 is used for the ECG signal sampling.The sampling rate for ECG signal is set to 200 Hz.In order to avoid the aliasing noise caused by the conversion, an anti-aliasing filter is used.

A. Features of RIP and ECG Signals
Digital signals from the microcontroller are wirelessly transmitted to the smartphone for further processing.Despite the analog filtering, digital signals still possess a significant amount of different kind of noise.
A series of experiments were made to find how different factors of the environment and human activities influence the noise in the signals.The most influential noise is caused by the body movement: walking, torso rotation, leaning, etc.Digital RIP signals during rest and during motion are presented in Fig. 5.When a man breathes still (no movement), the RIP signal only has a low amplitude high frequency noise (Fig. 5(a)).The average amplitude of the noise reaches 1/10 -1/20 of the signal's amplitude.On the other hand, walking adds a significant noise to the signal (Fig. 5(b)).The average amplitude of the noise during walking might be twice as signal's amplitude.The highest ECG signal noise is observed during the torso motions.In this case, the average amplitude of the noise exceeds the ECG signal up to 6 times.The noise is mainly induced by the change of electrode-body contact resistance, body tissue impedance, and electrode shape.Examples of the digital ECG signals gathered during the rest periods and during torso rotation are illustrated in Fig. 6.
Analog signal processing ensures a 50 Hz and high frequency noise suppression, which is not significant in the obtained ECG digital signal even when a person is near 230 V power network lines and near Wi-Fi routers (Fig. 6(a)).Even a 2.4 GHz transceiver applied in the system for wireless data transmission does not cause visible high frequency noise in the digital ECG signal.

B. RIP Sensor Signal Processing and Respiratory Rate Evaluation
There is a considerable high frequency noise present in the sampled sensor signal of the inductance plethysmography respiration.The noise could introduce errors in respiratory rate evaluation.Digital low-pass infinite impulse response (IIR) filter is implemented to suppress the high frequency noise.Butterworth sixth order filter with a cutoff frequency fc = 5 Hz is applied.Implementation of the filter is where β is filter output values, α refers to values of the original digital RIP signal, ak and bk are low-pass filter coefficients, K and L are numbers of the filter coefficients ak and bk respectively, i stands for the index of the recent value.The original digital respiratory signal during rest and signal after the processing stage is shown in Fig. 7.
The scale of the amplitude here is magnified four times in comparison with Fig. 5(a) and lower respiratory amplitude (shallow breathing) is presented to reveal the influence of the high frequency noise to the respiratory signal.The filter suppresses this noise up to 15 times.
Motions not directly related to the torso motions, such as walking, induce a noise of a slightly higher frequency than respiratory signal.In order to reduce the noise, moving average filter is applied in the next processing step.The implementation of the filter is as follows where ξ is output value of the filter, N refers to the number of points in the average.The implementation of this kind of filter does not require a lot of calculations [15].Figure 8 illustrates how this moving average filter affects the respiratory signal obtained during walking.The noise is reduced about 20 times-25 times after this filter.Human body leaning, torso rotation and other body motions cause significant RIP signal deviations from a zero value resulting in a high amplitude low frequency noise.In this case a respiratory signal might not cross a zero line in a different inhalation/exhalation phases, and a traditional logic of the zero crossing point detection would be ineffective.Therefore, the method based on positive and negative peak detection by applying an adaptive, relatively wide moving difference window and signal peak amplitude evaluation was developed and implemented in the system to ensure a reliable respiratory events (inspiration or expiration) identification.
The positive peak of respiratory signal within a moving window is detected if the following condition is met: ( 1) 0, ( ) 0, where Δξ+ is a result of difference of the first and the last values of the moving positive peak detection window: where l+ stands for the length of the moving difference window for the detection of the positive peak.
Value of the recent positive peak ξP+(h+) is found where "round" is rounding to an integer value operation, h+ refers to the index of current positive peak value.
Negative peak is detected if the following condition is met: ( 1) 0, ( ) 0, where Δξ-is the result of the difference of the first and the last values of the moving negative peak detection window: and lstands for the length of the moving difference window for the detection of the negative peak.
Value of the recent negative peak ξP-(h-) is found as follows where his index of the current negative peak value.Lengths of the moving difference windows of the positive and negative peak detection l+ and lare adaptive: they are inversely proportional to the respiratory rate.Relatively wide moving difference windows are applied for better reliability.The order of the window length is similar to the signal wave length of a single inspiration (or expiration).The length of the difference window applied for the inspiration peak detection is chosen smaller in comparison to the difference window length l+< lof the expiration peak detection because of the sharper corresponding signal wave form.
In order to decide whether the recent waves are caused by respiration or noise, the additional condition is checked where ξP(r) is r-th peak-to-peak amplitude of the recent wave's amplitude, ξTH -a threshold.
Waves are considered to be the inspiration/expiration waves if the condition (11) is true.Value ξTH is the adaptive threshold estimated as a median value of the last detected respiration induced peak values where CR is respiration threshold coefficient, NRP -a number of the last detected peaks and "median" is the median value detecting procedure.Experimentally chosen values of CR = 0.36 and NRP = 5 are applied in the system.Threshold value and array of the last five peak-to-peak amplitude values of the respiration wave are updated each time the inspiration peak is detected.Respiratory rate is recalculated and refreshed after each inhalation induced peak is detected.The current respiratory rate value in breaths per minute is estimated as follows where TIP-IP is a time period between the last two detected inspiration induced signal peaks expressed in seconds.

C. Electrocardiogram Signal Processing and Heart Rate Evaluation
The heart rate evaluation is based on QRS complex extraction and QRS complex peak detection.The QRS complex detection algorithm was developed.This algorithm includes signal processing operations, positive peak detection and peak amplitude assessment.The signal processing part of the algorithm is similar as in the Pan-Tompkins algorithm [16] with some modifications.The modifications involve the implementation of the band-pass filter of the eighth order infinite impulse response (IIR).The cut-off frequencies of the filter are fc1 = 14 Hz and fc2 = 20 Hz.The implementation of the filter is presented in (1).The filter ensures a better noise suppression and replaces the original Pan-Tompkins two-pole filter and the derivative that are designed for the implementation on the fixed point processors.The original ECG signal and the signal after filtering is shown in Fig. 9.
The filtered signal is being squared to get a better emphasis on QRS complexes and to avoid negative values.The signal after squaring operation is shown in Fig. 10.
The QRS complex is determined by detecting the peak in the processed signal.There are a few related to every QRS complex in the signal.These peaks are smoothened by the moving average filter  , where yMA is the filter output value, L refers to the number of points in the average.
Examples of the original ECG signal and signal after this processing step are provided in Fig. 11.
The algorithm based on the positive peak detection by applying a relatively wide moving difference window and signal peak amplitude evaluation using the adaptive threshold was developed to estimate the heart rate.
The moving difference window is applied for the maximum peak detection.A signal maximum peak is detected when the following condition is met: where ΔyMA stands for the difference between the side values of the processed signal moving window: and l is the length of the moving difference window expressed by a number of samples.Further, the amplitude of the detected maximum is compared to an adaptive threshold yTH to determine, whether the peak is a QRS peak or a noise peak.If the condition MA TH round , 2 is met, the detected peak is considered a QRS peak.
Value of the last detected QRS peak is as follows where m is index of recent detected QRS peak.
The adaptive threshold is estimated as a median value of the last detected QRS peak values where TQRS-QRS is a time period between the last two detected QRS peaks expressed in seconds.
The proposed algorithm misses meanly 3 QRS peaks out of 200 in the signals taken during motion.

V. EXPERIMENTAL TESTING
The accuracy of the wearable equipment and data processing algorithms has been experimentally tested by comparing its readings against the measurements of the portable medical Mindray patient monitor MEC-1000, which was used here as a reference device.Respiratory rate measurement with MEC-1000 is based on the impedance plethysmography method.Accuracy of the monitor is 1 % for heart rate measurements and 2 % for respiratory rate measurements.
Five participants took part in this experiment.All of them were males, between 29 and 57 years old.Sensors of both monitoring systems were placed on the same individual at the same time and readings from both systems were registered simultaneously.The I standard lead was used for the measurements of heart rate with the monitor MEC-1000.30 successive readings of each parameter were taken from each of the participants.Readings were taken in random order with the breaks of twenty seconds at least between each measurement to ensure that the previous measurements do not influence the present ones.A total of 150 readings were acquired for respiratory rate and the same number of readings for heart rate with both systems.
After collecting all experimental data, differences of measurement results between both systems were analysed.The average difference between heart rate values was 0.26 beat per minute (bpm), and the standard deviation was 1.77 bpm.Compared to the variation of measured parameter values (61 ... 93 bpm), these differences and deviation are quite irrelevant.
The average of respiratory rate differences was 0.24 respirations per minute (rpm) and the standard deviation was 3.83 rpm, when the respiratory rate varied within 9 rpm-21 rpm range.
By verifying, whether the developed system does not have any methodological error, it was relied on the assumption that if the errors are random the data should be distributed by the normal distribution law.The Kolmogorov-Smirnov test was performed to define this assumption, using the level of significance α = 0.05 (standard case).After the verification by this test, it was found that data are distributed by the normal distribution law for both heart rate and respiratory rate parameters.
A statistical analysis was performed for the quantitative evaluation of previously obtained results.A paired samples T-test was used to find out whether the differences between measurements of both systems are statistically insignificant.The level of significance was used in this testing (α = 0.05).The results of the test showed that the differences of heart rate parameter values measured by the developed monitoring system and compared to the ones measured by the metrologically certified monitor MEC-1000 are not statistically significant (p-value is 0.358).The same outcome was reached with the values of respiratory rate parameter (in this p-value is 0.66).Actually this means that difference of accuracy of both monitoring system are statistically insignificant, which also let as assume that indications of wearable monitoring system could be trustworthy and practically applicable.

VI. CONCLUSIONS
The respiratory rate evaluation method is based on the detection of positive and negative peaks in the digital RIP signal.The proposed algorithm involves a digital low-pass sixth order Butterworth filter with 5 Hz cutoff frequency which suppresses the high frequency noise about 15 times and a moving average filter which reduces the noise of walking and other body movements 20-25 times.For the detection of positive and negative peaks, relatively wide adaptive moving difference windows that are inversely proportional to the respiratory rate are proposed.In order to eliminate the false peaks, the median threshold criterion is applied in the decision making stage.These solutions ensure a good reliability during the presence of low frequency deviations from a zero value line, typically caused by human torso motions, such as rotation, leaning, etc.
Various body motions produce noise in ECG signal that might exceed the signal up to 6 times.The proposed heart rate evaluation algorithm involves a QRS complex extraction with the eight order IIR band-pass filter, and QRS peak detection, using a fixed length moving difference window and a median threshold criterion.This algorithm enables a detection of QRS complexes with 98.5 % reliability for ECG signals taken during body motion.
The accuracy of the wearable equipment and data processing algorithms has been experimentally tested by comparing its readings with the parallel measurements of the portable medical patient monitor MEC-1000, the accuracy of which is 1 % for heart rate measurements and 2 % for respiratory rate measurements.The results revealed normal distribution of the differences of heart rate and respiratory rate values measured with both devices.For both cases, these differences were statistically insignificant (p-values 0.385 for heart rate and 0.66 for respiratory rate measurements by standard t-tests), which means that the difference of accuracy of both monitoring systems are statistically insignificant.

Fig. 2 .
Fig. 2. Fragment of inductive sensor with 3 parallel coils interwoven into expandable belt sewn into T-shirt.

Fig. 4 .
Fig. 4. Structure of ECG signal processing unit.The ECG signal is amplified 500 times by two amplification stages.The first stage amplifies the signal about 5 times.The amplifying gain is chosen low because the amplified signal in this stage can contain high value of the offset voltage caused by the electrode polarization, movement or other phenomena.This voltage can saturate the amplifier.The inverter, integrator and the adder closed in negative feedback loop are used for the continuous compensation of this voltage.Correctional voltage (an integrated negative value) passes from the integrator to the adder and that way reduces the offset error of the signal fed to the second amplification stage.This solution enables the amplification of the signal in the second amplifying stage with higher gain without saturating the amplifier.The so-called right-leg scheme is used for the common mode noise reduction in the ECG sensor unit.The common mode voltage (DC electrode offset potential and 50 Hz ACinduced interference) of the first amplification stage is amplified by the common mode signal (CMS) amplifier inverted by the inverter and fed back to the human body.In this case, the negative feedback reduces the common mode voltage to a low value.The processed and amplified analog ECG signal is passed to the analog-to-digital converter (ADC) in a

Fig. 7 .
Fig. 7. Original RIP signal during rest (upper curve) and the same signal after low-pass IIR filter (lower curve).Time scale is 2 s/div.

Fig. 8 .
Fig. 8. RIP signal filtered by low-pass IIR filter during walking (upper curve) and the same signal further filtered by moving average filter (lower curve).Time scale is 2 s/div.

Fig. 9 .
Original ECG signal (upper curve) and ECG signal processed by band-pass filter (lower curve): (a) during rest and (b) motion.Time scale is 0.5 s/div.(a) (b) Fig. 10.Original ECG signal (upper curve) and filtered ECG signal after squaring (lower curve): (a) during rest and (b) motion.Time scale is 0.5 s/div.(a) (b) Fig. 11.Original ECG signal (upper curve) and filtered ECG signal after squaring and filtering by moving average filter (lower curve): (a) during rest and (b) motion.Time scale is 0.5 s/div.
where NQRS is the number of the last detected QRS peaks applied for the threshold evaluation (the value of NQRS = 5 was chosen experimentally), CQRS is QRS threshold coefficient (the value of CQRS = 0.32 was applied).The threshold value and array of the last five QRS values are updated each time a QRS peak is detected.Heart rate is recalculated and refreshed after each QRS complex is detected.A current heart rate value in beats per minute is estimated by the following formula QRS