This document is to introduce the preprocessing VIs in Biomedical Toolkit.
If you have installed Biomedical Toolkit LabVIEW 2012(32-bit) Support version, you can find Biosignal Preprocessing VIs on the palette, including calculating the root mean square (RMS) value, applying filter, calculating the average value (ARV) and performing discrete integration and differentiation.
In mathematics, the root mean square (RMS), also known as the quadratic mean, is a statistical measure of the magnitude of a varying quantity. It is especially useful when variates are positive and negative.
Biosignal RMS calculates the online root mean square (RMS) value of each dataset of a biosignal. The length of each dataset is specified by window info.
This VI firstly slides the window specifies window info through the biosignal to get the dataset. Then it calculates the RMS of the current data set using the following equation,
where ψx is RMS value and n is the length of the dataset X.
Following is an example of calculating online EMG RMS. The above figure shows the original EMG signal, sampled at 1000Hz. The below figure shows the RMS result with the window time 0.02s.
Biosignal Filtering include classical filters (lowpass, highpass, bandpass and bandstop filters), notch filter and comb filter.
Biosignal Classical Filter includes lowpass, highpass, bandpass and bandstop filter. You can select onr of them through the filter type. Freq specs specifies the band edge frequencies of the filter in hertz and ripple specs specifies the ripple level in the passband and stopband of the filter.
A notch filter is a band-stop filter with a narrow stopband, which can be used to suppress noise at a specified frequency such as AC powerline fundamental.
The following figure shows a typical notch filter. In a notch filter, f 0 denotes the center frequency and Δf denotes the frequency bandwidth at Ab . The default value of Ab is −3 dB. Q = f 0/Δf, which denotes the sharpness of the notch. Increasing the value of Q results in a sharper notch filter.
Following is an example of removing the noise at 60 Hz from ECG signal. The following left figure shows the original ECG signal, sampled at 480 Hz, while the right figure shows its spectrum. In the left figure, you can identify noise at 60 Hz.
To remove the noise, use the Biosignal Notch Filter with the f 0 60Hz and Df 0.5Hz.The following figures show the notch filtered ECG signal and its spectrum. You can find that 60Hz noise is decreased significantly.
You can use notch filter to suppress noise at one particular frequency. However, you might want to suppress noise at more than one frequency, such as AC powerline fundamental and harmonics. In that situation, you can use a comb notch filter.
The following figure shows a typical comb notch filter in which the first notch occurs at f = 0, or equivalently, (|H(0)| = 0).
Biosignal ARV is roughly equivalent to Biosignal RMS. It calculates the average rectified value (ARV) of each dataset of a biosignal. The length of each dataset is also specified by window info.
Rectification type specifies the type of rectification that this VI uses to calculate the ARV of the biosignal.
For Absolute, it calculates the ARV of the current data set using the following equation,
For Square, it calculates the ARV of the current data set using the following equation,
where ψx is ARV value and n is the length of the dataset X.
Following is an example of calculating online EMG ARV. The above figure shows the original EMG signal, sampled at 1000Hz. The below figure shows the ARV result with the window time 0.02s.
Biosignal Integral & Derivative performs the online discrete integration or differentiation of a biosignal.
Operation specifies the type of operation to perform on biosignal in, including Integral and Derivative. Integration time specifies the duration, in seconds, of one segment to perform integration. It is for Integral only.
Following is an example of performing online EMG Integral. The first figure shows the original EMG signal, sampled at 1000Hz. The second figure shows the ARV result of the original EMG with the window time 0.02s. The third figure shows the Integral result of the ARV with integral time 0.25s. Integral splits up the biosignal into segments and sets the integral value to 0 at each segment.
If you have installed Biomedical Toolkit LabVIEW 2012(32-bit) Support version, you can find two examples related these preprocessing VIs described in this document under the folder …\National Instruments\LabVIEW 2012\examples\Biomedical\Biosignal.
Example 1:
Example 2:
Feel free to let us know your questions in using these VIs and Controls.