RESPIRATION RATE AND HEART RATE DETECTION

버전 1.0.0 (1.7 KB) 작성자: Harshini
Real-time(phonocardiograph) plot which displays data from an electronic stethoscope via the COM port.
다운로드 수: 26
업데이트 날짜: 2024/4/27

라이선스 보기

Respiration rate and heart rate detection are vital parameters in monitoring an individual's health. Respiration rate refers to the number of breaths taken per minute, reflecting the efficiency of oxygen exchange in the lungs. It's a crucial indicator of respiratory health, cardiac function, and overall well-being. On the other hand, heart rate, measured in beats per minute, indicates the frequency of heart contractions, reflecting cardiovascular health and exertion levels.
Detection methods vary, from traditional manual counting to modern technologies like wearable sensors and medical devices. These technologies utilize various principles such as photoplethysmography (PPG), which measures blood volume changes, and accelerometers to detect movement associated with breathing and heartbeats. Accurate detection and monitoring of these rates aid in diagnosing respiratory and cardiovascular disorders, assessing fitness levels, and guiding medical interventions. They play a pivotal role in preventive healthcare, enabling timely intervention and improving quality of life.
a = arduino('COM4','Due');
y=0;
hPlot = plot(NaN);
intervalSize = 200;
currentInterval = 200;
t = 1; % number of samples
atInterval = 1;
beat_count = 0;
quitbutton = uicontrol('style','pushbutton',...
'string','Quit', ...
'fontsize',12, ...
'position',[10,2,50,20], ...
'callback','quitit=1;close');
quitit = 0;
bpmtext = uicontrol('style', 'text',...
'string', ['BPM: '],...
'fontsize', 12,...
'position', [80, 2, 100, 20]);
while(1)
k = 1;
while(t<currentInterval)
b=readVoltage(a, 'A0');
y=[y,b];
if ishandle(hPlot)
set(hPlot, 'YData', y);
else
break; % break out of the loop
end
xlabel('Samples')
ylabel('Voltage')
title('Phonocardiogram')
axis([currentInterval - intervalSize,currentInterval,0,3]);
%grid
t=t+k;
pause(0.002)
end
for m = 2 : length(b)-1
if(b(m) > b(m-1) & b(m) > b(m+1) & b(m) > 2.4)
%disp('Prominant peak found');
beat_count = beat_count + 1;
set(bpmtext, 'string', ['BPM: ',...
num2str(BPM_avg,4)]);
end
end
currentInterval = currentInterval + intervalSize;
atInterval = atInterval + 1;
if ~ishandle(hPlot)
break;
end
fs = 500;
N = length(b);
duration_in_seconds = N/fs;
duration_in_minutes = duration_in_seconds/60;
BPM_avg = beat_count/duration_in_minutes;
end

인용 양식

Harshini (2025). RESPIRATION RATE AND HEART RATE DETECTION (https://kr.mathworks.com/matlabcentral/fileexchange/164591-respiration-rate-and-heart-rate-detection), MATLAB Central File Exchange. 검색 날짜: .

MATLAB 릴리스 호환 정보
개발 환경: R2024a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.0.0