heartTarang™ is a Wireless ECG system that is being introduced as a product by Sosaley. A low powered wireless transmitter, connected to electrodes, sends data to a mobile phone, or the cloud. On the mobile phone, an advanced application delivers the results in ways that doctors and healthcare workers understand. The doctor can create a session for each patient and view the ECG tests results for instant decision. The device has an option of 3, 5, and 12 lead sensing. Other heart-related parameters will also be available.

One of the great strides Sosaley made was to deliver ECG waves that are 100% accurate and dependable. To do this, we had to design a special filter that would weed out the noise in the electrical signal. To do this properly, we first had to understand what constitutes an ECG wave and what constitutes noise, and then design and implement the noise filter.

We will explain these below.

Introduction to ECG

The electrocardiogram (ECG or EKG) is a tool that is used to measure the health of the human heart. It measures the electrical and muscular functions of the heart and gives the examiner and the doctor a quick look at how your heart is functioning. While the ECG test is simple enough, interpretation of the results needs a good eye and thorough knowledge of the heart’s functioning.

The Heart is a Pump

The Human Heart pic The heart is a pump that works in two stages through four chambers – the left and right atrium(s), and the left and right ventricles. An electrical impulse is created in the upper chambers (left and right atria). This causes the atria to squeeze and push blood into the ventricles. When the ventricles are filled with blood, they are squeezed to push blood to the body and the lungs.

Electrocardiogram (ECG/EKG) waves are indicators of the electrical activity of the heart. A healthy heart generates a regular waveform that is recognized as being consistent in terms of form and time. Any deviation from the usual and regular form and time period can be associated with a problem in the functioning of the heart.

How is Electricity Generated?

The heart has a group of cells called the sinoatrial node that is present in the right atrium of the heart. The main role of the sinoatrial node is to create an action potential (an electrical charge) that is used for squeezing of the chambers. The action potential is a change in the voltage across the membrane of the cells that are generated by the movement of the charged ions.

The group of cells that constitute the sinoatrial node can act independently of the human brain.

Clinical Importance

The proper functioning of the sinoatrial node signifies a healthy heart. When the node becomes defective, the rhythms become abnormal – too slow or too fast.

Blockages of the blood supply into or out of the heart and particularly to the sinoatrial node can cause ischemia and cell death in the sinoatrial node. This will cause the electrical function of the sinoatrial node to malfunction. These are usually because of myocardial infarction or progressive coronary artery disease.

Understanding ECG Signals

As I said before, though it is easy to conduct an ECG test, understanding and interpreting the ECG signals is not easy. Let us look at the aspects (or parts) of the waveform that a clinical analyst and doctor have to understand.

ECG_WaveForm explained.

  1. P-Wave, PR Interval, and PR Segment

This is the first part of the heart’s pumping action. The P-wave shows the start of the action potential of sinoatrial node called atrial depolarization. The PR interval is the time between the start of the action potential to the next activation – that of the QRS complex.

  1. The QRS Complex

This represents the activation of the ventricles. Remember, this is when the ventricles get filled with blood? Though called QRS complex, an ECG may not necessarily show all the three waves. The QRS duration is the time between the start and end of the QRS complex. A short duration of <0.12 seconds represents a healthy heart.

  1. The J point and the ST Segment

The ST segment represents the plateau phase of the action potential. This part of the wave has to be studied carefully as it changes rapidly in a wide range of conditions. The ST segment starts at the J point and ends somewhere between S and T. Myocardial Ischemia causes deviation of the ST segment. Deviation could be suppression or elevation of the ST segment that is measured as the difference in height between the J point and PR segment.

  1. The T-Wave

The heart has two major types of cardiac muscle cells. The myocardial conducting cells and myocardial contractile cells. The myocardial conducting cells initiate and propagate the action potential and act as the conduction system of the heart. The contractile cells conduct electrical impulses and create the contractions that pump blood. Contractile cells constitute nearly 99% of the charge conducting cells in the atria and ventricles.

The T-wave shows the re-polarization of these cells. Again, changes occur in a wide range of conditions. In general, the transition from the ST segment to the T-wave should be smooth.

  1. The U-Wave

The U-wave is a positive wave occurring after the T-wave. This is seen frequently in leads V2-V4. People with slow heart rates display U-waves more often. The exact nature of the U-wave and its importance is still not understood fully.

  1. QT Duration and QTc Interval

The QT duration represents the total length of the ventricular depolarization and repolarization. It starts with the beginning of the QRS complex and ends with the completion of the T-wave. The QT duration is inversely related to the heartbeat and thus has to be corrected based on the heart rate. The corrected QT duration is referred to as QTc interval.

heartTarang™ and Noise Filtering

heartTarang™ generates an ECG/EKG wave that all doctors and healthcare people are familiar with. Using a heart simulator, we have tested the product on 100s of different kinds of ECG waves for 1000s of hours.

Signal vs Noise

The useful information of the ECG signal lies between 0.05Hz and 150Hz. The ECG signal is usually contaminated with a variety of noise components at various frequencies. Some of the major contributors of noise are the contraction of the muscles, noise due to improper contact of the electrodes, interference from the power line, wandering of the baseline, motion artefacts, noise added by the electronic components in the circuits, respiration, and other high-frequency elements. These noise components are also often amplified together with the ECG signals during signal processing.

In digital signal processing, the quantum of actual signal and noise in a data packet is called Signal to Noise Ratio, or, SNR. In audio, SNR can be, at times, optimised by simply chopping off frequencies that are not audible to the human ear. But in non-audio signal processing such a blunt instrument cannot be used.

Hardware vs Software Noise Filter

A filter works by removing or reducing frequencies where noise occurs while allowing the signal frequency through. This can be done at the hardware or software level.

In modern systems, the main purpose of hardware filtering is to avoid exceeding the limits of the analogue system, such as opamp saturation and ADC ranges. Normally a 1mV signal would be amplified around 100-1000 times prior to ADC sampling. If this signal has even a 10mV of noise prior to amplification, we can expect the amplifiers to saturate.

The main limitation of hardware filters is that they rely on capacitors, the value of which cannot be controlled properly either in production or in use. Thus we have chosen software to define and implement filter cut-off points that can be controlled accurately. This also enables us to offer advanced filter models and user-selectable filters.

Sosaley’s Software-based Noise Filter

ECG_Noise Filtering In heartTarang™, the acquired ECG signal was also prone to high-frequency noise. We opted to use a real-time digital (software) filtering of the signal to get rid of the noise.

Since it is not practical to design the filter in the embedded environment directly, we recorded a number of snippets of the ECG signal acquired. We used this data set to design a filter in Matlab (release 2015b).

Low Pass Filter to optimize SNR

We designed a lowpass Finite Impulse Response filter of the lowest order possible. The appropriate stopband and the passband edge frequencies were set. We used the ‘equiripple’ method as the noise was in the nature of a high-frequency ripple. The filtered signal is usually out of phase with the original signal so we did zero-phase filtering in which the original and the filtered signals are in phase. We designed the filter offline in Matlab and extracted the filtering coefficients.

We exported the filtering coefficients into the embedded environment. In real-time, we convoluted the acquired signal with the filtering coefficients and compensated for the time delay to execute the zero-phase filtering.

The result was the desired signal with excellent Signal to Noise ratio.


  1. https://www.medteq.net/article/2017/4/1/ecg-filters
  2. https://ecgwaves.com/ecg-topic/ecg-normal-p-wave-qrs-complex-st-segment-t-wave-j-point/
  3. https://en.wikipedia.org/wiki/Electrocardiography
  4. https://www.emedicinehealth.com/electrocardiogram_ecg/article_em.htm#what_is_an_electrocardiogram_ecg_ekg