HealthcareTechnology

Understanding ECG morphology in arrhythmia cases for improving machine learning model

Understanding the heart rhythm of a patient in a critical care unit is very important because that’s what keeps him alive. Today, this task can be effectively performed, thanks to advancement in computational power and healthy evolution of machine learning techniques. Did you know Machine learning algorithms can be applied to any data which holds a pattern, even to an ECG?

Figure (1)

This fancy wave (Figure 1) has a lot of stories to tell: the heart rate, the strength of the heartbeat, injuries and problems the heart is going through and so on. The only thing we have to do is understand and interpret this data. The above figure is Normal Synus Rhythm (NSR) which is the ECG signal of a healthy heart picked up by electrodes (limb, augmented and precordial electrodes). The shape of the signal (morphology) holds the key to unlock and see what’s the heart’s condition. Each curve, it’s amplitude and duration among them is really important.

The first small curve is P wave followed by a QRS Complex and ends with a T wave. The U wave in figure (1) is normally absent but don’t worry, it’s okay. It’s really hard to pick up U waves using ECG electrodes. Each curve represents different states of the heart. For example, the P wave represents atrial contraction, the QRS complex represents ventricular contraction, the T wave represents ventricular repolarization and so on. The time interval between these curves represents the time taken by the electric potentials to travel through myocardial nerve fibers to facilitate rhythmic heart muscle contractions and thereby pumping of blood. That is, any change in time intervals is a sign of irregular contractions and inadequate cardiac output.

So far we have been talking about normal heart conditions. Now, what happens when there is a change in normal rhythm? Yes, Arrhythmia. Arrhythmia is a term for an irregular heartbeat. A cardiac arrhythmia occurs when electrical impulses in the heart don’t work properly. 

There are a lot of arrhythmia conditions that occur because of genetic, lifestyle, age, other health conditions or even due to medication. During an arrhythmia, the heart can beat fast – tachycardia, slow – bradycardia or with an irregular rhythm.

In this article, we will be discussing the morphology of ECG signals in arrhythmia cases and particularly look into ECG leads along with Lead I, II and III where we can easily find the abnormality. So the two questions that arise right away are, why should we look at different electrodes even though they give the same pattern wave for all leads and how can this contribute to a machine learning algorithm?

Let’s discuss the first question now.

We humans usually use a 12 lead electrode system to collect electric potentials of heart. They are limb leads (Lead I, II & III), augmented limb leads aVR, aVL & aVF) and precordial or chest leads (V1, V2, V3, V4, V5 & V6). These electrodes are arranged in a particular way that helps with better visibility of cardiac activity. Let’s consider that we are looking at the heart from different angles. Any cardiac irregularity will definitely reflect on all the leads but the lead near the origin of irregularity will have more information. For example, Lead I have less information about something that happened at the tip of ventricle but the precordial leads can provide more information about that because of their proximity to the origin of irregularity. This explains why we should look for different leads.

You may have got some hints on explanation to the second question. Before moving to that, let’s explore more about arrhythmias and the advantage of looking into more leads.

Some of the types of arrhythmia are :

While this just a small list and there’s a lot more to add, we will select only a few among them and discuss the ECG morphology.

Beginning with atrial flutter, first, let’s take a look at ECG

Figure (2)

The ECG signals of atrial flutter have sawtooth-shaped peaks with unidentifiable P waves. Also, the heart rate will be high, almost 200-300 bpm. The presence of a QRS complex is a distinguisher between atrial flutter and atrial fibrillation. Looking at Lead I, II or III is enough to understand the atrial flutter.

Similarly, Sinus bradycardiaSinus tachycardia, Atrial flutter, Atrial fibrillation, Ventricular flutterVentricular fibrillationMonomorphic VTPolymorphic VT, and Premature ventricular contraction (Ventricular bigeminy, Ventricular Trigeminy) have ECG signals with significant morphological variations as compared to NSR signal. Looking at any 3 leads (I, II or III) alone we can identify the arrhythmia condition.

For example, in the Premature Ventricular Contraction (PVC), there won’t be any P wave, QRS peaks will be wider than normal (0.10 s), after PVC, RR interval will be greater than normal along with significant negative ST-T segment.

Figure (3)

The ventricular bigeminy and trigeminy is basically PVC itself with an identifiable pattern. In the case of ventricular bigeminy, for every one normal ECG wave, there will be one premature ventricular contraction with a long P-P interval. And for trigeminy, out of 2 normal beats, there will be one irregular contraction.   

Now, let us look at one interesting case, myocardial infarction which mainly occurs in the anterior part of the heart:

Myocardial infarction is the medical term for heart attack. There are mainly three types of myocardial infarction

  • Myocardial infarction (Injury)
  • Myocardial infarction (Ischemia)
  • Myocardial infarction (Inferior infarction)
Figure (4)

In simple terms, when myocardial infarction occurs, the heart muscle cells don’t get enough oxygen to be alive or function properly which ultimately leads to complete heart failure.

Figure (5)

This (Figure 5) is a typical ECG of acute myocardial infarction(AMI) due to injury, the myocardial cells are not completely dead and remain in a higher electric potential. The main identifier for MI (injury) is ST elevation. ST-elevation is easily identifiable in precordial chest leads which in this case are Leads V2, V3, V4. The huge elevated peaks are due to the proximity of precordial electrodes. Similarly, for MI (Ischemia), the ECG will have ST depression that will be best visible in precordial leads. Even though ST elevation/depression can be identified in Lead I, II and III, it will need thorough signal processing and denoising methods. Instead, if we are able to look at precordial, ST irregularity is easily identifiable. 

 
Figure (6)

The above ECG diagram (Figure 6) is of MI (infarction). The main morphological characteristics of a typical MI are inverted deep Q waves and diminished or inverted T waves. These morphological characteristics are clearly visible in precordial leads. 

Myocardial Infarction is a typical example that signifies the need for looking into other leads. We can see a clear difference from the normal pattern in all other leads as well. But precordial leads provides more information. Such patterns can be found if we study the ECG signal morphology of other arrhythmia cases as well. This leads to consider the cause of arrhythmia, which part of the heart is affected and the proximity of electrodes to the affected part. 

Understanding the morphology of ECG signals from limb leads (Lead I, II & III) alone is not enough when we try to classify arrhythmia using the machine learning algorithms. Now we can answer the second question, ‘How can this contribute to a machine learning algorithm?’

Machine learning algorithms are trained using a training set from where the algorithm tries to identify patterns and at last tries to classify input signals to different arrhythmia conditions. Just like human intelligence needs to look at different leads for understanding an arrhythmia case, machine learning algorithms follow the same to substantially improve the machine learning model performance. Identifying and learning patterns from different leads for classifying arrhythmia conditions is an ambitious and a really complex task but ultimately the whole effort is to improve the model performance to human-level intelligence. With more refined and experimental studies on this topic, the same can be achieved at a faster rate.

Leave a Reply

Your email address will not be published. Required fields are marked *

nineteen − 10 =