
ISSN No. 2321-2705 | DOI: 10.51244/IJRSI |Volume XII Issue VIII August 2025
Page 178
www.rsisinternational.org
Usage of Moving Average to Heart Rate, Blood Pressure and Blood
Sugar







ABSTRACT
In today's world, many people use wearable devices (like smartwatches) or health apps to keep track of
important health signs like heart rate, blood pressure, and blood sugar levels. These signs change over time,
and sometimes unusual changes (called anomalies) can be an early warning of a health problem.
To catch these problems early, we need a method that can monitor the data continuously and detect when
something is wrong. This thesis focuses on using a simple method called the Simple Moving Average (SMA).
It works by taking the average of recent values to smooth out short-term changes, helping to highlight real trends
or sudden shifts.
The SMA is easy to use and works well on devices with limited computing power (like small sensors or
wearables). This research shows how SMA can help detect abnormal patterns in health data, which could alert
doctors or users in real time.
In short, this study shows that even a basic algorithm like SMA can be useful for monitoring health and
spotting early signs of trouble, especially when used in real-time systems.
BACKGROUND
In recent years, there has been a significant rise in the use of digital health monitoring systems. Wearable
devices, smart health trackers, and mobile health applications now allow individuals to continuously monitor
vital signs such as heart rate, blood pressure, respiratory rate, and blood glucose levels. These systems
generate large amounts of time-series health data in real time.
Analyzing this data efficiently is crucial for early detection of abnormalities. Sudden spikes or drops in vital
signs can indicate medical conditions like heart arrhythmias, hypertension, or hypoglycemia. However, real-time
health data is often noisy and affected by short-term fluctuations, making it difficult to distinguish between
meaningful trends and random variation.
To address this challenge, signal smoothing techniques such as the Simple Moving Average (SMA) are used.
SMA is a statistical tool that helps reduce noise and makes underlying patterns in the data more visible by
averaging recent data points. It is simple to implement, computationally efficient, and well-suited for devices
with limited processing power.
Problem Statement
Many existing healthcare monitoring systems rely on complex machine learning models or require cloud
computing, which may not be suitable for real-time or resource-constrained environments. There is a need for a
lightweight and interpretable method to monitor health data and detect anomalies as they happen.

ISSN No. 2321-2705 | DOI: 10.51244/IJRSI |Volume XII Issue VIII August 2025
Page 179
www.rsisinternational.org
Objectives
The main objectives of this thesis are:
To apply the Simple Moving Average algorithm to real-time physiological data.
To design a system that can detect anomalies or trends in vital signs using SMA.
To evaluate the effectiveness of SMA in identifying early warning signs in health conditions.
Research Questions
Can SMA effectively smooth and interpret physiological signals in real-time?
How does the choice of window size affect anomaly detection performance?
How does SMA compare with other basic and advanced methods in detecting health anomalies?
Scope and Limitations
This study focuses on the use of SMA for health signal monitoring such as heart rate and blood pressure. The
system is designed for real-time processing on simple devices, such as microcontrollers or mobile platforms.
The project does not include complex predictive modeling or long-term disease forecasting.
Significance of the Study
This research demonstrates that a simple, transparent, and computationally light method like SMA can be used
for effective health monitoring. It is especially beneficial in low-resource settings, rural healthcare, or for
wearable device applications where real-time processing and battery efficiency are critical.
Overview of Health Monitoring Systems
Healthcare monitoring systems have evolved rapidly with the advancement of wearable technology, IoT (Internet
of Things), and biosensors. These systems are designed to collect, analyze, and interpret vital physiological data
such as heart rate, blood pressure, glucose level, and respiration rate in real time. Continuous monitoring
allows for early diagnosis, remote patient management, and preventive care.
According to [WHO, 2023], chronic diseases such as heart conditions and diabetes require continuous
monitoring to manage health risks. Hence, systems that provide accurate and timely detection of abnormal
health patterns are increasingly vital in modern healthcare.
Time-Series Data in Healthcare
Health monitoring generates time-series data, which is data collected over time at regular intervals. This data
can be noisy, irregular, or contain outliers due to environmental factors, sensor errors, or user movement.
Therefore, preprocessing and smoothing techniques are essential to ensure accurate interpretation of trends.
Several studies ([Zhang et al., 2021]; [Patel et al., 2020]) have shown the importance of using statistical and
signal-processing methods to clean and interpret physiological signals.
Signal Smoothing Techniques
Different techniques are used for smoothing and trend detection in health data:
Simple Moving Average (SMA): Averages a fixed number of past data points to remove short-term
fluctuations.

ISSN No. 2321-2705 | DOI: 10.51244/IJRSI |Volume XII Issue VIII August 2025
Page 180
www.rsisinternational.org
Exponential Moving Average (EMA): Gives more weight to recent observations.
Kalman Filter: A recursive algorithm often used for more accurate tracking of signals.
Wavelet Transform: Captures both time and frequency components, used in ECG signal denoising.
While more advanced methods like Kalman filters and machine learning are effective, they often require high
computational power and complex tuning. In contrast, SMA is known for its simplicity, speed, and
transparency, making it ideal for real-time health monitoring on low-power devices ([Lee et al., 2022]).
Simple Moving Average in Health Monitoring
Several researchers have explored the use of SMA for various healthcare applications:
ECG Signal Analysis: [Sharma et al., 2019] used SMA to smooth ECG signals and identify arrhythmias.
It was found to be efficient in reducing noise and revealing significant waveform patterns.
Blood Pressure Monitoring: [Gonzalez et al., 2020] implemented SMA in wearable blood pressure
monitors to detect sudden spikes or drops, helping in early hypertension management.
Blood Glucose Trend Detection: [Kumar & Rao, 2021] applied SMA to analyze blood glucose patterns
in diabetic patients, showing that it helped users recognize hypo- and hyperglycemia trends early.
These studies confirm that SMA can be a useful tool for trend analysis and anomaly detection, especially
when real-time decisions are needed.
Comparison with Other Methods
Technique
Complexity
Interpretability
Real-time Suitability
Resource Usage
SMA
Low
High
Good
Low
EMA
Medium
Medium
Good
Low
Kalman Filter
High
Low
Moderate
High
Machine Learning
High
Low
Varies
High
While advanced techniques can yield higher precision, they often require training data, high computation, and
less interpretability, which are major drawbacks in healthcare systems deployed on embedded or wearable
devices.
Identified Gaps
Although the effectiveness of SMA has been acknowledged, there is a lack of:
Real-world implementations of SMA-based monitoring in low-cost, real-time systems.
Comparative evaluations between SMA and other lightweight methods in live, noisy environments.
Adaptive SMA techniques that adjust the window size based on signal dynamics.
CONCLUSION OF LITERATURE REVIEW
The literature indicates that the Simple Moving Average is a promising method for real-time healthcare
monitoring due to its simplicity, low computational demand, and effectiveness in trend detection. However,

ISSN No. 2321-2705 | DOI: 10.51244/IJRSI |Volume XII Issue VIII August 2025
Page 181
www.rsisinternational.org
further research is needed to validate its performance in real-time systems and to enhance it for dynamic, noisy
conditions often seen in real-world health data.
Overview
This chapter describes the methodology used to develop a health monitoring system based on the Simple Moving
Average (SMA). The process includes data collection, preprocessing, application of the SMA algorithm,
anomaly detection, and system design for real-time health monitoring.
System Architecture
The proposed system consists of the following major components:
1. Data Acquisition Module Collects real-time health data from sensors (e.g., heart rate, blood pressure).
2. Data Processing Module Applies preprocessing and SMA.
3. Anomaly Detection Module Detects abnormal trends.
4. Alert and Visualization Module Displays real-time graphs and triggers alerts.
This can be implemented on a wearable device, mobile application, or desktop system, depending on the
application scenario.
Data Collection
Sources:
Wearable Sensors: Heart rate, blood pressure monitors (e.g., MAX30100, pulse sensors).
Public Datasets: MIT-BIH Arrhythmia Dataset, PhysioNet, UCI Health Data Repository.
Simulated Data: For testing, synthetic signals with injected anomalies are also generated.
Sampling Frequency: 110 Hz depending on the parameter being monitored.
Data Preprocessing
Before applying SMA, raw data must be cleaned:
Noise Filtering: Use a basic low-pass filter or median filter to remove sudden spikes.
Normalization: Convert all signals to a standard scale (e.g., 0 to 1 or z-score normalization).
Segmentation: Divide the continuous stream into windows for real-time analysis.
Simple Moving Average (SMA) Algorithm
The SMA is applied to smooth the time-series health signal:
Formula:




Where:

ISSN No. 2321-2705 | DOI: 10.51244/IJRSI |Volume XII Issue VIII August 2025
Page 182
www.rsisinternational.org
is the health data at time t
n is the window size
Example:
If the heart rate readings over the past 5 seconds are:
[80, 82, 85, 83, 81],
then SMAt=(80+82+85+83+81)/5=82.2 bpm.
Window Size Selection:
Small n: reacts quickly but captures more noise
Large n: smoother curve but slower to detect changes
Typical range: 515 samples
Anomaly Detection
After applying SMA, the smoothed signal is compared with a dynamic or static threshold to identify abnormal
events.
Approach:
Deviation Method:
Anomaly if: 

Where α\alphis a predefined threshold (e.g., 10% of SMA)
Z-score or Percentage Deviation can also be used for more adaptive detection.
Example:
If SMA of heart rate is 80 bpm, and current reading is 100 bpm, then:


  deviationPossible Tachycardia
System Implementation
Tools Used:
Programming Languages: Python, MATLAB, or C++ (for embedded systems)
Microcontrollers: Arduino, ESP32, Raspberry Pi (optional)
Software Libraries: NumPy, Pandas, Matplotlib (Python); Simulink (MATLAB)
User Interface:
Real-time graph plotting of raw and smoothed signals
Color-coded alerts (e.g., green = normal, red = anomaly)

ISSN No. 2321-2705 | DOI: 10.51244/IJRSI |Volume XII Issue VIII August 2025
Page 183
www.rsisinternational.org
Evaluation Criteria
Accuracy of Anomaly Detection
SMA Response Time
False Positive/Negative Rate
System Performance on Low-Power Devices
Ethical Considerations
All real patient data, if used, must be anonymized.
The system is not intended to replace professional medical judgment but to assist with early detection.
1. Set Up Simulated Heart Rate Data
In Excel, create a column of heart rate values (you can type in or copy this sample)

76
77
75
74
76
120 (Anomaly)
75
73
74
50 (Anomaly)
Introduction
This chapter presents the results of applying the Simple Moving Average (SMA) method to simulated heart
rate data in a health monitoring context. The analysis includes data smoothing, anomaly detection, and
visualization, followed by an evaluation of how effectively SMA identifies abnormal patterns in health signals.
Data Description
A simulated dataset of 10 heart rate readings was used to reflect real-time physiological changes. Two intentional
anomalies were introduced to evaluate the system’s detection ability:
Time (s)
Heart Rate (BPM)
6
120 (Tachycardia)
10
50 (Bradycardia)

ISSN No. 2321-2705 | DOI: 10.51244/IJRSI |Volume XII Issue VIII August 2025
Page 184
www.rsisinternational.org
These values significantly deviate from the average heart rate (~75 BPM), simulating realistic health alerts.
Application of SMA
A 3-point SMA was applied using Excel's =AVERAGE() function to smooth the data and reduce noise. The
moving average provided a stable trend line, effectively revealing deviations caused by the anomalies.
Sample SMA Values:
Time (s)
Heart Rate
SMA (3-point)
4
74
75.33
5
76
75.00
6
120
90.00 (SMA jump)
7
75
90.33
As seen above, the SMA at time t=6 increases significantly due to the spike, confirming the algorithm's
responsiveness to anomalies.
Anomaly Detection Results
An anomaly was flagged when the heart rate deviated more than 20% from the SMA:
Time
HR
SMA
Deviation %
Anomaly
6
120
90
+33.3%
10
50
65
−23.1%
Using this rule:
2 anomalies were correctly detected
No false positives or missed anomalies
Visual Results
The Excel chart showed:
Blue Line: Raw heart rate signal
Orange Line: SMA smoothed signal
Red Dots: Detected anomalies
This visual clearly separated normal fluctuations from critical deviations, making it easy to identify potential
health issues.

ISSN No. 2321-2705 | DOI: 10.51244/IJRSI |Volume XII Issue VIII August 2025
Page 185
www.rsisinternational.org
Performance Summary
Metric
Result
Total Data Points
10
Anomalies Injected
2
Anomalies Detected
2
Detection Accuracy
100%
False Positives
0
Computation Time
Instant (Excel)
Resource Usage
Minimal
DISCUSSION
The results demonstrate that:
SMA is effective in smoothing noise from raw health signals.
A simple threshold-based method using SMA is sufficient for detecting significant deviations in
physiological parameters.
The method can be implemented in Excel, embedded systems, or mobile apps for low-cost, real-time
monitoring.
Summary of Work
This thesis explored the use of the Simple Moving Average (SMA) algorithm for real-time health care
monitoring, with a focus on detecting anomalies in physiological data such as heart rate. The primary goal was
to evaluate whether a simple, low-computation method like SMA could be used effectively in healthcare
applicationsespecially on wearable devices or low-resource systems.
The methodology involved collecting (or simulating) health data, applying SMA to smooth out noise, and using
threshold-based rules to identify abnormal patterns. Implementation in Excel showed that SMA could clearly
highlight trends and detect sudden spikes or drops in heart rate data, such as tachycardia and bradycardia.
Key Findings
SMA effectively reduced noise and revealed meaningful trends in heart rate data.
Anomalies were detected with 100% accuracy in a controlled dataset with no false positives.
The approach is computationally efficient, making it suitable for real-time applications on embedded
systems, mobile apps, or Excel-based tools.
SMA is also easy to implement and interpret, which is useful for both engineers and healthcare
professionals.
Limitations
SMA uses a fixed window size, which may cause delays in detection or miss rapid changes if not tuned

ISSN No. 2321-2705 | DOI: 10.51244/IJRSI |Volume XII Issue VIII August 2025
Page 186
www.rsisinternational.org
properly.
It does not adapt to long-term trends or changes in baseline values.
Performance depends heavily on threshold values, which may vary by individual or context.
Recommendations for Future Work
To improve upon the current system, the following future directions are recommended:
Adaptive SMA: Dynamically adjust window size based on signal variability.
Hybrid models: Combine SMA with other techniques like Exponential Moving Average (EMA),
Kalman Filters, or machine learning for better accuracy.
Real-time integration: Deploy the algorithm on real hardware (Arduino, Raspberry Pi, or mobile
devices) with live data from wearable sensors.
User customization: Allow end-users or clinicians to set personal threshold limits based on medical
history.
Final Thoughts
This study confirms that even simple algorithms like SMA can play a significant role in health monitoring
systemsparticularly when affordability, clarity, and low power consumption are priorities. By leveraging basic
statistical tools, healthcare systems can be made more accessible, portable, and responsive, especially in remote
or under-resourced areas.
REFERENCES
1. Gonzalez, M., Smith, A., & Patel, R. (2020). Real-time blood pressure monitoring using moving average
filters in wearable devices. Journal of Biomedical Engineering, 45(2), 123134.
https://doi.org/10.1016/j.jbiomech.2020.03.015
2. Kumar, S., & Rao, P. (2021). Application of simple moving average for blood glucose trend analysis in
diabetic patients. International Journal of Medical Informatics, 148, 104376.
https://doi.org/10.1016/j.ijmedinf.2020.104376
3. Lee, J., Kim, H., & Choi, Y. (2022). Low-complexity algorithms for wearable health monitoring: A
comparative study. Sensors, 22(6), 2345. https://doi.org/10.3390/s22062345
4. Patel, S., Park, H., Bonato, P., Chan, L., & Rodgers, M. (2020). A review of wearable sensors and systems
with application in rehabilitation. Journal of Neuro Engineering and Rehabilitation, 17(1), 10.
https://doi.org/10.1186/s12984-020-00684-1
5. Sharma, V., Singh, A., & Gupta, R. (2019). ECG signal smoothing using simple moving average for
arrhythmia detection. Biomedical Signal Processing and Control, 50, 202210.
https://doi.org/10.1016/j.bspc.2018.10.008
6. World Health Organization. (2023). Chronic diseases and health monitoring. Retrieved from
https://www.who.int/news-room/fact-sheets/detail/chronic-diseases
7. Zhang, L., Wang, Y., & Chen, Q. (2021). Time-series analysis in health monitoring: Techniques and
applications. IEEE Transactions on Biomedical Engineering, 68(4), 11561165.
https://doi.org/10.1109/TBME.2020.3010123