Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
METHODS
1
Lab 1: ECG Signal Sampling and Processing Guy Everett & Mackenzie Andrews, Section D
student was calm, after vigorous exercise, and would not be able to pump blood through the
with a diminished sampling frequency. These body efficiently and quickly. Comparing the
readings were then plotted using MATLAB amplitude of the ECG with other groups there
(Figure 2). were some differences that is explained by the
The absolute maximum heartbeat fact that people have different sized bodies as
recorded was after vigorous exercise with a well as circulatory systems of different
value of 120 bpm (2 Hz). The minimum strengths based on such factors as their activity
heartbeat recorded was 60 bpm (1 Hz) which level and health.
was recorded when the subject was calm. ECG’s In any given signal, there is a high
have a maximum frequency which would likelihood of noise being present. This noise
correspond to the maximum heart rate of a can be caused by a variety of things depending
human. The maximum heart rate in individual on the type of data being recorded. In this lab,
can achieve without serious damage to the where voltage is the recorded information,
heart can be calculated using the Haskell and noise is generated by anything that generates a
Fox formula (HRmax = 220 – age).1 The student voltage besides the heart (Figure 3). An example
was 20 years old so the maximum heart rate of used in class was the voltage generated by cell
that individual would be 200 bpm which would phones but noise could also be introduced by
give a maximum frequency of 3.3 Hz. the subject’s breathing, muscle contractions in
After vigorous exercise the ECG signal muscles besides the heart, or even ions found in
increased in frequency by approximately a sweat that encounters the electrodes.
factor of 2. This is likely due to the need for the
heart to be more active to deliver enough blood
to muscles needed to maintain the activity level
of the subject.
2
Lab 1: ECG Signal Sampling and Processing Guy Everett & Mackenzie Andrews, Section D
smooth = zeros(2000,1);
for n = 1:2000
sum = 0;
for i = 1:5
sum = sum+C4(n+i,2);
end
ave = sum/5;
smooth(n)=ave;
end
figure1=plot(C3(1:2000,1),C3(1:2000,2),'r');
3
Lab 1: ECG Signal Sampling and Processing Guy Everett & Mackenzie Andrews, Section D
hold on;
figure1=plot(C5(1:100,1),C5(1:100,2)-1,'g');
legend('Calm','Running','Lowered fs');
axis([0 10 -2 2]);
grid on;
title('ECG');
xlabel('time (sec)');
ylabel('voltage (mV)');
subplot(2,1,2);
figure2=plot(C4(1:2000,1),C4(1:2000,2),'b');
hold on;
figure2=plot(C4(1:2000,1),smooth(1:2000)-
1,'r');
legend('Noisy', 'Smoothed');
axis([0 10 -2 1]);
grid on;
title('Noise Softening');
xlabel('time (sec)');
ylabel('voltage (mV)');
p2=C2(71:201,:);
plot(p2(:,1),p2(:,2))
hold on;
p3=p2(:,2);
peak=max(p3);
p4=-p3;
trough=-max(p4);
amp=peak+(-trough);
amp2=(peak+trough)/2;
f=@(n)
0.5199*sin(2*pi*n*.005*1.538+105.76*pi)+am
p2;
x=[1:130,1].';
y=[];
p1=p2(:,1);
for j=1:131;
y(j,1)=f(x(j));
end
plot(p1,y)
grid on;
title('superimposed sinusoid');
xlabel('time (sec)');
ylabel('voltage (mV)');