Design of ECG signal acquisition and analysis based on LabVIEW

Publisher:创新之梦Latest update time:2011-07-21 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Biomedical electrical signals, such as ECG signals, blood pressure signals, and EEG signals, all represent certain pathological characteristics. Taking ECG as an example, ECG is usually used to record the bioelectric current generated by the heart. Clinicians can use ECG to evaluate the patient's heart condition and make further diagnoses. For some home or medical instrument manufacturers, it is necessary to develop specific signal processing algorithms and deploy them on embedded processors to complete the extraction of medical electrical characteristics. Usually, the development process of a complete set of ECG monitoring products consists of ECG data acquisition, ECG signal analysis, human-computer display, file storage, etc. Through the graphical system design platform provided by NI, a series of product development processes such as data acquisition, signal reading, ECG analysis, and report generation can be covered to complete the development of the entire system and improve development efficiency. In the entire development process, the signal analysis part is often the focus and the core technology of the software of each manufacturer. This article will focus on the discussion of ECG acquisition and analysis, and introduce how to efficiently realize the acquisition and analysis algorithm development of ECG signals through LabVIEW.

4.jpg

Figure 1 Typical single-cycle ECG waveform

1 ECG signal data acquisition

Generally speaking, ECG signals are sensed by several electrodes (leads) to sense bioelectric currents, and the analog electrical signals generated by the leads are converted into digital signals through data acquisition equipment for computer analysis. The analog signals generated by the leads are often weak, with an amplitude of about mV, and need to be collected by dynamic signal acquisition equipment or after pre-amplification. Whether it is an independent ECG lead or an integrated medical ECG device, data can be collected through NI devices.

Through more than 30 years of development, National Instruments (NI) has established a leading position in the field of test and measurement. From portable USB devices to high-precision PXIe synchronous sampling devices, it can achieve resolutions from 8 to 24 bits and sampling rates from 48kHz to 2GHz. At the same time, NI devices take into account various error values ​​such as gain error, offset error, and uncertain noise, and provide absolute accuracy values ​​to ensure the accuracy of the final measurement. Generally speaking, the frequency of ECG signals is around a few hundred hertz, and can be sampled at a sampling rate of about 1k to 5k. In addition, depending on the accuracy of the application, a sampling accuracy of 14 to 16 bits can be selected. Basically, any data acquisition device on NI's platform can meet the sampling requirements of ECG. You can choose the right device according to the application, such as USB data acquisition in portable devices and wireless acquisition in telemedicine applications.

3.jpg

Figure 2 NI data acquisition solution from USB to wireless

Regardless of the NI hardware platform used, development can be achieved through the same programming platform - NI graphical programming software LabVIEW. Since its birth in 1986, the LabVIEW graphical development platform has been committed to simplifying the complexity of programming. In all fields involving data acquisition and control, LabVIEW graphical programming has become a standard development tool. For the development team of medical electronic equipment, LabVIEW provides a shortcut to introduce hardware I/O into algorithm design, seamlessly combining all aspects of the process from data acquisition, algorithm analysis, data storage, and human-computer interaction. At the same time, different NI hardware can be released to different commercial and embedded platforms through code reuse, simplifying the complexity of building prototype systems.

Through LabVIEW and NI acquisition equipment, ECG signals can be quickly collected and displayed. Figure 1 shows a typical ECG waveform cycle. Of course, in the process, the ECG signal will be contaminated by noise and artificially introduced artifacts. These noises and artifacts are within the frequency band of interest and have similar characteristics to the ECG signal itself. In order to extract useful information from the noisy ECG signal, we need to process the original ECG signal.

Functionally, the processing of ECG signals can be roughly divided into two stages: preprocessing and feature extraction (as shown in Figure 3). The preprocessing stage removes and reduces noise in the original ECG signal, while the feature extraction stage extracts diagnostic information from the ECG signal.

2.jpg

Figure 3 Typical ECG signal processing flow chart

Through the signal processing functions in LabVIEW, users can easily create signal processing applications for the two stages, including eliminating baseline drift, removing noise, QRS complex wave detection, fetal heart rate detection, etc.

Next, we will focus on the typical ECG signal processing methods using LabVIEW.

2 ECG signal preprocessing

ECG signal preprocessing can help users remove contamination from ECG signals. Broadly speaking, ECG signal contamination can be divided into the following categories:

• Power line interference

• Electrode separation or contact noise

• Artifacts introduced by patient electrode movement

• Electromyographic (EMG) noise

• Benchmark drift

Among these noises, power line interference and reference drift are the most important and can strongly affect ECG signal analysis. In addition to these two noises, other noises may also distort ECG signals due to their wideband and complex random processes. Power line interference is a narrowband noise centered at 60 Hz (or 50 Hz) with a bandwidth of less than 1Hz. Usually, power line interference can be eliminated by ECG signal acquisition hardware or by software notch filters. However, reference drift and other broadband noise are difficult to suppress by hardware devices. Software design has become a more powerful and feasible method for ECG signal processing. Users can use the following methods to eliminate reference drift and other broadband noise.

3 Eliminating reference drift

Baseline drift is usually caused by breathing and has a frequency between 0.15 and 0.3 Hz. It can be suppressed by using a high-pass digital filter. Users can also use wavelet transform to eliminate baseline drift by detrending the ECG signal.

3.1 Digital filter method

LabVIEW allows you to efficiently design and implement finite impulse response (FIR) or infinite impulse response (IIR) filters using graphical and interactive methods. For example, you can use the Classical Filter Design Express VI to design a Kaiser window FIR high-pass filter to eliminate reference drift. Figure 4 shows an example of using a high-pass filter to eliminate reference drift.

1.jpg

Figure 4. Design and use of a high-pass filter to eliminate reference drift.

3.2 Wavelet transform method

In addition to digital filters, wavelet transform is also an effective method to eliminate signals within a specified frequency band. LabVIEW Advanced Signal Processing Toolkit provides a wavelet detrend function that can eliminate the low-frequency trend of the signal. Figure 5 shows an example of a program that uses wavelet to eliminate baseline drift.

3.jpg

Figure 5 Using WA Detrend VI to eliminate baseline drift

The example uses the Daubechies6 (db06) wavelet because it is similar to the actual ECG signal.

Figure 6 shows the original ECG signal, the ECG signal obtained by digital filtering and wavelet transform. It can be seen that the processed ECG signal contains almost no baseline drift information while maintaining the main characteristics of the original ECG signal. It can also be noted that the wavelet transform-based method is more advantageous because it does not introduce delay and has less distortion than the digital filter method.

2.jpg

Figure 6 Comparison of digital filter-based and wavelet transform-based methods

4 Eliminating broadband noise

After eliminating the baseline drift, the ECG signal is clearer and more stable than the original signal. However, other types of noise still affect the feature extraction of the ECG signal. These noises are often complex random processes with wide bandwidths, so traditional digital filters cannot be used, but the Wavelet Denoise function in LabVIEW can be used.

The ECG signal is decomposed into sub-bands through wavelet transform, and then the wavelet coefficients are adjusted using threshold or shrinkage functions to reconstruct the signal after noise elimination. The figure below shows that through the undecimated wavelet transform (UWT) in LabVIEW, broadband noise is greatly suppressed while the details of the ECG signal remain unchanged.

1.jpg

Figure 7 ECG signal before and after UWT wavelet denoising

Reference address:Design of ECG signal acquisition and analysis based on LabVIEW

Previous article:Networked Hospital Video Surveillance Solutions
Next article:Design of ECG signal acquisition and analysis based on LabVIEW

Latest Industrial Control Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号