フィルターのクリア

QRS area calculation from ECG

36 ビュー (過去 30 日間)
Gültekin Günhan
Gültekin Günhan 2024 年 9 月 5 日 19:52
回答済み: Gültekin Günhan 2024 年 10 月 2 日 10:23
Hello..There are several studies about calculating QRS area from ECG. They all cite MATLAB however, there is no script I can access from MATLAB...It is called custom MATLAB script but there are no details. I want to conduct a study about QRS area calculation with Kors conversion matrix.. I would be grateful if someone could show me the way for ECG analysis.

採用された回答

Star Strider
Star Strider 2024 年 9 月 5 日 20:42
II have heard of the Kors transformation matrix, however I have never used it. I just now did an Interweb search, and I was not able to find any available code for the Kors transformation matrix. (The articles that mention writing MATLAB code to calculate iit do not post the code.) I was also not able to find any mathematical description of it in the literature. If you have a source for the mathematical description of it, share it here, and I wiill giive a shot to coding it.
When I created a 3D vectorcardiogram here, I just used Lead I, Lead and Lead . That worked well enough to illustrate the concept.
Calculating the area will be relatively straightforward after doing the preliminary transformation calculations using the trapz function.
  2 件のコメント
Gültekin Günhan
Gültekin Günhan 2024 年 9 月 6 日 5:15
Thank you very much for your reply 🙏
Star Strider
Star Strider 2024 年 9 月 6 日 5:48
As always, my pleasure!

サインインしてコメントする。

その他の回答 (3 件)

William Rose
William Rose 2024 年 9 月 6 日 2:12
編集済み: William Rose 2024 年 9 月 6 日 4:14
[Edit: Add a citation of, and link to, the original Kors paper. The data and matrix and code are unchanged.]
The Kors conversion matrix is a 12x3 matrix that converts a 12 lead EKG to the three components (X,Y,Z) of the vector cardiogram. It is
A=[ 0.38,-0.07, 0.11; -0.07, 0.93,-0.23; 0 , 0 , 0 ;...
0 , 0 , 0 ; 0 , 0 , 0 ; 0 , 0 , 0 ;...
-0.13, 0.06,-0.43; 0.05,-0.02,-0.06; -0.01,-0.05,-0.14;...
0.14, 0.06,-0.20; 0.06,-0.17,-0.11; 0.54, 0.13, 0.31]; % Kors
as you can see from Table 1 of Kors et al. (1990) and from Table 2 of Jaros et al. (2019). The order above assumes that the columns of the 12 lead EKG are
I, II, III, aVR, aVL, aVF, V1, V2, V3, V4, V5, V6.
The zeros in matrix A reflect the fact that leads III and aVR, aVL, aVF are not used by Kors.
Example, using 12 lead EKG recorded at 500 Hz by Perez Alday & Tereshchenko (2021), https://doi.org/10.13026/sm8m-v308:
ekg12=load('ecg12leadData.txt'); % load 12 lead EKG data
t=(0:length(ekg12)-1)/500; % time (s)
ekgV=ekg12*A; % compute vector cardiogram with Kors transformation
Plot leads I, II, III of the 12 lead EKG:
figure
subplot(311), plot(t,ekg12(:,1),'-k')
title('Lead I'); grid on
subplot(312), plot(t,ekg12(:,2),'-k')
title('Lead II'); grid on
subplot(313), plot(t,ekg12(:,3),'-k')
title('Lead III'); grid on; xlabel('Time (s)')
Plot leads X, Y, Z of the vector cardiogram:
figure
subplot(311), plot(t,ekgV(:,1),'-r')
title('X'); grid on
subplot(312), plot(t,ekgV(:,2),'-g')
title('Y'); grid on
subplot(313), plot(t,ekgV(:,3),'-b')
title('Z'); grid on; xlabel('Time (s)')
Save the vector cardiogram data with
% save("ecgXYZ","ekgV"); % save vector cardiogram to .mat file
which is commented out here, since it will not run in this online platform.
I will discuss the QRS area calculation in a comment.
  1 件のコメント
William Rose
William Rose 2024 年 9 月 6 日 4:05
I assume you are familiar with van Stipdonk et al. (2018), https://www.ahajournals.org/doi/epub/10.1161/CIRCEP.118.006497. It seems you may be trying to reproduce their analysis, since they compute QRS area from the vector cardiogram, which they obtain using the Kors transformation.
The QRS area is
where QRSarea,x (or y or z) is the total (absolute value) area between the respective trace (x, y, or z) and the baseline, during the QRS complex. The QRS start and end time are determined as described here (Zong et al., 2003). Zong et al. use a single lead EKG ("lead 0" in the MIT-BIH database). I assume this is lead II of a standard EKG. van Stipdonk et al. (2018) do not describe how they determine the baseline. I assume here that the baseline is zero for X, Y, and Z.
For the illustration below, I assume the QRS complex start time is 6.400 s and the QRS duration is 80 msec, which is in the normal range. I use the vector cardiogram data computed in my answer above.
data=load('ecgXYZ'); % load .mat file
ekgV=data.ekgV; % extract ekgV
t=(0:length(ekgV)-1)/500; % time vector (s)
t1=6.400; t2=6.480; % QRS start, end times (s)
baseline=[0,0,0]; % baseline for X,Y,Z; adjust as desired
x=ekgV(t>=t1 & t<=t2,1);
QRSax=trapz(abs(x-baseline(1))); % QRSarea,x
y=ekgV(t>=t1 & t<=t2,2);
QRSay=trapz(abs(y-baseline(2))); % QRSarea,y
z=ekgV(t>=t1 & t<=t2,3);
QRSaz=trapz(abs(z-baseline(3))); % QRSarea,z
QRSarea=sqrt(QRSax^2+QRSay^2+QRSaz^2); % QRS area
fprintf('QRS area=%.1f.\n',QRSarea)
QRS area=13163.7.
Plot the X, Y, Z components and the QRS boundaries.
figure
subplot(311), plot(t,ekgV(:,1),'-r'); hold on
title('X'); grid on; xlim([6 7]); xline(t1); xline(t2)
subplot(312), plot(t,ekgV(:,2),'-g'); hold on
title('Y'); grid on; xlim([6 7]); xline(t1); xline(t2)
subplot(313), plot(t,ekgV(:,3),'-b'); hold on
title('Z'); grid on; xlim([6 7]); xline(t1); xline(t2)
xlabel('Time (s)')
OK

サインインしてコメントする。


Gültekin Günhan
Gültekin Günhan 2024 年 9 月 6 日 5:14
Thank you very much William Rose for your efforts. I will examine it and share my feedback. I hope I can succeed it as a clinician.
  1 件のコメント
William Rose
William Rose 2024 年 9 月 6 日 17:53
@Gültekin Günhan, you're welcome.

サインインしてコメントする。


Gültekin Günhan
Gültekin Günhan 2024 年 10 月 2 日 10:23
Thank you for all answers, however there is an area of gaps in the articles studying on QRS area analysis when it comes to references. The cited references do not share details. I would like to ask you whether you could calculate QRS area in a random ECG sample. I would be grateful if you show me a better way for a non-engineer clinician.
Thanks.

カテゴリ

Help Center および File ExchangeSpectral Measurements についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by