introduction
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 each manufacturer's software. This article will focus on ECG acquisition and analysis, and introduce how to efficiently realize the acquisition and analysis algorithm development of ECG signals through LabVIEW.
Figure 1 Typical single-cycle ECG waveform
Data collection of ECG signals
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.
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 the noise in the original ECG signal, while the feature extraction stage extracts diagnostic information from the ECG signal.
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.
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
• Electromyography (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.
Eliminate 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.
1. Digital filter method
LabVIEW graphical and interactive methods can be used to efficiently design and implement finite impulse response (FIR) or infinite impulse response (IIR) filters. For example, users 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.
Figure 4. Design and use of a high-pass filter to eliminate reference drift.
[page]
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.
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.
Figure 6 Comparison of digital filter-based and wavelet transform-based methods
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.
Figure 7 ECG signal before and after UWT wavelet denoising
Feature extraction of ECG signals
For diagnosis, various features need to be extracted from the preprocessed ECG data, including QRS wave interval, QRS wave amplitude, PR interval, ST interval, fetal heart rate, etc. Here, QRS complex wave detection is taken as an example.
Detecting the R peak and QRS complex in the ECG signal can provide information about heart rate, conduction velocity, various tissue states in the heart, and various abnormalities. It provides a basis for the diagnosis of heart disease, so it has attracted great attention in the field of ECG signal processing. However, noise and time-varying morphology make detection very difficult.
Because wavelets can extract and analyze the main features of noisy signals with the advantage of multi-resolution, many wavelet-based detection methods have been proposed in recent years. In this paper, the Multiscale Peak Detection function in the LabVIEW Advanced Signal Processing Toolkit is used to detect Q, R, and S points. Before peak/trough detection, the ECG signal is decomposed into 8-level Daubechies6 (db06) wavelets using the Multiresolution Analysis Express function, and then the signal is reconstructed using the D4 and D5 subbands. The reason why the D4 and D5 subbands can be used for reconstruction is that almost all QRS details are in these two subbands, which makes QRS detection more accurate.
Figure 8 Implementation of multi-resolution analysis of ECG signals and QRS wave detection
Figure 9 shows the ECG signal after wavelet multi-resolution analysis (MRA) and peak/trough detection, as well as the original ECG signal (from the MIT-BIH database). In this figure, it can be found that the peaks and troughs (especially the Q and S points) become more obvious after wavelet multi-resolution analysis.
Figure 9 Original ECG signal, ECG signal after MSA, and ECG signal after peak/trough detection
[page]
After the QRS complex wave is detected, other methods can be used for feature analysis. For example, the RR interval signal can be used to perform heart rate variation (HRV) analysis to show the status of the heart and nervous system.
LabVIEW Biomedical Electronics Starter Kit
The above introduction shows that various customized ECG analysis algorithms can be implemented through the powerful signal processing functions in LabVIEW. This article only introduces the implementation of some relatively mature and effective algorithms in LabVIEW, and uses this to illustrate the processing flow of ECG signals.
In addition to self-development using LabVIEW, NI also provides the latest biomedical electronics starter kit, which has integrated ECG feature extraction algorithms and human-computer interaction interfaces. See Figure 10. The toolkit not only supports the NI data acquisition platform to collect clinical ECG signals, but also supports file format reading of different professional databases such as MIT-BIH; in addition, in addition to the built-in wavelet analysis of QRS wave, P wave and T wave detection, it also opens source and supports user-defined algorithms; finally, the results of ECG feature extraction can be exported to TDMS files. If further analysis of the signal is required, such as heart rate variability analysis (HRV), the medical electronics toolkit also provides ready-made functions for users to call directly, see Figure 11.
In addition, LabVIEW and the Biomedical Electronics Toolkit can also be used in other biomedical signal processing fields, such as electroencephalogram (EEG), electromyography (EMG), and magnetic resonance imaging (MRI) 3D imaging.
Figure 10 ECG feature extraction function provided by LabVIEW Biomedical Electronics Toolkit
Figure 11 Heart rate variability analysis provided by LabVIEW Biomedical Electronics Toolkit
Summarize
LabVIEW and the Biomedical Electrophysiology Toolkit can provide a robust and efficient environment and tools to solve ECG signal processing problems. Through the ready-made analysis algorithms in the toolkit, or through LabVIEW graphical programming to implement custom algorithms, users can easily and quickly develop in heart disease diagnosis and ECG signal research, including noise elimination, analysis and extraction of ECG signals, etc.
Previous article:Application of CB3LP chip in temperature control system
Next article:Application cases of embedded intelligent platform in medical instrument industry
Recommended ReadingLatest update time:2024-11-16 16:45
- Popular Resources
- Popular amplifiers
- 100 Examples of Microcontroller C Language Applications (with CD-ROM, 3rd Edition) (Wang Huiliang, Wang Dongfeng, Dong Guanqiang)
- Arduino Nano collects temperature and humidity data through LabVIEW and DHT11
- Modern Testing Technology and System Integration (Liu Junhua)
- Computer Control System Analysis, Design and Implementation Technology (Edited by Li Dongsheng, Zhu Wenxing, Gao Rui)
- High-speed 3D bioprinter is available, using sound waves to accurately build cell structures in seconds
- [“Source” Observation Series] Application of Keithley in Particle Beam Detection Based on Perovskite System
- STMicroelectronics’ Biosensing Innovation Enables Next-Generation Wearable Personal Healthcare and Fitness Devices
- China's first national standard for organ chips is officially released, led by the Medical Devices Institute of Southeast University
- The world's first non-electric touchpad is launched: it can sense contact force, area and position even without electricity
- Artificial intelligence designs thousands of new DNA switches to precisely control gene expression
- Mouser Electronics provides electronic design engineers with advanced medical technology resources and products
- Qualcomm Wireless Care provides mobile terminal devices to empower grassroots medical workers with technology
- Magnetoelectric nanodiscs stimulate deep brain noninvasively
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Looking for a company that can make SIC simulation models
- The volume control IC PT2259 has background noise, how to solve it?
- [National Technology N32G430] 4GPIO inversion
- Computer World has been eliminated by the computer world! Do you still read paper magazines/newspapers?
- EEWORLD University - Getting Started from the Ground Up: Teach You How to Quickly Develop MSP430 Projects
- Free evaluation - Topmicro intelligent display module (1) Receive module
- TI has integrated it! CAN FD strengthens and upgrades automotive neural networks
- EEWORLD University - Key Considerations for Isolated CAN Transceivers
- Looking for chips or modules---infrared photoelectric sensor switch, infrared human body sensor switch, gravity sensor switch
- Hiring embedded engineers