JoVE Science Education
Biomedical Engineering
This content is Free Access.
JoVE Science Education Biomedical Engineering
Acquisition and Analysis of an ECG (electrocardiography) Signal
  • 00:07Overview
  • 01:12Principles of Electrocardiography
  • 04:07Building a Biopotential Amplifier and Acquiring an ECG Signal
  • 06:26Filtering an ECG Signal
  • 08:48Results
  • 09:40Applications
  • 10:45Summary

Adquisición y análisis de una señal de ECG (electrocardiografía)

English

Share

Overview

Fuente: Peiman Shahbeigi-Roodposhti y Sina Shahbazmohamadi, Departamento de Ingeniería Biomédica, Universidad de Connecticut, Storrs, Connecticut

Un electrocardiógrafo es un gráfico registrado por los cambios potenciales eléctricos que ocurren entre los electrodos colocados en el torso de un paciente para demostrar la actividad cardíaca. Una señal de ECG realiza un seguimiento del ritmo cardíaco y de muchas enfermedades cardíacas, como el flujo sanguíneo deficiente al corazón y las anomalías estructurales. El potencial de acción creado por las contracciones de la pared del corazón extiende las corrientes eléctricas del corazón por todo el cuerpo. Las corrientes eléctricas de propagación crean diferentes potenciales en puntos del cuerpo, que pueden ser detectados por electrodos colocados en la piel. Los electrodos son transductores biológicos hechos de metales y sales. En la práctica, 10 electrodos están unidos a diferentes puntos en el cuerpo. Existe un procedimiento estándar para adquirir y analizar señales ECG. Una onda ecEC típica de un individuo sano es la siguiente:

Figure 1
Figura 1. Onda ECG.

La onda “P” corresponde a la contracción auricular, y el complejo “QRS” a la contracción de los ventrículos. El complejo “QRS’ es mucho más grande que la onda “P” debido a la relativa dfferencia en la masa muscular de las aurículas y ventrículos, que enmascara la relajación de las aurículas. La relajación de los ventrículos se puede ver en forma de la onda “T”.

Hay tres pistas principales responsables de medir la diferencia de potencial eléctrico entre brazos y piernas, como se muestra en la Figura 2. En esta demostración, se examinará uno de los cables de las extremidades, el plomo I, y se registrará la diferencia de potencial eléctrico entre dos brazos. Como en todas las mediciones de plomo ECG, el electrodo conectado a la pierna derecha se considera el nodo de tierra. Una señal ECG se adquirirá utilizando un amplificador biopotencial y luego se mostrará utilizando un software de instrumentación, donde se creará un control de ganancia para ajustar su amplitud. Por último, se analizará el ECG registrado.

Figure 2
Figura 2. Cables de extremidades de ECG.

Principles

El electrocardiógrafo debe ser capaz de detectar no sólo señales extremadamente débiles que van desde 0,5 mV a 5,0 mV, sino también un componente de CC de hasta 300 mV (resultado del contacto con la piel del electrodo) y un componente de modo común de hasta 1,5 V, que resulta del potencial entre los electrodos y el suelo. El ancho de banda útil de una señal ECG depende de la aplicación y puede variar de 0.5-100 Hz, llegando a veces hasta 1 kHz. Generalmente es alrededor de 1 mV pico a pico en presencia de ruido externo de alta frecuencia mucho mayor, interferencia de 50 o 60 Hz, y potencial de desplazamiento del electrodo de CC. Otras fuentes de ruido incluyen el movimiento que afecta a la interfaz piel-electrodo, contracciones musculares o picos electromiográficos, respiración (que puede ser rítmica o esporádica), interferencia electromagnética (EMI) y ruido de otros dispositivos electrónicos esa pareja en la entrada.

En primer lugar, se producirá un amplificador biopotencial para procesar el ECG. Luego, se colocarán electrodos en el paciente para medir la diferencia potencial entre dos brazos. La función principal de un amplificador biopotencial es tomar una señal eléctrica débil de origen biológico y aumentar su amplitud para que pueda ser procesado, grabado o visualizado.

Figure 3
Figura 3. Amplificador ECG.

Para ser útiles biológicamente, todos los amplificadores biopotenciales deben cumplir ciertos requisitos básicos:

  • Deben tener una alta impedancia de entrada para que proporcionen una carga mínima de la señal que se está midiendo. Los electrodos biopotenciales pueden verse afectados por su carga, lo que conduce a la distorsión de la señal.
  • El circuito de entrada de un amplificador biopotencial también debe proporcionar protección al sujeto que se está estudiando. El amplificador debe tener circuitos de aislamiento y protección para que la corriente a través del circuito del electrodo se pueda mantener en niveles seguros.
  • El circuito de salida controla la carga, que suele ser un dispositivo de indicación o grabación. Para obtener la máxima fidelidad y rango en la lectura, el amplificador debe tener baja impedancia de salida y ser capaz de suministrar la potencia requerida por la carga.
  • Los amplificadores biopotenciales deben funcionar en el espectro de frecuencias en el que existen los biopotenciales que amplifican. Debido al bajo nivel de tales señales, es importante limitar el ancho de banda del amplificador para obtener relaciones óptimas de señal a ruido. Esto se puede hacer usando filtros.

El cuadro 3 es un ejemplo de un amplificador ECG, y el cuadro 4 es el circuito del amplificador ECG que se construye durante esta demostración. Tiene tres etapas principales: el circuito de protección, el amplificador de instrumentación y el filtro de paso alto.

Figure 4
Figura 4. Amplificador biopotencial.

La primera etapa es el circuito de protección del paciente. Un diodo es un dispositivo semiconductor que conduce la corriente en una dirección. Cuando un diodo está sesgado hacia adelante, el diodo actúa como un cortocircuito y conduce la electricidad. Cuando un diodo es sesgado inverso, actúa como un circuito abierto y no conduce la electricidad,I r 0.

Cuando los diodos están en la configuración sesgada hacia adelante hay una tensión conocida como la tensión de umbral (VT – aproximadamente 0.7 V) que debe ser excedida para que el diodo conduzca la corriente. Una vez que se ha excedido el VT, la caída de tensión a través del diodo permanecerá constante en VT independientemente de lo que Ven.

Cuando el diodo es sesgado inverso el diodo actuará como en el circuito abierto y la caída de voltaje a través del diodo será igual a Ven.

La Figura 5 es un ejemplo de un circuito de protección simple basado en diodos que se utilizarán en esta demostración. La resistencia se utiliza para limitar la corriente que fluye a través del paciente. Si un fallo en el amplificador de instrumentación o diodos cortocircuita la conexión del paciente con uno de los rieles de alimentación, la corriente sería inferior a 0,11 mA. Los diodos de baja fuga FDH333 se utilizan para proteger las entradas del amplificador de instrumentación. Siempre que la tensión en el circuito supere 0,8 V de magnitud, los diodos cambian a su región activa o estado “ON”; la corriente fluye a través de ellos y protege tanto al paciente como a los componentes electrónicos.

Figure 6
Figura 5. Circuito de protección.

La segunda etapa es el amplificador de instrumentación, IA, que utiliza tres amplificadores operacionales (op-amp). Hay un amplificador de operación conectado a cada entrada para aumentar la resistencia de entrada. El tercer amplificador op es un amplificador diferencial. Esta configuración tiene la capacidad de rechazar la interferencia referida a tierra y amplificar solamente la diferencia entre las señales de entrada.

Figure 7
Figura 6. Amplificador de instrumentación.

La tercera etapa es el filtro de paso alto, que se utiliza para amplificar un pequeño voltaje de CA que se monta encima de un voltaje de CC grande. El ECG se ve afectado por señales de baja frecuencia que provienen del movimiento del paciente y la respiración. Un filtro de paso alto reduce este ruido.

Los filtros de paso alto se pueden realizar con circuitos RC de primer orden. La figura 7 muestra un ejemplo de un filtro de paso alto de primer orden y su función de transferencia. La frecuencia de corte se da mediante la siguiente fórmula:

Equation 1,Equation 2
Equation 3  Figure 8
Figure 9

Figura 7. Filtro de paso alto.

Procedure

1. Adquisición de una señal ECG Ajuste el voltaje de las fuentes a +5 V y -5 V y conéctelas en serie. Construya el circuito mostrado en el cuadro 4. Calcule los valores de las resistencias y capacitores. Para el filtro de paso alto, la frecuencia de corte debe ser de 0,5 Hz. El valor del condensador se debe elegir de la tabla siguiente (según disponibilidad). Valores de condensador disponibles (F ) 0.001 1 100 0.022 2.2 220 0.047 4.7 470 0.01 10 1000 0.1 47 2200 Coloque los electrodos en el brazo derecho, el brazo izquierdo y la pierna derecha (esto es referencia) del paciente y conéctelos al circuito. Utilice el osciloscopio para ver la señal ECG (Vo). Pulse Ajuste automático y ajuste las escalas horizontal y vertical según sea necesario. Usted debe ser capaz de ver los picos R a pesar del ruido en la señal. 2. Visualización de la señal ECG mediante el software Instrumention En esta demostración usamos LabVIEW. Escriba un programa que muestre la señal ECG utilizando una interfaz gráfica para configurar mediciones y un gráfico de forma de onda. Una vez seleccionada una entrada analógica, configure el programa con los siguientes ajustes: Rango de entrada de señal >> Máx. 0,5; Mínimo -0,5 Configuración del terminal >> RSE Modo de adquisición >> continuo Muestras para leer 2000 Frecuencia de muestreo 1000 Adquiera la señal ECG y observe la forma de onda. Verá una señal similar a la Figura 1. Ajuste la escala del eje X para mostrar el tiempo en segundos. A menudo es necesario en la instrumentación para amplificar la señal de interés a una amplitud específica. Cree un control de ganancia y establézquelo de modo que la amplitud del ECG sea 2 Vp. 3. Análisis de la señal ECG En esta sección, se filtrará y analizará una señal eclopé para determinar la frecuencia cardíaca. El siguiente diagrama de bloques muestra los componentes del programa.

Results

In this demonstration, three electrodes were connected to an individual, and the output passed through a biopotential amplifier. A sample ECG graph prior to digital filtering is shown below (Figure 8).

Figure 13
Figure 8. ECG signal without digital filtering.

After designing the filters and feeding the data to the developed algorithm, the peaks on the graph were detected and used to calculate heart beat rate (BPM). Figure 9 displays the raw data an ECG signal (before any filtering) in time and frequency domain. Figure 10 shows the result of filtering that signal.

Figure 11

Figure 9. ECG signal before filtering.

Figure 14
Figure 10. Filtered ECG signal.

The original ECG plot had slightly visible P, QRS, and T complexes that presented many fluctuations from the noise. The spectrum of the ECG signal also showed a clear spike at 65 Hz, which was assumed to be noise. When the signal was processed using a low-pass filter to remove extraneous high frequency portions and then a band-stop filter to remove the 65 Hz signal component, the output appeared significantly cleaner. The ECG shows each component of the signal clearly with all noise removed.

In addition, the measured heart rate was approximately 61.8609 beats per minute.

Applications and Summary

Contraction of cardiac muscle during the heart cycle produces electric currents within the thorax. Voltage drops across resistive tissue are detected by electrodes placed on the skin and recorded by an electrocardiograph. Since the voltage is weak, in the range of 0.5 mV, and small compared to the magnitude of noise, processing and filtering the signal is necessary. In this experiment, an electrocardiograph device consisting of a two part analog and digital signal processing circuit was designed to analyzing the resulting ECG signal, and calculate the heartbeat rate.

This demonstration introduced the fundamentals of electronic circuitry and filtering of ECG signals. Here, practical signal processing techniques were used to extract a weak signal from a noisy background. These techniques can be used in other similar applications where signal amplification and noise reduction is required.

Materials List

Name Company Catalog Number Comments
Equipment
Power supply B&K Precision 1760A
Multimeter
Oscilloscope
Proto-board
4 FDH333 diodes
1 AD620
3 47k resistor
2 100nF capacitors
3 ECG electrodes
Several alligator clips and Tektronix probe.

Transcript

Electrocardiographs record cardiac activity of the heart and are used to diagnose disease, detect abnormalities, and learn about overall heart function. Electrical signals are produced by contractions in the heart walls which drive electrical currents and create different potentials throughout the body. By placing electrodes on the skin, one can detect and record this electrical activity in an ECG. ECGs are non-invasive, making them a useful tool to assess how well a patients heart is performing, such as by measuring how well blood flows to the organ.

This video will illustrate the principals of ECGs and demonstrate how to acquire, process, and analyze a typical ECG signal using a biopotential amplifier. Other biomedical applications that utilize electrical signal processing to diagnose disease will also be discussed.

To understand the principles of an ECG, let’s first understand how the heart produces electrical signals. For a normal, healthy heart, at rest, an ECG displays a series of waves that reflect the different phases of a heartbeat. The ECG starts in the sinoatrial node, also known as the SA node, which is located in the right atrium and acts as a pacemaker in the heart. The electrical signals cause atrial contraction forcing blood into the ventricles. This sequence is recorded as the P wave on the ECG. This signal then passes from the atria across the ventricles, causing them to contract and pump blood to the rest of the body. This is recorded as the QRS complex.

Finally, the ventricles relax and this is recorded as the T wave. The process then begins again and is repeated for every heartbeat. Notice that the QRS wave is much larger than the P wave, this is because the ventricles are larger than the atria. Meaning they mask the relaxation of the atria or the T wave. Other processes in the body, like respiration or muscle contractions, can interfere with the ECG measurement. As can currents from the circuitry used to obtain them. Often, the electrical signals that the ECG is attempting to record are quite weak. Therefor, a biopotential amplifier is used to increase their amplitude which allows them to be further processed and recorded.

There are three main components to the biopotential amplifier, the patient protection stage, the instrumentation amplifier, and the high pass filter. As the main suggests, the patient protection circuit uses a combination of resistors and diodes to protect, both, the patient and the machine and equipment. The resistors limit the current that flows through the patient, where as the diodes keep the current flowing in the correct direction.

The next stage is the instrumentation amplifier, which amplifies the difference between the inputs from each electrode. It is composed of three operational amplifiers. Two to increase the resistance from each input, and the third to amplify the difference between the input signals.

The last stage is the high pass filter, which reduces the noise and filters out low frequency signals arising from patient movement or respiration. Now that you know how an ECG is measured, let’s see how to construct a biopotential amplifier and process the data to get a clean ECG signal.

Having reviewed the main principals of electrocardiography, let’s see how to build a biopotential amplifier and acquire an ECG signal. To begin, first gather a proto-board, an AD-620 instrumentation amplifier, and all necessary circuit components. Then, calculate the values of all of the resistors and capacitors in the circuit using the following equation.

For the high pass filter, the cut off frequency should be 0.5 hertz.

Then, plug in the capacitor value to determine the resistance. Next, build a biopotential amplifier according to the provided diagram. Here is what the final circuit should look like. Attach three wires with alligator clips to the binding posts of a DC power supply, then turn on the power source. Adjust the voltage to plus five volts and minus five volts, and connect the the wires, in series, to the circuit.

Now, use an alcohol prep pad to wipe the patients right wrist, left wrist, and right ankle. Add conductive adhesive gel to the electrodes before placing them on the patient. Then, connect the electrodes to the circuit using wires with alligator clips. Turn on the oscilloscope and acquire the ECG signal. Adjust the horizontal and vertical scales as needed. With these adjustments, you should be able to see the R peak of the wave form.

Connect the circuit to the PXI chassis, then open the instrumentation software and, either, use or write a program that will display the ECG signal and a wave form graph.

Configure the data acquisition interface with the following settings. Label the scale of the x-axis to display time and seconds, then display the ECG signal as a waveform. If the signal needs to be amplified, create a gain control and set it so that the amplitude of the ECG is two VP.

Now that we have demonstrated how to acquire an ECG signal, let’s see how to analyze the results. Here is a representative ECG signal. The P, QRS, and T waves are barely discernible because they are obscured by noise and fluctuations. This signal needs to be filtered. To transform this signal, first, select Signal Processing then Spectral on the menu. A Fast Fourier Transform algorithm calculates and plots the spectrum of the signal displaying the frequency as discreet values on the horizontal axis. Most of the energy in the signal is at low frequencies.

But, there is a high intensity peak in the medium frequency range, which is assumed to be noise. Frequency is plotted as k on the horizontal axis and goes from zero to N minus one over two, where N is the length of the sequence. For this experiment, N equals 2,000. Calculate the analog frequency for each k value using the following equation, where f s is the sampling frequency and determine the frequency of the high intensity peak based on the FFT graph.

Then, create a low pass filter with a cutoff frequency of 100 hertz. Use, either, the Butterworth or Chebyshev function to filter the signal, which should attenuate at least 60 decibels per decade in the stop band. Connect the output signal of the data sub VI to the input of the low pass filter. This filter removes the extraneous high frequency waves of the ECG. Now, create a Bandstop filter and set the cutoff frequencies at around 55 and 70 hertz.

To remove the noisy signal, around 60 hertz. Then, connect the output of the low pass filter to the input of the Bandstop filter. Try border frequencies that are close to 60 hertz. This will reduce interference without effecting other frequencies. The ECG signal should now be clear with distinct P, QRS, and T complexes.

Now, let’s determine the heart rate using the filtered ECG signal. First, use the peak detector sub VI to find the peaks of the signal. Choose the most appropriate value based on the signals amplitude of the R wave for the threshold. Then, use the Index Array sub VI to determine the location of the peaks.

Subtract the lower peak position from the higher position, then multiply this value by the sampling period, T, which is equal to one over f s. This value is the length of time between two R waves. Adjust the units to determine the beats per minute.

In this demonstration, the measured heart rate was approximately 60 beats per minute.

ECG and signal processing have important applications in, both, medicine and research. In addition to being non-invasive, ECGs are relatively inexpensive. Making it a useful and accessible tool in hospitals. ECGs can even be adapted to more complex and longterm monitoring of patients who are being treated for Acute Coronary Syndrome.

For this, 12 ECG leads are used, which can identify transient myocardial ischemia in asymptomatic patients. Signal sampling and processing is also used in electroencephalography to measure electrical signals from the brain. EEGs are commonly used in conjunction with functional MRI as a multimodal imaging technique.

The method noninvasively generates cortical maps of brain activity for many neuroimaging applications, such as after visual or motor activation.

You’ve just watched Jove’s introduction to acquiring and analyzing ECG signals. You should now understand how an ECG signal is produced and how to create a biopotential amplifier to detect weak electrical signals. You have also seen some biomedical applications of signal processing for medical diagnosis.

Thanks for watching.

Tags

Cite This
JoVE Science Education Database. JoVE Science Education. Acquisition and Analysis of an ECG (electrocardiography) Signal. JoVE, Cambridge, MA, (2023).