1. Introduction
The application of technology in sports science has rapidly evolved over the past decade, transforming how athletic performance is monitored, analyzed, and optimized [
1,
2]. Technological advancements have enabled the collection of increasingly sophisticated physiological and kinematic data from both laboratory and field settings through portable, unobtrusive, and wireless-capable devices [
3,
4]. Among these advancements, inertial measurement units (IMUs) have emerged as particularly valuable tools for quantifying physical activity and performance metrics [
5,
6,
7]. These technologies allow for the collection of substantial external load performance data in various environments, and many can synchronize with physiological sensors that measure internal load parameters, such as heart rate [
8,
9,
10].
High-intensity interval training (HIIT) has become increasingly prominent in both athletic training regimens and general health applications due to its demonstrated efficiency in improving cardiovascular fitness and metabolic health [
11,
12]. HIIT consists of alternating periods of high-intensity exercise performed at near-maximal effort (typically 80–95% of maximum heart rate), interspersed with periods of lower-intensity recovery or complete rest [
13]. The high-intensity intervals generally range from 10 to 30 s, though they can vary depending on the participant’s fitness level, with the total session duration typically between 18 and 30 min [
14]. While recovery periods are incorporated between high-intensity exercise bouts, the duration and completeness of recovery vary significantly across different HIIT protocols, with some allowing full recovery and others deliberately incorporating incomplete recovery as part of the training stimulus [
14]. This training modality has shown substantial benefits across diverse populations, including improvements in body composition, cardiorespiratory fitness, insulin sensitivity, and even cognitive function and psychological well-being [
15,
16,
17,
18].
Despite its effectiveness, proper implementation of HIIT requires precise monitoring of physiological responses, particularly heart rate dynamics, to ensure that intensity targets are met and that adequate recovery occurs between intervals [
14]. Heart rate monitoring during HIIT provides crucial information about cardiovascular strain and recovery capacity, which directly informs training prescription and adaptation assessment [
19]. Traditional approaches to HIIT monitoring have relied on manual observation and the interpretation of heart rate data by coaches or sports scientists, which is time-consuming, potentially inconsistent, and not scalable for large groups or remote training settings [
20,
21]. Exercise specialists remain essential both for monitoring physical and physiological responses during HIIT, so automated heart rate detection helps them to provide more precise supervision and focus on correct execution and injury prevention during training.
Examining heart rate signals during HIIT sessions reveals characteristic patterns of peaks (maximum) during high-intensity intervals and valleys (minimum) during recovery phases [
14,
22]. These data points provide valuable insights into cardiac responses to high-intensity exercise and the efficiency of recovery between intervals. The rate of increase in heart rate during work intervals (ascending slope) and the rate of decrease during recovery (descending slope) offer particularly valuable metrics for assessing cardiovascular fitness and adaptation to training [
23,
24]. However, the manual identification of these features is labor-intensive, subject to human error, and impractical during real-time training sessions [
20], highlighting the need for automated approaches that can process physiological data with greater consistency and efficiency [
25].
Automated algorithmic analysis of physiological data presents a solution to these challenges by providing real-time, objective, and consistent evaluation of heart rate responses during HIIT without requiring constant expert supervision [
26]. The application of algorithmic approaches to physiological signal processing has advanced considerably in recent years [
27], yet there remains a notable gap in the literature regarding automated real-time analysis of heart rate data specifically for HIIT applications. In this sense, we found a notable gap in the automated analysis of heart rate dynamics during HIIT protocols, indicating a significant opportunity for methodological innovation through specialized algorithms that can automatically detect and analyze heart rate behavior in exercise, recreation, and fitness.
Therefore, the present study addresses this gap by proposing a novel algorithm for the automated real-time detection of key heart rate parameters during HIIT sessions. Our algorithm is designed to identify maximum and minimum heart rate signals and calculate additional metrics, including ascending and descending slopes and intermediate averages between these values. These parameters provide comprehensive insights into cardiovascular response and recovery efficiency, enabling an objective assessment of an athlete’s performance and adaptation to HIIT protocols without the experts being involved in the continuous supervision of the heart rate of the exercisers.
2. Materials and Methods
2.1. Design
This study employed a descriptive, cross-sectional design to develop and validate an algorithm for the automated detection of heart rate parameters during high-intensity interval training (HIIT) in indoor cycling. The research was conducted at the Faculty of Sports Sciences of the University of Murcia. The algorithm development and mathematical analysis were performed at the Department of Applied Mathematics and Statistics at the Polytechnic University of Cartagena (Murcia, Spain).
Data collection occurred over a four-week period (February–March 2025), following a three-phase protocol: (1) participant recruitment and screening, (2) data collection during standardized HIIT indoor cycling sessions, and (3) algorithm development and validation through a comparison of detected heart rate parameters with manually identified reference points. This approach allowed for a comprehensive examination of the heart rate dynamics across different phases of the HIIT sessions, with particular emphasis on the identification of maxima, minima, and slope characteristics. The flow of the experimental design is shown in
Figure 1.
2.2. Participants
The initial recruitment process yielded 33 interested individuals, of whom 28 met the eligibility criteria and were enrolled in the study. Three participants subsequently withdrew (two due to scheduling conflicts and one due to an unrelated injury), yielding a final sample of twenty-five healthy adults (18 males and 7 females; age: 20.7 ± 2.3 years; height: 172.4 ± 8.1 cm; weight: 69.8 ± 10.2 kg; BMI: 23.5 ± 2.4 kg/m2; resting heart rate: 65.3 ± 7.8 bpm; maximum heart rate: 187.2 ± 6.5 bpm; training experience: 3.4 ± 1.5 years) who completed the study. The recruitment protocol employed a non-probabilistic purposive-sampling methodology within the university population. Subject acquisition was facilitated through institutional channels of communication, including departmental notice boards and electronic correspondence systems.
Initial screening was conducted via a comprehensive health and physical activity habits questionnaire to establish preliminary eligibility.
For consideration in the study, the participants were required to meet the following inclusion criteria: (a) university students, (b) regular endurance/aerobic exercise training at least six months previous to the study, (c) no orthopedic, respiratory or cardiovascular diseases that would interfere with exercising, (d) no medications that interfere with heart rate response, and (e) familiarity with HIIT protocols. Specifically, the endurance/aerobic exercise training consisted of 3–4 weekly sessions of moderate-intensity continuous training, each lasting 30–45 min at 60–75% of maximum heart rate, and included running, cycling, and swimming predominantly. The exclusion criteria included (a) pregnancy, (b) uncontrolled hypertension (blood pressure > 140/90 mmHg), (c) recent musculoskeletal injury (<3 months), and (d) inability to complete the familiarization session.
Prior to participation, all volunteers completed the Physical Activity Readiness Questionnaire (PAR-Q+) to ensure their safety for high-intensity exercise. Participants were instructed to maintain their regular diet, avoid alcohol consumption for 24 h before testing sessions, avoid caffeine intake for at least 3 h prior to testing, and refrain from intense physical activity for 48 h before each experimental session. The study protocol was approved by the Bioethics Committee of the University of Murcia (reference number: 3495/2021) and conducted in accordance with the Declaration of Helsinki. All participants provided written informed consent prior to participation.
2.3. Equipment and Data Processing
Heart rate data were collected using Garmin HRM-Pro heart rate bands (Garmin Ltd., Olathe, KS, USA), which transmitted real-time heart rate data via an ANT+ protocol to the WIMU PRO wearable inertial measurement devices (RealTrack Systems, Almería, Spain). The WIMU PRO system combines various sensors in a lightweight 70 g unit of 81 × 45 × 16 mm and has been previously validated for heart rate registration during physical activity, showing excellent agreement (ICC > 0.96) with criterion measures [
9]. The inertial devices were secured to the participants’ upper backs using adjustable harnesses. The WIMU PRO devices recorded the heart rate data at a sampling frequency of 10 Hz, which were stored in the internal memory of the devices during the exercise sessions and subsequently transferred to a computer via USB connection for processing.
Data processing was performed using SPRO™ software (Version 956, RealTrack Systems, Almería, Spain) for initial data extraction and quality control, followed by custom algorithms developed in MATLAB (Version R2024a, MathWorks Inc., Natick, MA, USA). The raw heart rate data underwent preliminary processing to eliminate artifacts using a moving median filter with a window size of 5 samples, which effectively removed spurious readings while preserving the physiological dynamics of the heart rate signal. This approach has been recommended for pre-processing heart rate data in exercise settings [
28]. Following artifact removal, the heart rate data were smoothed using a 7-point moving average filter to reduce random noise while retaining the characteristic patterns of cardiac response during high-intensity intervals and recovery periods.
For the algorithm development, the processed heart rate data were segmented into individual HIIT cycles consisting of high-intensity work intervals and recovery periods. The segmentation was performed automatically using the timestamps recorded during the experimental protocol and verified through visual inspection of the data. Custom MATLAB functions were then developed to identify local maxima and minima in the heart rate signal, calculate the ascending and descending slopes, and determine intermediate averages between the extrema (see
Section 2.5 for more details). The detection algorithm implemented a peak-finding function with adaptive thresholds based on the signal’s local characteristics, which improved accuracy in identifying true physiological peaks while rejecting artifacts.
2.4. Procedures
All testing sessions were conducted in a climate-controlled indoor cycling facility maintained at 21 ± 1 °C and 50 ± 5% relative humidity. Each participant completed six sessions, a preliminary assessment and familiarization session, and three standardized HIIT protocol sessions. The sessions were separated by at least 48 h but not more than seven days to minimize the effects of training adaptations while ensuring recovery between sessions. The preliminary session included anthropometric measurements (height and weight), resting heart rate assessment after 10 min of seated rest, and completion of the PAR-Q+ questionnaire. The participants were then familiarized with the indoor cycling bicycles, the equipment, and the HIIT protocol.
For the experimental sessions, the participants arrived at the laboratory in a rested state and were fitted with the Garmin heart rate band and WIMU PRO device. After a 5 min seated rest period to establish baseline heart rate, the participants completed a 10 min standardized warm-up on the cycling bikes, consisting of 5 min of light cycling (RPE 3–4 on a 10-point scale) followed by 5 min of progressive intensity increases, including three 20 s accelerations to prepare for the high-intensity intervals. The HIIT protocol consisted of three standardized sessions that all participants completed, including Session 1 with five intervals, Session 2 with eight intervals, and Session 3 with eleven intervals. Each session included HIIT intervals at high intensity (85–90% of estimated maximum heart rate) interspersed with active recovery periods (60–65% of estimated maximum heart rate).
Participants were instructed to maintain cadence between 85 and 95 rpm during high-intensity intervals and 60–70 rpm during recovery intervals, with the resistance adjusted individually to achieve the target heart rate zones. As shown in
Figure 2, the indoor cycling facility was equipped with stationary bikes arranged to allow instructor supervision, and a large display screen mounted on the wall provided participants with real-time visual feedback on their current heart rate, exercise zones, and time remaining in each interval. Verbal encouragement was standardized throughout the sessions.
Following the HIIT intervals, the participants completed a 10 min cool-down consisting of low-intensity cycling with gradually decreasing resistance. Heart rate data were recorded continuously from the beginning of the warm-up until the end of the cool-down period. Only the data of the main part of the session (HIIT intervals) was utilized for further analysis. Throughout all sessions, a certified indoor cycling instructor supervised the protocol to ensure correct execution, and a researcher monitored heart rate responses to verify that the participants were reaching the intended intensity zones.
2.5. Signal Processing and Algorithm Development
The collected data were analyzed using a systematic approach that integrated signal processing and algorithm implementation. The initial phase of signal processing involved filtering and smoothing the raw IMU data (10 Hz) using a moving average filter to minimize noise while retaining key movement patterns. In the second step, local maxima and minima are detected, and then the key features, such as slopes and time intervals between these points, are calculated. Finally, the results are visualized to facilitate interpretation.
- A.
Filtering and smoothing
The code divides the series into n equal parts and computes the mean in each subinterval.
- B.
Detection of Local Maxima and Minima
The mean values are analyzed and compared with their neighbors to identify the local maxima and minima (Algorithm 1).
Algorithm 1. Detection of Local Maxima and Minima |
j ← 1 i ← 1 For k from 3 to n − 3 do M ← [means[k − 2], means[k − 1], means[k + 1], means[k + 2]] If means[k] ≥ max(M) then maxima[i] ← means[k] xmax[i] ← k i ← i + 1 End If If means[k] ≤ min(M) then minima[j] ← means[k] xmin[j] ← k j ← j + 1 End If End For xmin ← [1, xmin, n] # Include the endpoints as minima minima ← [means [1], minima, means[n]] |
- C.
Calculation of Slopes, Time Intervals, and Intermediate Averages
The following calculations are performed (Algorithm 2):
Ascending slopes: change in value between a minimum and the next maximum;
Descending slopes: change in value between a maximum and the next minimum;
Intermediate averages: Average between a maximum and its preceding minimum.
(The coordinates are rescaled beforehand, considering the exercise duration.)
Algorithm 2. Calculation of Slopes, Time Intervals and Intermediate Averages |
For k from 1 to i-1 do ascending_slopes[k] ← (maxima[k] − minima[k]) / (xxmax[k] − xxmin[k]) intermediate_averages[k] ← (maxima[k] + minima[k]) / 2 End For For k from 2 to i do descending_slopes[k-1] ← (minima[k] − maxima[k-1]) / (xxmin[k] − xxmax[k-1]) End For |
- D.
Visualization of Results
Two graphs are generated, as shown in
Figure 3:
4. Discussion
The present study aimed to develop an automated algorithm for the real-time analysis of heart rate parameters during HIIT sessions, addressing the need for objective monitoring without manual supervision. Our results demonstrate the effectiveness of this algorithm in automatically identifying the maxima and minima in heart rate signals with a 100% detection rate and a 97.8% agreement with expert manual identification. This automation significantly reduces human error and analysis time while providing reliable quantification of critical heart rate dynamics during high-intensity exercise, addressing the limitations of traditional manual methods highlighted by Achten and Jeukendrup [
20] and more recently by Alugubelli et al. [
21].
Our findings reveal that a well-executed HIIT session exhibits a characteristic pattern of progressively increasing maxima and minima, indicating appropriate cardiovascular adaptation throughout the training session, consistent with established principles of HIIT design [
14]. When this progressive trend is not observed, it may signal fatigue accumulation, inadequate recovery between intervals, or suboptimal execution of the training protocol. The calculation of ascending and descending slopes from the detected extrema points offers particularly valuable insights into cardiovascular fitness. Participants with higher ascending slopes (faster heart rate increase during work intervals) and lower descending slopes (slower recovery during rest periods) demonstrated poorer physical condition, suggesting that these metrics can serve as objective indicators of fitness level and training adaptation. This aligns with previous research on heart rate recovery as a fatigue-monitoring tool [
23], cardiac parasympathetic reactivation [
22], and heart rate recovery as an indicator of training status [
24]. Meta-analysis evidence further supports that autonomic heart rate regulation provides sensitive markers of training status that can be used to optimize athletic performance [
25].
The intermediate averages calculated between maxima and minima provide additional context for interpreting the cardiovascular strain experienced during HIIT sessions. These values, representing the mean heart rate during transitions between the high-intensity and recovery phases, can help quantify the overall training load and evaluate whether the athlete is maintaining appropriate intensity zones throughout the session. Previous research emphasized the importance of contextualizing heart rate measures for training prescription [
19], and our approach provides such context through automated parameter extraction. Our analysis showed that these intermediate values tend to increase progressively in well-executed HIIT sessions, reflecting the expected cardiovascular drift phenomenon during prolonged interval training, a physiological response well-documented in previous research on high-intensity exercise [
14,
15].
The algorithm’s rapid processing time (averaging 1.23 ± 0.18 s per session) enables real-time feedback applications, which could significantly enhance the practical utility of heart rate monitoring during HIIT training. This processing efficiency aligns with recent technological advancements in wearable sensors and real-time monitoring [
1,
2]. Compared to traditional manual analysis methods that require substantial time investment and expert interpretation [
20], our automated approach provides an immediate objective assessment with minimal technical expertise required. This makes sophisticated heart rate analysis more accessible to coaches, practitioners, and healthcare providers working with diverse populations, supporting the integration of technology in sports science [
3].
A key strength of our approach is its ability to track these parameters longitudinally, creating individual historical records that enable assessment of training progress over time. By establishing baseline values for each athlete and monitoring changes in heart rate parameters across multiple sessions, trainers can make data-driven decisions about training prescription and progression. This personalized approach aligns with contemporary trends toward individualized training optimization and precision in sports science [
25,
26]. The application of algorithmic analysis to physiological data represents a growing trend in sports technology, particularly in integrating artificial intelligence with wearable devices for cardiovascular health management [
26] and fatigue monitoring [
27].
The physiological basis for our findings is supported by extensive research on HIIT’s cardiovascular effects. When considering the comparative effectiveness of HIIT and continuous training modalities such as MICT, it is essential to acknowledge the methodological challenges inherent in such comparisons. Recent meta-analyses have demonstrated that outcomes are highly dependent on how variables such as total work, exercise duration, and intensity are controlled across conditions [
12,
17]. Other research emphasized the importance of monitoring intensity to maximize these benefits [
13]. Our algorithm provides a practical method for quantifying these responses in real time, potentially enhancing HIIT’s effectiveness across various populations, including clinical settings where HIIT has shown promising health benefits [
11,
15,
18].
Several limitations should be acknowledged when interpreting our findings. First, our study included a relatively homogeneous sample of young, healthy university students with previous training experience, potentially limiting the generalizability to other populations, such as clinical patients or elite athletes. Second, while heart rate is a valuable indicator of cardiovascular strain, it represents only one aspect of the complex physiological response to HIIT. Research suggests that integrating multiple sensor types to monitor both internal and external workload would provide a more comprehensive assessment [
8]. Future research should incorporate additional physiological parameters, such as oxygen consumption, blood lactate, or muscle oxygenation, to provide a more holistic evaluation of training responses. Third, our algorithm was tested specifically in indoor cycling HIIT protocols, and its performance in other exercise modalities or training structures requires further validation, considering the diverse applications of HIIT [
16,
18].
Future research directions should include (1) a validation of the algorithm across diverse populations, including clinical patients using HIIT for rehabilitation and elite athletes seeking performance optimization; (2) integration with other physiological and performance metrics to create multivariate models of training adaptation, as suggested by recent reviews on wearable technology in sports; (3) the development of predictive algorithms that can forecast fatigue accumulation or training plateaus based on heart rate parameter trends; and (4) implementation in real-world training environments to assess practical utility and user acceptance among coaches and athletes, addressing the practical challenges in translating laboratory methods to field settings.
5. Conclusions
The automated algorithm developed in this study provides a reliable, efficient method for identifying key heart rate parameters during HIIT sessions without requiring manual supervision. The successful detection of maxima, minima, ascending and descending slopes, and intermediate averages offers valuable insights into cardiovascular responses to high-intensity interval training. The results demonstrate that well-executed HIIT sessions show a progressive increase in both maxima and minima, while the slope calculations serve as objective metrics for assessing cardiovascular fitness levels. This automated approach enhances objectivity in performance monitoring and enables real-time analysis of training responses.
From a practical perspective, this algorithm offers several advantages for practitioners, coaches, and healthcare providers implementing HIIT protocols. The automated analysis eliminates the need for a time-consuming manual review of heart rate data while maintaining high accuracy and consistency. Coaches can use the derived metrics to personalize training prescriptions based on individual cardiovascular responses, optimize work-to-rest ratios, and track progress over time. For participants, real-time feedback on heart rate dynamics can improve pacing strategies and help maintain appropriate intensity zones during HIIT sessions. In rehabilitation or health contexts, the objective quantification of cardiovascular strain and recovery efficiency can enhance safety and effectiveness when implementing HIIT with clinical populations. Future applications could integrate this algorithm into wearable technology and training software, making sophisticated heart rate analysis accessible in field settings without specialized equipment or expertise.