ECG is strongly a mathematical concept, as the analysis of ECG result was originally done using analysis of the vectors in the heart. However, this is not practical for clinical settings, so most doctors would rely on memorization of various disease's shape on ECG paper. I personally believe that going back to understanding the vectors in ECG may give better understanding of the mechanism of our heart. However, as it's impractical for doctors, it may be practical to have programs to continuously measure the axis of the heart, which is another name for the conduction vectors. In this article, I will discuss the basic of ECG very briefly to make it easier for mathematician to grasp the concept. And after that, i will try to describe one of the possible program algorithm to analyze ECG vectors. I have zero knowledge of programming language, so this review is just a brain teaser for anyone interested in developing it.
Let's pretend that there is a (+) sign somewhere in your heart. The heart is located in a Cartesian diagram, such that the y-axis is in vertical position and the x axis in horizontal position. We have two devices recording the activity of this (+) sign with regards to x-axis and y-axis respectively. If this (+) sign moves to the left side of our body, it can be assumed that it moves toward the positive side of x axis, and thus, the device monitoring the x-axis would show an increase in electrical potentials. While if this (+) sign moves toward the direction of our feet, it will be as if it moves to the negative side of y-axis, and thus, the device monitoring y-axis will show decrease in electrical potentials. That way, if the (+) sign moves to the top right, both of those device will record increases in potentials
Heart and ECG can be overly-simplified in such manner. There are two ways a single "area" can increase or decrease it's potentials. Those are depolarization and repolarization. Depolarization is an increase in a single area's potential, we can spare discussing the mechanism here. But other than the some special areas, any single area cannot depolarize itself automatically. It will wait for the signal given by the neighboring area, and will not depolarize until such signal is given. The signal is passed through nerves in a similar manner of a cable conducting electricity. As the "area" receiving the signal will turn positive, it will be similar to our analogy of moving (+) sign inside our heart.
However, there is also the mechanism of repolarization. Even when the signal isn't transmitted, the area with positive charge will eventually lose it's charge. It will produce the effect as if the (+) sign slowly return back to where it once started, as there will be potential decrease in both x-axis and y axis because of the vanishing (+) sign.
The two ECG recordings that most easily represent x-axis and y-axis are recordings in "lead I" and "lead aVF". However, lead aVF records the movement of potentials toward the negative y-axis such that the movement of potential to the direction of the feet will be considered positive instead of negative.
Axis analysis has been taught for a long time, although it's not given much regard. However, we only know about the mean axis, not the axis at any given time. The concept is that, by dividing the mean potential in aVF from mean potential in lead I, we can get -tan x, with x being the angle created by x-axis and the conduction vector. Different from the Cartesian diagram, during analysis of axis, a clockwise angle is considered positive, so in many text book we will find the formula such that x = arctan (aVF)/(lead I)
Many conditions can probably be described by understanding the vectors. For example, damage in cells responsible for heart conduction is usually seen as ST segment elevation. This "elevation" is actually the slowing of conduction because one or more of the nerve "cable" is damaged. As ST segment normally shows a sharp decrease, this slowing causes a sloping that makes it seem like the line gets elevated. If we can calculate the vector during this "slowing", theoretically, the vector will tilt toward the sides with more healthy "cables", as they contribute more to the change of potentials. Hopefully, we can understand more about pathophysiology of several heart diseases or screen individuals with "normal ECG shape but may end up having heart disease" by elaborating more into vectors.
To analyze vectors of heart conduction, we can use this following algorithm I made.
To analyze the axis during time t, we can use the formula:
x = -arctan g(t) = -arctan (((potential in lead aVF during time (t+h)) - (potential in lead aVF during time t))/((potential in lead I during time (t+h))-(potential in lead I during time time t)))
Ideally, h should be close to zero, but since we need actual numbers to calculate it, h can be written as smallest calculable unit the computer can analyze.
However, the result will be numbers that is hard to analyze with human eye, while heart disease requires quick diagnosis. To overcome that, we will need the program to create a new cartesian diagram that shows the movement of the vectors. We can convert the statement of "x is 30 degrees from time t until time t+n" into a diagram that shows a line 30 degree from x-axis appearing for n seconds.
The formula for this new diagram should be f(t) = tan x dt= -g(t)dt. This formula is of course faulty, as it's never meant to measure anything. The only purpose of the integral is just to create a new diagram easy for the eye, such that instead of seeing information stating that tanx = n for 5 seconds, we can see a line with gradient n appearing for 5 seconds, with x-axis representing time. As there is no clear formula for x, this calculation can only be done by computer program. We can use the fact that the value of such integral equals the area created by line g(t) = (((potential in lead aVF during time (t+h)) - (potential in lead aVF during time t))/((potential in lead I during time (t+h))-(potential in lead I during time time t))) and x-axis. Therefore, the formula of the new diagram is f(x)= -g(0) h - g(h)h -g(2h)h-g(3h)h-.........-g(x)h.
The limitation is that this diagram has undefined value when both aVF and lead I show 0 potential. To overcome this, it's better to have the program detects such situation. When g(t) is undefined, the program should replace g(t) with 0, such that the diagram show a horizontal line instead.
The other limitation is that this diagram always assumes that the vector moves to the left (toward positive x), while there are times the vector actually moves to the left, which is when the potential in lead I decreases. To overcome this, the program needs to be able to find all t such that potential in lead I during time (t+h) < potential in lead I during time t. During such situation happens for all t such that t1 < t < t2, we need to make the program mirror the direction of the vector to the complete opposite, such that the vector moving to bottom left should be changed into vector toward upper right. So we need a program that can also analyze image input.
The problem is that this method can only measure the vector 2-dimensionally. It can see abnormality in left, right, up, or down movement of the vector. However, damage to heart, or infarction can happen in anterior or posterior area. We need a measurement of anteroposterior axis (z-axis) for this purpose.
It's hard to determine this axis using traditional placement of 12 ECG leads. This is because the leads are placed close to the heart and the angle of each lead with z-axis is unclear and variable. It will be easier if we use posterior lead, as there are leads placed at the back mirroring another lead in it's frontal position.
The closest thing we can get to z-axis is the comparison of lead V2 and lead V9, because lead V2 is positioned at 4th intercostal space to the left of the sternum in the front, while lead V9 is placed in 5th intercostal space, left to the vertebral column at the back. If we can measure the potentials moving from V2 toward V9, we can get the estimated anteroposterior axis. Although this method is not fully accurate, reducing the potential in V9 with potential in V2 may give us the estimated value of potential in z-axis, such that potential in z-axis = potential in V9 lead - potential in V2 lead.
If we compare the z-axis and lead I in similar way we did to lead I and aVF, we can get the conduction vector of the heart seen from above. Seeing it this way is easier to the eye than making a three-dimensional model. We can analyze the angle of the vectors to determine what is normal and what is not.
As it needs extensive knowledge to create an ECG equipped with such program, it's much easier for research purpose to create a program capable of analyzing the vectors by reading the ECG recording printed on paper.
It is unknown whether this method will have any benefit at all, but hopefully, it can help us understanding heart pathology more, and hopefully it may detect diseases or risks unseen by normal ECG, such as angina pectoris during asymptomatic resting state.
-Afkar Aulia, MD-