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.
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.
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.
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.
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.
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
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.
Figure 7 ECG signal before and after UWT wavelet denoising
Previous article:Networked Hospital Video Surveillance Solutions
Next article:Design of ECG signal acquisition and analysis based on LabVIEW
- Popular Resources
- Popular amplifiers
- Molex leverages SAP solutions to drive smart supply chain collaboration
- Pickering Launches New Future-Proof PXIe Single-Slot Controller for High-Performance Test and Measurement Applications
- CGD and Qorvo to jointly revolutionize motor control solutions
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Nidec Intelligent Motion is the first to launch an electric clutch ECU for two-wheeled vehicles
- Bosch and Tsinghua University renew cooperation agreement on artificial intelligence research to jointly promote the development of artificial intelligence in the industrial field
- GigaDevice unveils new MCU products, deeply unlocking industrial application scenarios with diversified products and solutions
- Advantech: Investing in Edge AI Innovation to Drive an Intelligent Future
- CGD and QORVO will revolutionize motor control solutions
- 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
- New predictions for cloud computing in 2019
- Typical applications of Zigbee technology in street light control systems
- Bluetooth BLE - BlueNRG2 VTimer
- Celebrate National Day and wish our motherland a happy 70th birthday!
- Why are pull-up resistors necessary in microcontroller systems?
- Update the user program of DSP28335 through the serial port SCI
- How to design a triode amplifier circuit
- C5517 FFT hardware accelerator performs calculations sometimes well and sometimes poorly
- Antenna Aperture Tuning eBook
- Burn dtb file separately