Implementation of MATLAB Modular Processing System for Biological Signals

Implementation of MATLAB Modular Processing System for Biological Signals

Available online at www.sciencedirect.com ScienceDirect IFAC PapersOnLine 52-27 (2019) 536–544 Implementation of MATLAB Modular Implementation Imple...

1MB Sizes 0 Downloads 43 Views

Available online at www.sciencedirect.com

ScienceDirect IFAC PapersOnLine 52-27 (2019) 536–544

Implementation of MATLAB Modular Implementation Implementation of of MATLAB MATLAB Modular Modular Processing System Biological Signals Implementation MATLAB Modular Processing Systemoffor for Biological Signals Processing System for Biological Signals Processing System for Biological Signals∗ ∗ ∗ Martina Martina Martina Martina Martina

Ladrova Martinek Ladrova ∗∗∗ Michaela Michaela∗ Sidikova Sidikova ∗∗∗ Radek Radek Martinek ∗∗∗ ∗ LadrovaRene Michaela Sidikova Radek Martinek ∗ Jaros Petr Bilik ∗ ∗ Ladrova Michaela Sidikova Radek Martinek ∗ ∗ Rene Jaros Petr Bilik ∗ LadrovaRene Michaela Martinek ∗ Jaros ∗∗∗ Sidikova Petr Bilik BilikRadek Rene Jaros Petr Rene Jaros Petr Bilik ∗ ∗ ∗ Department of Cybernetics and Biomedical Engineering, Faculty of Department of Cybernetics and Biomedical Engineering, Faculty of ∗ ∗ Department of and Biomedical Engineering, Faculty Electrical and Computer Science, VSB–Technical of Cybernetics Cybernetics Biomedical Engineering, Faculty of of ∗ Department Electrical Engineering Engineering andand Computer Science, VSB–Technical Department of Ostrava, Cybernetics and Biomedical Engineering, Faculty of Electrical Engineering and Computer Science, VSB–Technical University of 17. listopadu 15, 708 33 Ostrava, Czech Electrical Engineering andlistopadu Computer15, Science, VSB–Technical University of Ostrava, 17. 708 33 Ostrava, Czech Electrical Engineering and Computer Science, VSB–Technical UniversityRepublic, of Ostrava, Ostrava, 17. listopadu listopadu 15, 708 708 33 33 Ostrava, Ostrava, Czech Czech (e-mail: [email protected], University of 17. 15, (e-mail: [email protected], UniversityRepublic, of Ostrava, 17. listopadu 15, 708 33 Ostrava, Czech Republic, (e-mail: [email protected], [email protected], [email protected], [email protected], Republic, (e-mail: [email protected], [email protected], [email protected], [email protected], Republic, (e-mail: [email protected], [email protected], [email protected], [email protected], [email protected]). [email protected], [email protected], [email protected], [email protected]). [email protected], [email protected], [email protected], [email protected]). [email protected]). [email protected]). Abstract: Abstract: A A biological biological signal signal is is a a weak weak signal, signal, so so it it is is necessary necessary to to find find new new or or improve improve methods methods Abstract: A biological biological signal is is a weak weak signal, signal, so it it is is necessary necessary to find new or or signal improve methods of its processing. The paper proposes the implementation of the modular processing Abstract: A signal a so to find new improve methods of its processing. The paper proposes the implementation of to thefind modular signal processing Abstract: A biological signal is a weak signal, so it is necessary new or improve methods of its its processing. processing. The and paper proposes the implementation implementation of the the modular modular signal processing processing system for processing further analysis of the most commonly used biological signals of The paper proposes the of signal system for processing and further analysis of the most commonly used biological signals in in of its processing. The paper proposes the implementation of the modular signal processing system for processing and further analysis of the most commonly used biological signals diagnostics, such electromyogram, electroencephalogram, phonocardiosystem for processing and further analysis of the most commonly used biological signals in in diagnostics, such as as electrocardiogram, electrocardiogram, electromyogram, electroencephalogram, phonocardiosystem for processing and further analysis of the most commonly used biological signals in diagnostics, such as electrocardiogram, electromyogram, electroencephalogram, phonocardiogram or pulse wave it is possible to employ it also in other signal processing areas. Based diagnostics, such as but electrocardiogram, electromyogram, electroencephalogram, phonocardiogram or pulse wave but it is possible to employ it also in other signal processing areas. Based diagnostics, such as electrocardiogram, electromyogram, electroencephalogram, phonocardiogram or pulse pulse wave wave but it it is isapossible possible to employ employ it also also in in other other signal processing processing areas. Based on contemporary literature, wide of and methods embedded gram or but to it signal areas. Based on contemporary literature, wide range range of the the processing processing and filtering filtering methods are are embedded gram orfilters, pulse adaptive wave butfilters, it isaapossible to employ itindependent also in other signal processing areas. Based on contemporary contemporary literature, wide range of the the processing processing andand filtering methods are embedded (digital wavelet transform, principal component analysis on literature, a wide range of and filtering methods are embedded (digital filters, adaptive filters, wavelet transform, independent and principal component analysis on contemporary literature, a wide range of the processing and filtering methods are embedded (digital filters, adaptive filters, wavelet transform, independent and principal component analysis etc.) into user-friendly serving for testing accuracy and suitabilityanalysis of the the (digital filters, adaptive interface, filters, wavelet transform, principal component and suitability of etc.) into user-friendly interface, serving for the the independent testing of of the theand accuracy (digital filters, adaptivefor filters, wavelet transform, independent and principal component analysis etc.) interface, serving for testing of accuracy and suitability of individual techniques the signal processing. software designed to ensure as greatest etc.) into into user-friendly user-friendly interface, serving for the theThe testing of the theis accuracy and suitability of the the individual techniques for the signal processing. The software is designed to ensure as greatest etc.) into user-friendly interface, serving for theThe testing ofbasic theismodifications accuracy suitability of the individual techniques for the signal signal processing. software designed and to ensure ensure as greatest greatest as possible area biological signal processing so or of individual the processing. The software designed to as as possible techniques area of of the the for biological signal processing so that that basicis modifications or analysis analysis of any any individual techniques for the signal processing. The software is designed to ensure as greatest as possible possible area area of of the biological biological signal processing so that that basic basic modifications modifications or or analysis analysis of of any any one-dimensional biological signal can be made. as the signal processing so one-dimensional biological signal can be made. as possible area of the biological signalbeprocessing so that basic modifications or analysis of any one-dimensional one-dimensional biological biological signal signal can can be made. made. one-dimensional biologicalFederation signal canofbe made. Control) Hosting by Elsevier Ltd. All rights reserved. © 2019, IFAC (International Automatic Keywords: Keywords: Biological Biological Signal Signal Processing, Processing, Digital Digital Signal Signal Processing. Processing. Keywords: Keywords: Biological Biological Signal Signal Processing, Processing, Digital Digital Signal Signal Processing. Processing. Keywords: Biological Signal Processing, Digital Signal Processing. 1. INTRODUCTION into account developments in in the the last last few few years, years, it it can can 1. INTRODUCTION into account developments 1. into account developments in the last few years, it can be noted that today’s time of changes is evoked by the 1. INTRODUCTION INTRODUCTION into account developments in the last few years, it can be thatdevelopments today’s time in of the changes is evoked by the 1. INTRODUCTION intonoted account last few years, it can be noted that today’s time of changes is evoked by the Because the biological signals are often corrupted by many performance parameters of available means of computing be noted that today’s time of changes is evoked by the Because the biological signals are often corrupted by many performance of available means of computing be noted thatparameters today’s time of changes is evoked by the Because biological are by parameters of available means of computing types of the artifacts or signals interference, thecorrupted signal processing processing and is characterized by new trends in the signal processing Because the biological signals are often often corrupted by many many performance performance parameters of available means of computing types of artifacts or interference, the signal and is characterized by new trends in the signal processing Because biological signals corrupted by many performance parameters of available means of computing types artifacts or the signal makes upthe the important partare of often their analysis and thus, and area. types of of artifacts or interference, interference, the analysis signal processing processing and is is characterized characterized by by new new trends trends in in the the signal signal processing processing makes up the important part of their and thus, area. types of artifacts or interference, the signal processing and is characterized by new trends in the signal processing makes important part and facilitates correct interpretation and aaanalysis further diagnosis. diagnosis. makes up up aathe the important part of of their their analysis and thus, thus, area. area. facilitates correct interpretation and further makes up the important part of their analysis and thus, As a reaction on this development in biological signal area. facilitates a correct interpretation and a further diagnosis. The signala filtering filtering and processing processing enables to diagnosis. eliminate As a reaction on this development in biological signal facilitates correct interpretation andenables a further The signal and to eliminate As aa reaction this development biological signal facilitates athe correct interpretation andenables a further diagnosis. processing, the on software which can can be be in available in clinical clinical As reaction on this development in biological signal The signal filtering and processing to eliminate or remove undesirable components of the signal so processing, the software which available in Theremove signal the filtering and processing enables to eliminate As a reaction on thismore development in biological signala or undesirable components of the signal so processing, software which can available clinical Theremove signal filtering andinformation processing enables to eliminate practice, is the more and evolved. This paperin brings processing, the software which can be beThis available inbrings clinical or the undesirable components of the signal so that the more valuable can be extracted. The practice, is more and more evolved. paper a or remove the undesirable components of the signal so processing, the software which can be available in clinical that the more valuable information can be extracted. The practice, is more and more evolved. This paper brings or remove thevaluable undesirable components of(e.g. the reciprocal signalThe so description description of the theand modular signal processing processing application practice, is more more evolved. This paper brings aa that the more information can be extracted. sources of the noise can be physiologic of modular signal application that the more valuable information can be extracted. The practice, is more and more evolved. This paper brings sources thevaluable noise can be physiologic (e.g. reciprocal of signal processing application that the of more information can beother, extracted. The description created in MATLAB MATLAB software, implemented mainly for the thea description of the the modular modular signal processing application sources of the noise can be physiologic (e.g. reciprocal influence of the different organs on each biological created in software, implemented mainly for sources of the noise can be physiologic (e.g. reciprocal description of the modular signal processing application influence the noise different on each other, biological created software, the sources ofof the can organs be movement physiologic (e.g. purposes the education education and implemented testing of of the themainly severalfor today created in inofMATLAB MATLAB software, implemented mainly for the influence the organs on biological rhythms, patient’s moving, ofother, the reciprocal electrodethe and testing several today influence of of the different different organs on each eachof other, biological purposes created inof MATLAB software, implemented mainly for the rhythms, patient’s moving, movement the electrodepurposes of the education and testing of the several today influence of the different organs on each other, biological well-known processing methods. These methods were chopurposes of the education and testing of the several today rhythms, patient’s moving, movement of the electrodeelectrolyte interface) or the environment where the signal well-known processing methods. These methods were chorhythms, patient’s moving, movement of the electrodepurposes of the education and testing of the several today electrolyte interface) or the environment where the signal well-known processing methods. These methods were chorhythms, patient’s moving, movement ofwhere the typical electrodesen based on onprocessing the research research of the theThese contemporary literature well-known methods. methods were choelectrolyte interface) or the the recording takes place. The noise sources are for sen based the of contemporary literature electrolytetakes interface) orThe the environment environment where the signal signal well-known processing methods. These methods were chorecording place. noise sources are typical for sen based on the research of the contemporary literature electrolyte interface) orThe the environment where the how signal and includes digital filtration (Panda and Pati, 2012; Jagsen based on the research of the contemporary literature recording takes place. noise sources are typical for each individual biologic signal, depending on a way a includes digital filtration (Panda and Pati, 2012; Jagrecording takes biologic place. The noise sources on area typical fora and sen based on the research of the contemporary literature each individual signal, depending way how includes digital filtration (Panda Pati, 2012; recording takes biologic place. The noise sources are for and tap and Uplane, 2012), adaptive noise and canceller (Soedirdjo and and includes digital filtration (Panda and Pati, (Soedirdjo 2012; JagJageach signal, depending aa typical way how signal is measured, measured, which sensors are used usedon (e.g. different Uplane, 2012), adaptive noise canceller each individual individual biologic signal, depending on(e.g. way how aa tap andal., includes digital filtration (Panda and Pati, (Soedirdjo 2012; Jagsignal is which sensors are different tap and Uplane, 2012), adaptive noise canceller each individual biologic signal, depending on a way how a et 2015), principal and independent component analytap and Uplane, 2012), adaptive noise canceller (Soedirdjo signal is sensors are types of interferencewhich corrupt an electrical electrical signaldifferent in the the et al., 2015), principal and independent component analysignal of is measured, measured, which sensors are used used (e.g. (e.g. different tap and Uplane, 2012), adaptive noise canceller (Soedirdjo types interference corrupt an signal in et al., 2015), principal and independent component analysignal of is measured, sensors areetc.) usedand (e.g. different sis (Corradino and Bucolo, Bucolo, 2015; Velez-Perez Velez-Perez et al., al.,analy2011; et al., 2015), principal and independent component types corrupt an signal in the comparison with an anwhich acoustic signal, also what (Corradino and 2015; et 2011; types of interference interference corrupt signal, an electrical electrical signal inwhat the sis et al., 2015), principal and independent component analycomparison with acoustic etc.) and also (Corradino and Bucolo, 2015; Velez-Perez et al., 2011; types of interference corrupt an electrical signal inwhat the sis Romo-Vazquez et al., al., 2007), derivation, wavelet transsis (Corradino and Bucolo, 2015; Velez-Perez et al., 2011; comparison with an acoustic signal, etc.) and also is the frequency range of the signal. Romo-Vazquez et 2007), derivation, wavelet transcomparison withrange an acoustic signal, etc.) and also what Romo-Vazquez sis (Corradino and Bucolo, Velez-Perez etYavuz al., trans2011; is the frequency of the signal. et derivation, wavelet comparison withrange an acoustic signal, etc.) and also what form form (Balasubramaniam and2015; Nedumaran, 2009; and Romo-Vazquez et al., al., 2007), 2007), derivation,2009; wavelet transis the frequency of the signal. (Balasubramaniam and Nedumaran, Yavuz and is the frequency range of the signal. Romo-Vazquez et al., 2007), derivation, wavelet transform (Balasubramaniam and Nedumaran, 2009; Yavuz and In the last few years, there has been significant developis the frequency range of the signal. Aydemir, 2016; Reaz et al., 2006), and empirical mode form (Balasubramaniam and Nedumaran, 2009; Yavuz and In the last few years, there has been significant develop- Aydemir, 2016; Reaz etand al.,Nedumaran, 2006), and 2009; empirical mode form (Balasubramaniam Yavuz and In few there been develop2016; Reaz et al., 2006), and empirical mode ment oflast advanced methods of digital digital signal processing. processing. decomposition (Pang et al., 2016). In the theof last few years, years, there has has been significant significant develop- Aydemir, Aydemir, 2016; Reaz et al., 2006), and empirical mode ment advanced methods of signal decomposition In the last few ofyears, there examined has been significant developAydemir, 2016;(Pang Reaz et etal., al.,2016). 2006), and empirical mode ment of advanced methods of digital signal processing. decomposition (Pang et al., 2016). The topicality the issues the increase in the ment of advanced methods of digital signal processing. decomposition (Pang et al., 2016). a tool for the testing The of the issues examined the increase in the The menttopicality of advanced methods of digital signal processing. implemented system represents decomposition (Pang et al., 2016). a tool for the testing The the issues the increase in the the The performance ofof the microprocessor technique (multi-core implemented system represents The topicality topicalityof ofthe themicroprocessor issues examined examined the increase in performance technique (multi-core The implemented system represents aa tool the The topicality of the issues examined the increase in the processing methods and enables the user user to for compare more The implemented system represents tool for the testing testing performance of the microprocessor technique (multi-core processors, field-programmable gate technique arrays). Just Just an inadinad- processing methodssystem and enables the to compare more performancefield-programmable of the microprocessor (multi-core The implemented represents a tool for the testing processors, gate arrays). an processing methods and enables the user to compare more performance of the microprocessor technique (multi-core techniques of the processing of the corrupted signal. The processing methods and enables the user to compare more processors, field-programmable gate arrays). Just an inadequate computing performance has been in the past the techniques of the processing of the corrupted signal. The processors, field-programmable an inadprocessing methods and enables theadd usera tomixture compare more equate computing performancegate has arrays). been in Just the past the techniques of the processing of the corrupted signal. The processors, field-programmable gate arrays). Just an inadsystem offers the possibility to of the techniques of the processing of the corrupted signal. equate computing been the the main limiting factorperformance for the the use use has of certain certain complex methoffers theprocessing possibilityoftotheadd a mixture of The the equatelimiting computing performance has been in in the past past the system techniques of the corrupted signal. The main factor for of complex methsystem offers the possibility to add a mixture of the equate computing performance has been in the past the available types of interference to the processed signal and system offers the possibility to add a mixture of the main limiting factor for of complex methods. In addition, recently theuse new measurement methods types the of interference to the signal mainIn limiting factor for the the use of certain certain complex meth- available system offers possibility to addprocessed a mixture of and the ods. addition, recently the new measurement methods available types of interference to the processed signal and main limiting factor for the use of certain complex methevaluate the precision of the processing by computing available types of interference to the processed signal and ods. In addition, recently the new measurement methods have been occurred; the biolocation biolocation signals (sensing (sensing using evaluate the precision of thetoprocessing by computing ods. In addition, recently the new measurement methods available types of interference theand processed signal and have been occurred; the signals using evaluate the precision of the processing by computing ods. In addition, recently the new measurement methods of the signal-to-noise ratio (SNR) determining the evaluate the precisionratio of the processing by computing have been the using the optical fibers, miniature miniature sensorssignals in the the(sensing bloodstream, the signal-to-noise (SNR) and determining the haveoptical been occurred; occurred; the biolocation biolocation signals (sensing using of evaluate the precision ofsignal the processing byfiltration computing the fibers, sensors in bloodstream, signal-to-noise ratio (SNR) and determining the haveoptical been occurred; the biolocation signals (sensing using of shape distortion of the the during the by of the the distortion signal-to-noise ratio (SNR) and the determining the the fibers, miniature sensors in the bloodstream, etc.) and in general, these new approaches also require shape of signal during filtration by the optical fibers, miniature sensors in the bloodstream, of the distortion signal-to-noise ratio (SNR) and the determining the etc.) and infibers, general, these new approaches also require shape of the signal during filtration by the optical miniature sensors in the bloodstream, correlation coefficients. After each change of the processed shape distortion of the signal during the filtration by etc.) and in general, these new approaches also require the improvement of the thethese signalnew processing methods. Taking correlation coefficients. eachduring changethe of the processed etc.)improvement and in general, approaches also require shape distortion of theAfter signal filtration by the of signal processing methods. Taking correlation coefficients. After each change of the processed etc.)improvement and in general, these new approaches also require correlation coefficients. After each change of the processed the of the signal processing methods. Taking the improvement of the signal processing methods. Taking correlation coefficients. After each change of the processed the improvement of the signal processing Taking 2405-8963 © 2019, IFAC (International Federationmethods. of Automatic Control) Hosting by Elsevier Ltd. All rights reserved. Peer review under responsibility of International Federation of Automatic Control. 10.1016/j.ifacol.2019.12.719



Martina Ladrova et al. / IFAC PapersOnLine 52-27 (2019) 536–544

537

Fig. 1. The user interface of the main window of the implemented software, where the user can modify the original and corrupted signals.

Martina Ladrova et al. / IFAC PapersOnLine 52-27 (2019) 536–544

538

signal (e.g. adding the interference or filtration), these criteria are computed and the user can compare the values of the original signal, corrupted signal and filtered signal, when also the graphic representation is displayed - time waveforms of the signals, their frequency spectra and spectrograms which shows frequency distribution in time (see Fig. 1). A whole function of the application is described in the following sections. 2. BIOSIGNAL PROCESSING The whole program contains five basic parts: loading a signal, it’s resampling, adding an interference, filtration or other processing methods and last, analysis. The general function of the software is designed in Fig. 2. Summary of the options when working with signals is described in Table 1. Start

no

Loading of signal

Active signal choice Analyse signal yes

no

yes

Analysis module

no

Signal processing module

no

Save signal yes

no

Linear

Interference and Noise Power line interference 50/60 Hz

Filtration

Processing

FIR filter

WT

Gauss trend

IIR filter

EMD

Linear trend Random noise Lowfrequency drift White noise

Moving average filter Notch

Nearest neighbor Cubic Cubic spline

ANC

Derivation ICA

Analysis Fixed peak detector Adaptive peak detector Frequency power Envelope

PCA

The resampling process is carried out by different interpolation techniques (Srikanth et al., 1998). The user can select the type of interpolation, such as linear, nearest neighbor, cubic and spline interpolation. The resampled signal is saved also as the original signal.

yes

Edit signal

Sampling

of analysis (e.g. ECG duration of RR or ST interval, the width of T or P waves, etc.), or vice versa when the high resolution is not needed when analyzed. Thus, the sampling frequency is reduced to allow faster, although less accurate signal processing.

Main window

Loaded signal exists

Table 1. Summary of the software functions.

Save signal

Saving of signal

yes Saving of signal End

Fig. 2. UML diagram of the application. 2.1 Signal Loading The software allows loading a signal in the .mat format. The system can work both with signals single-channel and multi-channel when each channel is saved in one row of the matrix. For the successful loading of the signal, the user has to type a sampling frequency or the time duration of the signal. The next step is to select the desired time segment of the signal and channels of the signal, which would be loaded into the system. This signal is saved as an original signal in the main window of the application. 2.2 Resampling Signal resampling is used when the sampling frequency originally used is not high enough for some specific types

2.3 Interference and Noise In this step, the user can add to the signal power line interference, low-frequency drift, Gauss or linear trend, random high-frequency noise or white noise. So, the options include simulation of the different states of the signal, non-depending on the type of signal or the way of its measurement. For example, high-frequency noise can simulate effect of electromagnetic fields but also poor electrode-skin contact, muscle potentials or acoustic noise; low-frequency drift or trends can represent slow motion artifacts occurring from patient’s breathing or limb moving. Due to these opportunities, the system can also simulate pathological phenomena by combining all these types of interference (Watford, 2014; Costa et al., 2012; Elgendi, 2012; Luca et al., 2012; Abbaspour and Fallah, 2014). All types of noise can be modified in amplitude, power line interference and slow trends above that in frequency. The signal with added interference is saved as the corrupted signal to the main window. 2.4 Processing From the processing methods, IIR (infinite impulse response) filters, FIR (finite impulse response) filters, moving average, adaptive noise canceller (ANC), principal and independent component analysis (PCA and ICA), derivation, wavelet transform (WT) and empirical mode decomposition (EMD) are implemented. As wide as possible range of properties of each method is included in the user interface, so it is possible to examine all the options and choose the most appropriate one, e.g. different types of filters, wavelets etc. Each processing method has



Martina Ladrova et al. / IFAC PapersOnLine 52-27 (2019) 536–544

539

Fig. 3. Example of the filtration module. its own module (Fig. 3) in the implemented system so that the user can decide during editing the signal if the changes will be saved for the next adjustments or not. The software always shows the graphic representation of the signal to control the changes of the signals during their processing; time waveform and frequency spectrum, eventually spectrogram. All signals edited in one of the modules of processing are saved as the filtered signal in the main window. The processing methods are described in details in the following subsections. a) Digital Filters Frequency-selective filters contain the filters types lowpass, high-pass, band-pass and band-stop or notch depending on which frequencies should be eliminated or passed. The digital filter can be split into two main groups: FIR and IIR filters. These filters were well-established in the analogue domain and thanks to the bilinear transformation, they found the application in the digital domain. Filter IIR requires minimal one feedback loop. Its advantage is a low order of the transfer function, relatively

low delay during the processing of the input sample and low requirements on memory during the calculation of the coefficients. Contrary, the disadvantage may be the problem with stability and a non-linear phase characteristic (Rangayyan, 2015; Bruce, 2001). In the proposed application, three types of IIR filter are implemented: Butterworth filter, which is very often used type of the filter thanks to its simplicity and maximal straight and monotonous frequency response, Chebyshev filter and elliptical filter. Another often-used filter is notch filter, which is popular in the filtering of only one frequency from the signal frequency range (e.g. when removing power line interference) and it behaves as a band-stop filter with just one stop frequency. Conversely, FIR filter is always stable, has no feedback loops, can have linear phase response and high order of the transfer function. Its disadvantage is the lower steepness of the transient band. Three types of filtering windows are implemented: Hamming, Hanning, and Blackman. The special type of the FIR filter is also the moving average

Martina Ladrova et al. / IFAC PapersOnLine 52-27 (2019) 536–544

540

filter, which is also labelled as a filter in time domain and is represented by the window of the certain length moving through the signal (Rangayyan, 2015; Bruce, 2001). The software enables the following options to choose: • Type of the filter approximation (Butterworth, Chebyshev, elliptical) or window (Hamming, Hanning, Blackman), • Type of the filter (low-pass, high-pass, band-stop, band-pass), • Cut-off frequencies, • Filter order (increasing order increases the efficiency of filtration), • Ripple of passband or stopband (Chebyshev and elliptical filters). b) Adaptive Noise Cancellation The ANC method represents a way how to remove a noise which is not stationary, i.e. it changes in time, and which overlaps with the desired signal significantly (e.g., ECG signal of mother and fetus). The spectrum of the signal is then the combination of the same or similar frequency ranges, thus they cannot be separated by fixed filtration. The ANC uses two input signals - the desired signal with a noise x(n) and the reference signal r(n) which is in correlation with noise. The filter modifies the reference so that the signal very similar to the noise y(n) is gained and the output signal e(n) is obtained as its difference with the input signal. The connection of the output and the locked loop of the filter assures the minimal output power and also a small power of the noise in the output signal (Fig. 4) (Rangayyan, 2015). Primary input

+

x(n) = v(n) + m(n) Reference input r(n)

-

Adaptive filter



Output

e(n)

y(n)

also in other cases, because of the extensive selection of the maternal waves, whose shape often responds to their main characters (e.g. QRS complex of ECG) (Abbaspour and Fallah, 2014). The options implemented in the application contain the selection of the type of maternal wavelet (Daubechies, Coiflet, Symlet, Meyer) in their all practicable widths and a level of decomposition, which is very important property of the WT filtering; the low level could remove the insufficient amount of noise but too high decomposition level can distort an original signal and lost the important information, which becomes illegible. d) Empiric Mode Decomposition The EMD is a method of the decomposition of the complex non-stationary signal into the given number of the simpler signals, so-called intrinsic mode functions (IMFs). This process is based on the calculation of the local characteristics of the signal and it is used most often for a detrending. The process of the EMD algorithm is: • Finding the points of all extremes of the given signal x(n), • Interpolating between minimums for creating the low envelope of the signal and between maximums for computing the high envelope of the signal, • Calculating the mean of both envelopes xm (n), • Subtracting the calculated mean, when obtaining modal signal s(n) = x(n) − xm (n), • If s(n) fulfils a condition of IMF, defining c(n) = s(n) and saving IMF; if not, defining x(n) = s(n) and repeating whole process, • The first IMF is calculated, the remaining signal is marked as x(n) − c(n) and the process is repeated (Flandrin et al., 2004). The original signal is the sum of all found IMFs. For the filtering applied, the user selects only several of IMFs which characterize the signal. The noise IMFs can be removed. e) PCA and ICA

Fig. 4. Schema of ANC function. The proposed module for the ANC processing contains a selection of the reference signal, which can be generated directly in the application, such as white noise or power line interference, or loaded from the file when the user can choose the time segment of the desired reference signal (this option simulates the situation of measuring with two sensors - one is the desired signal with the added noise and the second records only the interference). c) Wavelet Transform Due to many limitations of the Fourier transform when used in the processing of the non-stationary signals, the methods of the time-frequency processing are found. The idea of the WT is the suitable changing of the maternal wavelet’s width in time, so to gain the optimal ratio between time and frequency distinguishability. For the lower frequencies, it is recommended to use the narrower maternal wavelet and on the contrary, for the higher frequencies, the wider one. The WT technique is very often used in the processing of the non-stationary signals but

In the field of biological signals, it is very common to measure signals from different sources or multiple channels when some of them cause independent information or redundant data. When analyzing multi-channel measurements, it is necessary to solve the relationship between individual channels, the potential existence of their correlation, presence redundancy and quality of information obtained. It is, therefore, necessary to divide this signal mixture into individual signals components and remove those unwanted ones. There are two methods, one of which deals with PCA and another ICA. The PCA method decomposes the signal into its uncorrelated components when keeping as low as possible number of dimensions. The goal is to find a variable which brings as much as possible useful information. The resulting principal components are sorted in descending order. The ICA algorithm is based on the assumption of the linear combination of independent sources. The basic properties of the ICA method are the confusion of the indexes of separated components (the separated sources are obtained



Martina Ladrova et al. / IFAC PapersOnLine 52-27 (2019) 536–544

541

Fig. 5. Example of the analysis block (peak detector). in the reverse order than of the original sources) and amplitude distortion of the separated signals (Potter and Kinsner, 2001; Rangayyan, 2015). The modules of PCA and ICA processing allow the user to select a number of separated components, and one certain component which will be saved for the further processing or analysis. 2.5 Analysis The last step of the process offered by the application is a signal analysis. The implemented software works with the biological signals most used in diagnostics; electrocardiogram (ECG), electroencephalogram (EEG), electromyogram (EMG), phonocardiogram (PCG) and pulse wave (PPG) which the analyzing blocks are made for, but the processing methods allow editing any one-dimensional data. For each type of the signal was created a different form of the analysis; for the heart monitoring and pulse wave (ECG, PCG, PPG), the peak detector was implemented (Fig. 5). The two algorithms of the peak detector

are used; with the fixed threshold and adaptive threshold. The heart rate, median and standard deviation of the intervals between the obtained peaks are calculated, as the indexes of the heart rate variability, which means a very important part of the diagnostics of heart and also neural diseases (Electrophysiology, 1996). In the case of the brain activity (EEG), the autoregressive model of the fundamental frequency bands (delta, theta, alpha, beta) and the median of the power in these bands are computed. The distinction of bands power is important for the detection of the pathological states of the different parts of the brain. On the contrary, the muscular activity (EMG) is analyzed mainly in the time domain; the envelope of the signal, time segments when the signal does not reach zero and maximum amplitude are computed but also the frequency spectrum is shown, and the maximum signal power is calculated (Rangayyan, 2015).

Martina Ladrova et al. / IFAC PapersOnLine 52-27 (2019) 536–544

542

3. EXPERIMENTS

Amplitude (mV)

a)

1

2

3

Amplitude (mV)

4

f (Hz)

7

8

9

1

2

3

4

5

6

7

8

9

10

6

7

8

9

10

Time(s) Filtered signal

1 0 -1

0

1

2

3

4

5

Time(s)

Fig. 6. Time waveforms of the original, corrupted and filtered ECG signals. Then, the Bland-Altman analysis (Fig. 8) was made for the evaluation of the accuracy of the implemented filtration and following parameters were calculated: accuracy (ACC), sensitivity (SE), positive predictive value (PPV) and harmonic mean of SE and PPV (F1) according to (1)(4). The method proved to be very sufficient for the elimination of the power line interference from the signal according to the calculated parameters reaching values above 99 % and a number of the false negative and false positive values only 37, while a number of true positive values reached 5083. All results of the filtration are summarized in Table 2. ACC =

4

6

-20 -40 -60 -80 -100 -120

8

Time (s) Filtered signal 200 100 0 2

4

6

8

Time (s)

10

0

0

(dB/Hz)

f (Hz)

2

TP TP · 100 = · 100 (%), n TP + FP + FN

(1)

TP · 100 (%), TP + FN

PPV =

F 1 = 2·

2

Amplitude (mV)

6

2

-2

c)

5

-20 -40 -60 -80 -100

0

Time(s) Corrupted signal

4

b)

100

SE = 1

8

200

0 0

6

Time (s) Corrupted signal

0.5

-0.5

4

Fig. 7. Spectrograms of the original, corrupted and filtered ECG signals.

Original signal

1.5

2

(dB/Hz)

The signal before and after filtration can be seen in Fig. 6 and Fig. 7. As spectrograms show, the ANC filtration suppressed power line interference sufficiently, only at the beginning of the signal, there is visible remain of the noise, which can be caused by the delay of the algorithm. The SNR value after filtration reached 21.5 dB and correlation coefficient increased to 0.995.

100 0

f (Hz)

The ECG signal generated from LabVIEW biomedical toolkit was corrupted by power line interference on the frequency of 50 Hz so that the SNR was -10 dB and correlation 0.244. The ANC is a very effective tool for the elimination of power line interference because this noise is quite easy to simulate in the reference signal. After adding a noise, signal is saved and then filtered by ANC with the sinus reference signal and order 1, which offered the best SNR improvement and correlation coefficients.

-20 -40 -60 -80 -100 -120

200

(dB/Hz)

Original signal

For the verification of the application function, several experiments were done. In the paper, as an example, the elimination of the power line interference from ECG signal using ANC filtration is described.

TP · 100 (%), TP + FP

(2) (3)

2 · TP SE · P P V = ·100 (%), (4) SE + P P V 2 · TP + FP + FN

where TP is a number of true positive values (samples in the original signal that are preserved also in the filtered signal), FP is a number of false positive values (samples appeared in the filtered signal but not contained in the original signal) and FN is number of false negative values (samples that would appear in the filtered signal but do not). Table 2. Results of the ANC filtration of ECG signal. SNR improvement (dB) Correlation improvement (-) TP (-) FP (-) FN (-) ACC (%) SE (%) PPV (%) F1 (%)

31.53 0.751 5083 19 18 99.28 99.63 99.65 99.64

If interested in other results of filtering by the implemented system, such as other filtration methods applied for the removing of the power line interference in ECG and EMG signals, see (Ladrova et al., 2019b,a)



Martina Ladrova et al. / IFAC PapersOnLine 52-27 (2019) 536–544

0.6

543

CZ.02.1.01/0.0/0.0/17 049/0008425 within the Operational Programme Research, Development and Education.

0.4

REFERENCES Original - Filtered (mV)

0.2

0

-0.2

-0.4

-0.6

-0.8

-1

-0.2

0

0.2

0.4

0.6

0.8

1

1.2

(Original + Filtered)/2 (mV)

Fig. 8. Bland-Altman graph of the ANC filtration of the ECG signal. 4. CONCLUSION The presented paper proposed an implementation of the modular system in MATLAB for biological signal processing. The proposed software is unique due to the wide range of the processing methods contained in one easyto-use and well-arranged application serving as a tool for the preliminary research and other purposes. The software is modular, which means that all changes in the signal are made separately and also, the researcher can work with every stage of the signal (original, corrupted, filtered) individually. It brings the opportunity to compare different well-known signal processing methods in different cases of signal corruption. The system enables to add some of the implemented kinds of interference to the plain signal, choose an appropriate filtering method and observe an improvement in the power of the noise contained in the signal and the level of the signal distortion. The researcher can then evaluate, which techniques of processing would be suitable for the individual need and which results could the specific method reach. On the other hand, the system can also be used for the signal processing of the realmeasured signals which are corrupted by noise from their origin. The system can serve as the educational tool of the signal processing, when bringing the overview of the most frequently-used processing techniques and their effect on the signals, including its clear graphic representation. ACKNOWLEDGEMENTS This article was supported by the Ministry of Education of the Czech Republic (Project No. SP2019/85 and SP2019/118). This work was supported by the European Regional Development Fund in the Research Centre of Advanced Mechatronic Systems project, project number CZ.02.1.01/0.0/0.0/16 019/0000867 within the Operational Programme Research, Development and Education. This work was supported by the European Regional Development Fund in A Research Platform focused on Industry 4.0 and Robotics in Ostrava project,

S. Abbaspour and A. Fallah. Removing ecg artifact from the surface emg signal using adaptive subtraction technique. Journal of biomedical physics & engineering, 4(1):33, 2014. D. Balasubramaniam and D. Nedumaran. Implementation of ecg signal processing and analysis techniques in digital signal processor based system. In 2009 IEEE International Workshop on Medical Measurements and Applications, pages 60–63. IEEE, 2009. E. N. Bruce. Biomedical signal processing and signal modeling. Wiley New York:, 2001. C. Corradino and M. Bucolo. Automatic preprocessing of eeg signals in long time scale. In 2015 37th Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBC), pages 4110– 4113. IEEE, 2015. N. M. T. Costa et al. Phonocardiogram noise detection in realistic environments. 2012. Electrophysiology. Heart rate variability: standards of measurement, physiological interpretation, and clinical use. Circulation, 93(5):1043–1065, 1996. M. Elgendi. On the analysis of fingertip photoplethysmogram signals. Current cardiology reviews, 8(1):14–25, 2012. P. Flandrin, P. Goncalves, and G. Rilling. Detrending and denoising with empirical mode decompositions. In 2004 12th European Signal Processing Conference, pages 1581–1584. IEEE, 2004. S. K. Jagtap and M. D. Uplane. The impact of digital filtering to ecg analysis: Butterworth filter application. In 2012 International Conference on Communication, Information & Computing Technology (ICCICT), pages 1–6. IEEE, 2012. M. Ladrova, R. Martinek, and R. Jaros. Power line interference elimination in ecg signals. In Journal of Biomimetics, Biomaterials and Biomedical Engineering, volume 41, pages 105–115. Trans Tech Publ, 2019a. M. Ladrova, R. Martinek, J. Nedoma, and M. Fajkus. Methods of power line interference elimination in emg signal. In Journal of Biomimetics, Biomaterials and Biomedical Engineering, volume 40, pages 64–70. Trans Tech Publ, 2019b. C. J. De Luca, M. Kuznetsov, L. D. Gilmore, and S. H. Roy. Inter-electrode spacing of surface emg sensors: reduction of crosstalk contamination during voluntary contractions. Journal of biomechanics, 45(3):555–561, 2012. R. Panda and U. C. Pati. Removal of artifacts from electrocardiogram using digital filter. In 2012 IEEE Students’ Conference on Electrical, Electronics and Computer Science, pages 1–4. IEEE, 2012. B. Pang, M. Liu, X. Zhang, P. Li, Z. Yao, X. Hu, H. Chen, and Q. Gong. Advanced emd method using variance characterization for ppg with motion artifact. In 2016 IEEE Biomedical Circuits and Systems Conference (BioCAS), pages 196–199. IEEE, 2016. M. Potter and W. Kinsner. Competing ica techniques in biomedical signal analysis. In Canadian Conference on Electrical and Computer Engineering 2001. Conference

544

Martina Ladrova et al. / IFAC PapersOnLine 52-27 (2019) 536–544

Proceedings (Cat. No. 01TH8555), volume 2, pages 987– 992. IEEE, 2001. R. M. Rangayyan. Biomedical signal analysis, volume 33. John Wiley & Sons, 2015. M. B. I. Reaz, M. S. Hussain, and F. Mohd-Yasin. Techniques of emg signal analysis: detection, processing, classification and applications. Biological procedures online, 8(1):11, 2006. R. Romo-Vazquez, R. Ranta, V. Louis-Dorr, and D. Maquin. Eeg ocular artefacts and noise removal. In 2007 29th Annual International Conference of the IEEE Engineering in Medicine and Biology Society, pages 5445–5448. IEEE, 2007. S. D. H. Soedirdjo, K. Ullah, and R. Merletti. Power line interference attenuation in multi-channel semg signals: Algorithms and analysis. In 2015 37th Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBC), pages 3823–3826. IEEE, 2015. T. Srikanth, S. A. Napper, and H. Gu. Assessment of resampling methodologies of electrocardiogram signals for feature extraction, statistical and neural networks applications. In Computers in Cardiology 1998. Vol. 25 (Cat. No. 98CH36292), pages 537–540. IEEE, 1998. H. Velez-Perez, R. Romo-Vazquez, R. Ranta, V. LouisDorr, and L. Maillard. Eeg preprocessing for synchronization estimation and epilepsy lateralization. In 2011 Annual International Conference of the IEEE Engineering in Medicine and Biology Society, pages 5028–5031. IEEE, 2011. C. Watford. Understanding ecg filtering. Technical report, visited 2018/04/03. Mar. 2014. eprint: http://www.ems12lead.com/2014/03/10, 2014. E. Yavuz and O. Aydemir. Olfaction recognition by eeg analysis using wavelet transform features. In 2016 International Symposium on INnovations in Intelligent SysTems and Applications (INISTA), pages 1–4. IEEE, 2016.