Application of photoplethysmography signal in diagnosis of cerebrovascular disease and its extraction method based on Wavelet Transform

Effective monitoring of physiological information can effectively control incidence rate and mortality rate for patients with cerebrovascular disease. Among them, near infrared spectroscopy (NIRS) can measure the photoplethysmography (PPG) of cerebral cortex, which provides a new solution for the current detection of cerebrovascular physiological information. There are a lot of characteristic parameters in the pulse wave signal, which can be used to evaluate the cerebrovascular condition. In the time domain, the K value, the main wave width w, the main wave slope k were calculated to evaluate the cerebral vascular sclerosis. And in the frequency domain, the blood pressure of patients can be evaluated by the spectrum amplitude A. Besides, to improve the quality and accuracy of PPG signal parameter calculation, PPG with low noise and distortion is needed to provide support. By analyzing the interference of PPG signal in different frequency bands, the wavelet filtering method is adopted to process the signal. Through the calculation of root mean square error (RMSE) and signal-to-noise ratio (SNR), it is found that this method has excellent extraction effect on PPG signal.


Introduction
Compared with normal people, patients with cerebrovascular disease have more prominent hemodynamic fluctuations and easier blood coagulation, which is of great significance for dynamic detection of cerebrovascular disease. At present, the commonly used clinical cerebrovascular parameter detection methods, such as blood gas index measurement, digital subtraction angiography (DSA), transcranial Doppler (TCD), positron emission tomography (PET), etc., can relatively accurately obtain cerebral hemodynamic parameters, but the operation is complex and even harmful to patients. Therefore, it cannot be widely promoted outside the hospital [1].
NIRS provides a new method for non-invasive real-time detection of cerebrovascular parameters by measuring PPG in different depths of cerebral cortex. We can obtain the light intensity changes and absorbent concentration changes of the head tissue under different near-infrared light sources, and then obtain the cerebrovascular parameters. This detection method is dynamic, real-time, non-invasive. There is no need for expensive equipment to analyse and calculate the measured PPG, which has been widely concerned in the field of cerebrovascular parameter detection.
PPG signal, as a digital signal which can be analysed and contains a lot of physiological information, is an important basis for the study of cerebrovascular physiological conditions. When the vessel is sclerotic, the nature of the vessel wall will change, resulting in the pulse wave reflection in sclerotic vessels is different from that of conventional vessels, which will eventually affect the waveform synthesis. From the perspective of time domain, with the deepening of vascular sclerosis, the tidal wave and repetitive wave of PPG gradually fuse with the main wave, and the width of the main wave changes significantly. At the same time, with the increase of fusion trend, the slope of the main wave before the tidal wave also changes significantly. Similarly, when arteriosclerosis occurs, the resistance caused by the decrease of the elasticity of the vascular wall will affect the resonance in the artery, thus affecting the spectrum distribution of PPG. Therefore, the time-domain and frequency-domain parameters of PPG can well reflect the health status of cerebral vessels.
The PPG signal collected directly contains a lot of noise. So as to analyse the signal better, we need to denoise it. Wavelet de-noising is a de-noising method based on discrete wavelet transform (DWT). It can filter the instantaneous fluctuating signal and make every local change of the signal be reflected, which can be an ideal PPG pre-processing method [2][3].
By providing quantifiable PPG signal parameters and PPG signal extraction methods, it can provide a certain reference for diagnosis, meet the practical needs of cerebrovascular disease detection, and has a certain development prospect and space.

Lambert beerś law
Lambert beer's law is the basis of spectrophotometry and the most basic principle of PPG measurement by photoelectric means. It describes that when a single beam of parallel white light or spectral color light passes through a uniform non scattering absorber at 90 degrees, the absorbance is positively correlated with the thickness of the absorption layer and the concentration of the absorber, and negatively correlated with the transmittance [4]. Thus, where is the absorbance, is the transmittance, is the molar absorptivity, is the concentration of the absorbing substance, and is the thickness of the absorbing layer.

PPG
The pulse wave of brain can be measured by photoelectric means, and the measured result is PPG signal. In view of the spherical structure of the head, the reflection measurement method is often used. The light-emitting device and the receiving device are placed on the same side of the tissue. By emitting near-infrared light near a specific wavelength, when the light is perpendicular to the measured tissue, the pulse tube relaxes and makes the propagation path of the light in the arterial blood flow shorten and lengthen. The receiving sensor on the same side can receive scattered light similar to the "moon type", as shown in Figure 1. The light absorption intensity changes periodically with arterial pulsation, which can be regarded as a periodic variable [7].

Measurement of PPG parameter in time domain
For the time-domain waveform of PPG, the relationship between the wave velocity of PPG and the elasticity of vascular wall can be obtained according to the formula of vascular dilatation.
where is the pressure of blood on the tube wall, is the change of pressure, is the area of the cross section of the pipe wall, and is the change of the cross-section area. The hardening of blood vessels will cause the decrease of value. According to the wave velocity formula of PPG signal, the wave velocity of PPG signal can be expressed by the expansion degree as follows, where is the density of the blood. According to the above formula, the wave velocity is inversely proportional to the degree of vascular dilatation, and the degree of vascular sclerosis is more serious, which will reduce the wave velocity of PPG and cause obvious changes in the shape of some parts of the PPG signal waveform. To evaluate this change in the time domain, the eigenvalue K, the main wave width w, and the main wave slope k related to the waveform area are selected. Three aspects to analyse the relationship between PPG time domain characteristics and cerebrovascular disease.

Wave velocity drop
According to the waveform and area of PPG signal, we can get the change of cerebrovascular state. In order to make this change more intuitive, we calculate the percentage of the average pulse wave pressure in the maximum pulse wave pressure, which is the characteristic quantity K, to quantify the change of waveform area of PPG signal [8][9][10]. K can then be calculated as follows: where, is systolic blood pressure, was diastolic blood pressure, and is the mean value of pulse wave pressure in a PPG period. The physical meaning of K value is shown in the Figure 3. With the increase of age, vascular health declined, vascular resistance increased, pulse waveform gradually presented "steamed bread state", and the characteristic value K was about 0.5. For healthy young adults, vascular elasticity and vascular resistance are moderate, and K value is about 0.35. Athletes and pregnant women K value will also reach below 0.3.
When the degree of arteriosclerosis deepens, the main wave of PPG shows a trend of fusion with other waves, which is reflected in the increase of main wave width w. The main wave width w with the peak value at 75% is the most different in different degree of cerebral arteriosclerosis PPG. If the amplitude of the main wave peak of PPG signal is H, find the nearest sampling point at the amplitude of 0.75H, and make a straight line horizontal to the x-axis, as shown in Figure 4. Thus, In the process of deepening atherosclerosis, the slope of the main wave changes most significantly, especially in a small segment after the peak of the main wave. Since the sampling frequency of PPG signal is 200Hz, the slope of main wave can be calculated by calculating the slope of 20 adjacent points after the peak. The average of the slopes is the slope of main wave K of PPG signal. Thus, where, is the range of slope points, and 20 are selected in this paper. ( ) is the time domain amplitude of the its point.

Measurement of PPG parameter in frequency domain
The most direct way to analyze PPG signal in frequency domain is to get the spectrum of PPG signal. For digital signals, the spectrum can be calculated by the Fast Fourier Transform (FFT) algorithm, as shown in formula 7. The spectrum can reflect the components of the signal in different frequencies. By observing the components of each frequency band, we can judge the patient's cerebral artery health.
where ( ) is a discrete sequence and is a period.
When arteriosclerosis occurs, the frequency domain characteristics of pulse wave will change accordingly. The resistance caused by the decrease of elasticity of vessel wall will affect the resonance in the artery, thus affecting the spectrum distribution of PPG signal. Therefore, the harmonic amplitude of PPG signal is an important reference to reflect the elasticity of arterial wall. Table 1 lists the comparison of harmonic peak values of healthy people and hypertensive people at different ages [11]. It can be seen that the harmonic peak values of healthy people are greater than those of hypertensive people. The harmonic peak values of healthy people are 105 ~ 114 (dB), those of hypertensive people are 90 ~ 105 (dB), and those of severe hypertensive patients are lower, At the same time, different ages will also have a greater impact on the harmonic peak value. The harmonic peak value of the older group is lower than that of the younger group. In addition, the pulse rate parameter can be obtained by frequency domain analysis of PPG signal, which is defined as, = 60 × (8) where is the fundamental frequency of the current signal, corresponding to the frequency of the harmonic peak value.

Design of parameter analysis system
According to the sampling method and data format of PPG and the calculation method of PPG characteristic parameters, design of parameter analysis system was based on Matlab GUI [12][13]. The main functions include PPG signal data transmission, time and frequency domain drawing, signal processing and analysis, etc. the system structure diagram is shown in Figure 5.
• Data transmission: the PPG is imported into the system, and the default format of the PPG used in the system is TXT; • Time and frequency domain rendering: through calling Matlab GUI coordinate axis control, the time domain angle and frequency domain angle of PPG signal are displayed. In order to ensure ease of use, the coordinate axis is set with appropriate step size and size to ensure that the image can be displayed clearly; • Signal processing and analysis: The wavelet filtering method adopted in this paper has the advantages of low RMSE and large SNR, which can process the signal more effectively. Besides, the relevant characteristic parameters of the PPG signal are calculated from the time domain and frequency domain respectively, and the evaluation is given by comparing the calculated value with the reference value Figure 5. The block diagram of parameter analysis system.

Data pre-processing
The collected PPG is directly converted into digital signal by A / D converter. Because there is no analog filtering link in the intermediate process, the digital signal is similar to the original signal. The original PPG signal is seriously interfered by power frequency, breathing, EMG noise and so on, which leads to serious signal distortion [14][15][16]. The frequency of interference signal is shown in Table 2, and the pulse wave is easily submerged in a large amount of noise. It is not difficult to find that the noise of PPG signal has the problems of wide distribution of noise frequency band and serious aliasing of lowfrequency noise signal, and PPG signal mutates in a short time, so it is difficult to filter the characteristic signal effectively by using general hardware threshold filtering [17]. Based on the above analysis of the characteristics of PPG, wavelet de-noising method is proposed to realize the effective extraction of characteristic signal. Wavelet de-noising is a de-noising method based on discrete wavelet transform (DWT). It can filter the instantaneous fluctuating signal and make every local change of the signal be reflected. According to the Mallat algorithm of wavelet de-noising, the process of extracting PPG signal by wavelet can be regarded as a low-pass filter. In the whole process, the wavelet filtering method can largely retain the signal characteristics, filter out high-frequency noise and extract feature signals. The flow chart is shown in Figure 6.  Figure 6. PPG wavelet denoising process.
Matlab was used to pre-process all the PPG data. Wavelet denoising of PPG includes three key factors: wavelet basis, threshold method and decomposition series.
• Wavelet bases: we usually hope that the selected wavelets can satisfy the following characteristics: compactness, symmetry, high vanishing moment, regularity and similarity. However, high vanishing moment and compactness are a pair of contradictory characteristics, which are difficult to satisfy at the same time [18][19]. Therefore, for one-dimensional signal, we usually consider to select compactly supported wavelets, such as dB and symN. For PPG signal, symN wavelet has better advantages in tight support and symmetry, and can avoid distortion caused by phase difference to a certain extent, so it is a better choice for wavelet de-noising [20]. • Threshold function: wavelet coefficients can be corrected by threshold function, which can determine the filtering effect to a great extent. For the physiological signal such as PPG signal which requires high filtering, soft threshold method was used to filter [21]. It is defined as follows, where is the variable and is the threshold.
• Decomposition series: the detail coefficient and approximate coefficient of each order based on DWT adopt dyadic wavelet transform, so that the secondary decomposition coefficient is half of the superior decomposition coefficient. Although the increase of decomposition coefficient may indicate the signal features, it will greatly increase the calculation time, and sometimes amplify the details of the noise. Therefore, the decomposition coefficient should be 6 [22]. Through the above steps, the key factors of wavelet de-noising are selected. The original signal is decomposed into multiple layers by wavelet decomposition. The bottom detail coefficient contains noise, while the top detail coefficient contains the real signal part. Through the thresholding of the bottom detail coefficient, the high-frequency interference that we expect to remove is removed, and the remaining wavelet coefficients are reconstructed, the corresponding filtered signal can be obtained.

Harmonic amplitude extraction of PPG signal
In the frequency domain analysis of PPG signal, in order to make the spectral line clearer and easier to observe, so as to extract each harmonic component, this paper adopts the method of periodic continuation. Pulse wave signal is a kind of periodic signal with certain periodic law. By making the extension times consistent with the number of single cycle waveforms in the acquisition cycle, the spectrum distribution of response periodic signal can be obtained. As shown in Figure 7, the spectrum of PPG is mainly in the low frequency band. In the spectrum distribution map, the corresponding amplitude can be obtained by observing the peak amplitude of the patient. In the spectrum, the peak amplitude of the patient spectrum can be observed, as shown in Figure 8. Among the four points A, B, C and D, only point B is in the frequency band of PPG signal, so this segment is the harmonic of pulse wave.

Results and discussion
The original PPG with the sampling frequency of 200Hz is imported to the wavelet de-noising processing. The filtered signal is shown in Figure 9. According to the spectrum of the reconstructed signal, the high-frequency noise has been filtered to a great extent, and the reconstructed signal reflects the characteristics of pulse wave, which is in line with the experimental purpose.
To evaluate the experimental effect and verify the superiority of this method, the above PPG signals are processed by using conventional Butterworth digital filtering and moving average filtering, and the signal extraction effect is compared with wavelet denoising method. The reconstructed signals and their spectrum of moving average filtering and Butterworth filtering are shown in Figure 10.  It is obvious that the moving average filtering is not enough for the high frequency part, while Butterworth filtering makes the signal distorted.
RMSE and SNR, which can represent the deviation degree between the observed value and the true value, are used to evaluate the filtering effect of PPG signal. The smaller the rsme is, the larger the SNR is, the better the extraction effect of PPG signal is, and the closer it is to the true value.
where is the number of samples, and represents the effective power of signal power and the effective power of noise power.
Butterworth digital filtering, moving average filtering and wavelet filtering are used to analyse the above evaluation indexes of the sampled signals. RMSE and SNR obtained are shown in Table 3. To verify the rationality of the parameters and analyze its application value, three groups of 50 testers in each group were found, in which test group A was normal group, test group B was mild hypertensive patients, and test group C was hypertensive patients. The parameters of each test group were averaged. The results are shown in Table 4. The measured data are close to the reference value range, with little fluctuation, which is consistent with the physical condition of the tester. It can verify the effectiveness of the software to a certain extent, and also verify the value of the characteristic parameters based on PPG for the evaluation of cerebrovascular health.

Conclusion
In order to develop the application of non-invasive real-time detection of cerebrovascular based on NIRS, we combine the time-domain and frequency-domain characteristics of PPG signal with cerebrovascular health status and cerebral hemodynamic characteristic parameters and a series of characteristic parameters that can evaluate cerebrovascular health status are proposed, which makes PPG signal become an important reference to reflect vascular elasticity and blood pressure, and greatly improves the use value of PPG. Since the test results are highly correlated with the actual physical condition of patients, our verification experiments showed a good feasibility. In the processing of the original PPG signal, the digital filtering is mainly used for the noise such as power frequency interference, breathing, heartbeat, etc. In the selection of filtering mode, the wavelet denoising method is used, which not only