Computers in Biology and Medicine 59 (2015) 142–151

Contents lists available at ScienceDirect

Computers in Biology and Medicine journal homepage: www.elsevier.com/locate/cbm

FPGA-based design and implementation of arterial pulse wave generator using piecewise Gaussian–cosine fitting Lu Wang a, Lisheng Xu b,c,n, Dazhe Zhao c, Yang Yao b, Dan Song b a

College of Information Science and Engineering, Northeastern University, Shenyang City, Liaoning Province, 110819 China Sino-Dutch Biomedical and Information Engineering School, Northeastern University, Shenyang City, Liaoning Province, 110819 China c Key Laboratory of Medical Image Computing (Northeastern University), Ministry of Education, China b

art ic l e i nf o

a b s t r a c t

Article history: Received 8 July 2014 Accepted 9 February 2015

Because arterial pulse waves contain vital information related to the condition of the cardiovascular system, considerable attention has been devoted to the study of pulse waves in recent years. Accurate acquisition is essential to investigate arterial pulse waves. However, at the stage of developing equipment for acquiring and analyzing arterial pulse waves, specific pulse signals may be unavailable for debugging and evaluating the system under development. To produce test signals that reflect specific physiological conditions, in this paper, an arterial pulse wave generator has been designed and implemented using a field programmable gate array (FPGA), which can produce the desired pulse waves according to the feature points set by users. To reconstruct a periodic pulse wave from the given feature points, a method known as piecewise Gaussian–cosine fitting is also proposed in this paper. Using a test database that contains four types of typical pulse waves with each type containing 25 pulse wave signals, the maximum residual error of each sampling point of the fitted pulse wave in comparison with the real pulse wave is within 8%. In addition, the function for adding baseline drift and three types of noises is integrated into the developed system because the baseline occasionally wanders, and noise needs to be added for testing the performance of the designed circuits and the analysis algorithms. The proposed arterial pulse wave generator can be considered as a special signal generator with a simple structure, low cost and compact size, which can also provide flexible solutions for many other related research purposes. & 2015 Elsevier Ltd. All rights reserved.

Keywords: FPGA SOPC Piecewise fitting Pulse wave Signal generator

1. Introduction A large amount of research work has confirmed that human pulse waves are intimately associated with the status of cardiovascular systems. Changes in physiological parameters such as peripheral vascular resistance, vascular wall elasticity and blood viscosity can be reflected on the morphology of pulse waves [1–3]. Pulse waves have been widely studied in many research works for their relationship to the physiology and pathology of cardiovascular systems [4,5]. Because the key to these studies is to make a correct diagnosis from acquired pulse waves accurately, developing high performance pulse wave acquisition equipment and analysis algorithms are important. At the developing stage of these devices, it is usually necessary to input standard testing signals for debugging and evaluation.

n Corresponding author at: Sino-Dutch Biomedical and Information Engineering School, Northeastern University, Shenyang City, Liaoning Province, 110819 China. Tel.: þ 86 24 83683200. E-mail address: [email protected] (L. Xu). URL: http://faculty.neu.edu.cn/bmie/xuls/ (L. Xu).

http://dx.doi.org/10.1016/j.compbiomed.2015.02.005 0010-4825/& 2015 Elsevier Ltd. All rights reserved.

An arbitrary waveform generator (AWG) is a type of electronic test equipment used to generate standard waveforms that can be input into a device for testing and evaluation [6,7]. However, AWGs can only produce predefined signals such as the sine wave, triangular wave, and square wave but cannot produce specific physiological signals corresponding to different physiological and pathological conditions accurately [8]. These user-defined signals still need to be saved or loaded to AWG. In most cases, the arterial pulse signal that represents specific physiological conditions of the human body is needed for developing and testing the diagnosis equipment based on the arterial pulse wave, especially for supporting education or training [9]. A specific physiological signal generator that can produce different types of physiological waveforms as the input test signal has been used for several decades by medical instrumentation servicemen, technicians, and clinical engineers [10]. In 1967, Ivison and Weinman designed electronic simulators to replace the human body as a pulse wave signal source using analog shaping circuits [11,12]. To provide flexible pulse signals, Li et al. designed a pulse signal generator based on C8051 that can generate the pulse signals stored in the generator, and the stored pulse signals can be

L. Wang et al. / Computers in Biology and Medicine 59 (2015) 142–151

updated through the USB interface connected to a computer where several predefined pulse signals were saved [13]. However, these studies lack the flexibility of allowing users to change individual components of the pulse waveform. Currently, factors such as convenient usage and cost consideration call for new methods for safety control, quality assurance and performance evaluation of medical devices. Recently, many programmable electrocardiogram generators, which can be used for the testing, calibration and maintenance of electrocardiograph devices, were designed using mathematical function fitting methods and programmable logic devices [14–17]. It is reported that a real pulse wave can be approximated and decomposed into several Gaussian functions [18,19]. Actually, the parameters of the decomposed Gaussian functions can be deduced from the feature points of the pulse wave such as the crests, troughs, and periods of the pulse wave [5,20–22]. Therefore, it could be better if a user can simply and freely set several feature points through an independent embedded system and let this portable system generate the simulated pulse wave that can meet the user's requirement and approximate the realistic pulse wave with high accuracy [23]. To generate different types of pulse waves according to the feature points set by the user, this paper designed an arterial pulse wave generator using Gaussian and cosine functions as the templates to fit pulse waves. In the proposed generator, users only need to choose or define several feature points and parameters such as the crests, troughs and period of the pulse wave. Actually, a physiological signal may also contain some noise, which is introduced in the acquisition procedure. Therefore, the proposed generator also provides a function for generating noise signals to approximate the noise introduced during acquisition. The proposed generator can produce the pulse wave with specified noise, whose type and signal-to-noise ratio (SNR) can be set by users. Furthermore, to simulate an actual pulse wave more accurately, the amplitude of baseline drifts can also be set by the user and can be added to the pulse wave to mimic the baseline drifts introduced due to the respiration and motion artifacts of the subject. With the improvements of integrated circuit technology in the form of low-cost and high density, field programmable gate arrays (FPGAs) with reduced package sizes have broadened the selection range of microprocessors and digital interfacing solutions. An FPGA is an electronic technology that essentially implements very large-scale custom digital circuits by using software to reconfigure a large integrated array composed of identical configurable logic blocks. The FPGA platform provides an environment for the rapid prototyping of systems for biomedical applications with numerous advantages such as the flexibility to allow a designer to quickly produce a low-cost, modular system and to add some additional features to the system [24,25]. The proposed pulse signal generator is based on the technology of system on a programmable chip (SOPC), and the Altera Cyclone FPGA device EP1C12Q240C8N is selected as the design target. A programmable system with a Nios II processor is set up in this device. Liquid crystal displays (LCD) and touch screens are integrated into the user interface. In addition, the generated digital signal will be converted to an analog output signal as the standardized test signal of the pulse wave. Our work in this study has the following contributions. First, the existing pulse wave generators are limited to specific pulse waveforms saved in memory, while the proposed pulse wave generator is able to generate four types of pulse waveforms whose feature points were set by users. A piecewise Gaussian– cosine fitting method is also proposed to reconstruct a periodic pulse wave from the given feature points. Second, as we know, it is the first time that the pulse wave generator is implemented with a field programmable gate array (FPGA), which has good

143

performance for several aspects such as efficiency, portability, scalability, and re-configurability [26]. The rest of this paper is organized as follows. Section 2 introduces the basic characteristics of pulse waves, the piecewise Gaussian– cosine fitting method and the SOPC technology. Section 3 describes the implementation of this system, including the design of hardware and the implementation of software. Section 4 illustrates the final outputs of the pulse wave generator and the performance of the designed system. Section 5 discusses the advantages and disadvantages of the developed system and presents the concluding remarks.

2. The proposed method In this section, the characteristics of pulse waves are first introduced. Then, the proposed piecewise Gaussian–cosine fitting method is described. After that, the related technologies of SOPC are presented. 2.1. Characteristics of pulse Waves A pulse wave is a result of complex interactions between the left ventricle and the systemic circulation [2,5]. A typical singleperiod pulse wave shown in Fig. 1 usually exhibits an early systolic peak, which is formed due to the ejection of the left ventricular (B in Fig. 1), an incisura-backflow reflected from the arterial branch (C in Fig. 1), and a dicrotic notch that is caused by the closure of the aortic valve (D in Fig. 1) [2,4,5]. A dicrotic wave (DW) is a reflected wave from the recoil of the blood column against the closed aortic valve [27]. The single-period pulse wave in Fig. 1 can be described by four feature points, where A is the starting point of a period of the pulse wave, B is the systolic peak, C refers to the incisura, D is the trough of DW, and E is the peak of the DW. The relative positions of these four feature points reflect specific physiological conditions of cardiovascular systems [4]. In this paper, curve fitting is conducted to simulate four types of pulse waves demonstrated in Fig. 2. When the peripheral vascular resistance becomes higher, the vascular wall elasticity will become smaller. Therefore, the positions of the incisura and the DW will become considerably higher and closer to the systolic peak from the first type to the fourth type of arterial pulse waveforms shown in Fig. 2 [4]. 2.2. Piecewise Gaussian–cosine fitting To model the arterial pulse wave, some researchers have tried to fit a pulse wave with several Gaussian pulses [18–20]. Their findings confirm that the pulse wave is similar to the Gaussian pulse in shape. Unfortunately, these approaches are time consuming. To reconstruct the pulse wave according to its feature points introduced above, a method named piecewise Gaussian–cosine

Fig. 1. The feature points of a pulse wave.

144

L. Wang et al. / Computers in Biology and Medicine 59 (2015) 142–151

At the peaks of the pulse wave, the first-order derivative satisfies the conditions:  ( dðGðxÞÞ=dxx ¼ μ  ¼ 0  ð5Þ dðGðxÞÞ=dxx ¼ μ þ ¼ 0 However, at the troughs of the pulse wave (such as point D in Fig. 1) and the points of inflexion (such as point C in Fig. 1), the Gaussian segment cannot easily gain ideal smoothness. Because the first-order derivative of the cosine wave at nπ is zero and it shows a similar morphology with the pulse wave piece, the cosine curve is chosen to fit these pieces. The function for fitting the pulse wave in Fig. 1 can be defined as: 8 ðx  x1 Þ2 >  > > ðx0 rx ox1 Þ > y1 e 2α1 2 > >   > > y2  y1 y2  y1 ðx  x1 Þ > cos ðx2  x1 Þ π ðx1 rx ox2 Þ y1 þ 2  2 > > > >   < y3  y2 y3  y2 ðx  x2 Þ cos ðx3  x2 Þ π ðx2 rx ox3 Þ ð6Þ P f it ðxÞ ¼ y2 þ 2  2 >   > > > y4  y3 y4  y3 ðx  x3 Þ > y3 þ 2  2 cos ðx4  x3 Þ π ðx3 rx ox4 Þ > > > > > > ðx  x4Þ2 > >  : y4 e 2α5 2 ðx4 rx ox5 Þ

Fig. 2. Four types of pulse waves and their feature points.

fitting is proposed in this paper. This method uses the Gaussian function and cosine function as a template to fit the segment between every two continuous feature points through interception, zooming and transformation [28]. The Gaussian function is given as follows: GðxÞ ¼ he 

ðx  μÞ2 2α2

;

where (x1, y1), (x2, y2), (x3, y3), (x4, y4), and (x5, y5) are the coordinates corresponding to the feature points B, C, D, E, and F, respectively. The parameter α for each piece of the Gaussian pieces is set by analyzing waveforms of different pulse types. Thus, each specific parameter α is calculated automatically for a specific type of pulse wave.

ð1Þ

where h is the amplitude of the peak of the Gaussian pulse, μ is the mean value and x-axis location of the Gaussian pulse peak, and α is the factor that determines the width of a Gaussian pulse. The cosine function is given as follows: CðxÞ ¼ h cos x

ð2Þ

It is notable that for all Gaussian curves, the coordinate of the inflexion (i.e., the point whose second-order derivative is zero) on each shoulder of a Gaussian curve is atx ¼ μ7 α, which is derived from the following equation: " # 2 2 2 d GðxÞ 1  ðx  2μÞ ðx  μÞ 2α ¼ he  ¼0 ð3Þ dx2 α2 α4 When the feature points are given, if we have a general knowledge of an inflexion's relative position to its two adjacent extrema, a proper parameter α for each segment can be set. For example, if the inflexion is at the middle of two continuous feature points (x1, y1) and (x2, y2) on the x-axis, α can be set as (x2  x1)/2. According to the morphologies of different types of pulse waves, the smooth pulse without incisura (Type 1 in Fig. 2) can be divided into four segments. For other types of pulse waves, five segments are needed. To guarantee the continuity of the fitted curve, we require the last point value of the previous segment to be equal to the first point value of the later segment. To further guarantee the smoothness of the fitted curve at the break points, the first-order derivative needs to be studied because when the first-order derivative of a wave is continuous, the wave is smooth. The first-order derivative of the Gaussian function is given as follows:

2

dðGðxÞÞ ðx  μÞ ðx  μÞ ¼  h 2 e  2α2 dx α

ð4Þ

2.3. The technology of SOPC The technology of SOPC provides a solution for the flexible customization of hardware based on a programmable chip. Developers can build their own hardware using languages such as the hardware description language and the C language. In addition, a reusable unit of logic, cell, or chip layout design can be packaged as an intellectual property core (IP core). Altera, a Silicon Valley manufacturer of programmable logic devices (PLDs) and reconfigurable complex digital circuits, provides a large amount of IP cores including the Nios II embedded processor and some compatible interfaces and peripheral device controllers, which can meet nearly all of the requirements for the research and development of a system. The SOPC design procedure includes both hardware design and software implementation. The hardware design is mainly conducted in the development environment, i.e., Quartus II and SOPC Builder, while the software development is based on the Nios II IDE. In the hardware development environment Quartus II, users can build their own chip layout design using hardware description languages (such as Verilog and VHDL) or a schematic diagram. SOPC Builder can automatically connect soft–hardware components to create a complete computer system that runs on various FPGA chips. With the aid of SOPC Builder, developers can build a system based on the Nios II embedded processor, and the software of the system can be developed within the Nios II IDE.

3. Implementation of the proposed system The implementation of the proposed system includes hardware design and software implementation. The whole system is developed on the Quartus II and Nios II IDE development platforms, and the related modules are illustrated in Fig. 3.

L. Wang et al. / Computers in Biology and Medicine 59 (2015) 142–151

Power Module

Flash Module

Pulse Wave Feature Points Setting Module Noise Type & SNR Setting Module Pulse Wave Type Selection Module Gaussian-Cosine Fitting Module Baseline Drift Setting Module Software

LCD Module Nios II Central

Touch Screen Module

Module SDRAM Module D/A Converter Module Pulse Wave Output Hardware

Fig. 3. Modules of the proposed pulse wave generator.

3.1. Hardware design In this paper, the Altera Cyclone FPGA device EP1C12Q240C8N is selected as the design target, and the design is conducted on a development board produced by R&C, Inc. [29,30]. The hardware design contains five main modules, namely, the LCD controller, touch screen controller, D/A converter (DAC), A/D converter (ADC) and power controller. 3.1.1. The SOPC on FPGA The programmable system is developed based on several IP cores offered by Altera. An LCD controller IP is designed separately based on hardware logic and is imported into the system as a lower layer design. 3.1.2. LCD display and control module A TFT-LCD produced by Sharp Inc. (LQ080V3DG01) is selected as the monitor because of its low price and high reliability. An LCD controller is designed on an FPGA according to the timing described in its datasheet [31]. The IP core for the LCD controller generates the timing of the LCD display using a phase locked loop (PLL), and SDRAM is used as the display memory of the LCD by integrating an SDRAM controller in the LCD IP core. 3.1.3. Touch screen module In this design, a resistive film touch screen is selected, and the corresponding controller is ADS7843 [32]. The digital interface of ADS7843 is connected with the general FPGA IOs that provide the working timing for ADS7843. A measurement of the current Y position of the pointing device is made by connecting the Xþ input to the ADC, by turning on the Y þ and Y– drivers, and by digitizing the voltage on Xþ [32]. The location of X can also be obtained in the same way. ADS7843 supports two reference voltage input modes: one mode is the single-ended reference mode, and the other mode is the differential mode. In this paper, the differential mode is chosen because it can eliminate the voltage drop impact during switch conduction.

3.1.4. D/A converting module and power module To output an analog pulse wave signal that meets the user's requirement, a D/A converter named DAC7513 is selected [33]. The CPU communicates with the DAC through the SPI interface. The

145

sampling rate of the pulse waves in this database is 1 KHz. DAC7513 is a low-power, single, 12-bit buffered voltage output digital-to-analog converter. The current limitation, voltage range and output impedance is 50 mA, 0–5 V and 1 Ω, respectively. Different circuitries of this proposed system demands three voltages: þ12 V, þ5 V, and þ3.3 V. The chip LM2940CT-5.0 was selected to transfer 12 V to 5 V for providing power to the LCD screen, and the chip LM1085IT-3.3 was selected to transfer 5 V to 3.3 V for providing power to the A/D and D/A converters ADS7843 and DAC7513. The reference voltage input is 3.3 V. 3.2. Software implementation based on Nios II processor The software of the proposed arterial pulse waveform generator is developed in the Nios II IDE on which all software development tasks of the design were implemented. Nios II IDE provides the software drivers with all of the IP cores supplied by Altera. The developer can visit the registers of the IP cores by including a system hardware library in the programs, to manipulate the peripheral hardware. The software mainly contains the following components: 1) 2) 3) 4) 5)

the algorithm of the Gaussian piecewise fitting method; generating three types of noises; obtaining user command from the touch screen; displaying the generated pulse wave; user's manipulation on the DAC.

The whole procedure of the software is demonstrated in Fig. 4. The generator provides four interfaces, which are marked with the corresponding numbers. The functions of the four interfaces are as follows: 1) the module for selecting the pulse wave type: four typical pulse wave types illustrated in Fig. 2 can be selected; 2) the module for adding noise and baseline drift: three types of noise can be selected, i.e., white Gaussian noise, 50-Hz power line noise and uniform white noise; the user can include noise or baseline drift, set the SNR of the output pulse wave, change the amplitude of baseline drifts, and start or stop the D/A conversion; 3) the module for setting the feature points of the output pulse wave: each of the four types of pulse waves has five or six feature points, as demonstrated in Fig. 2; users can use the default setting or change the feature point's coordinate by touching the initial point position and then dragging it to the expected position; 4) the module of Gaussian–cosine fitting method: with the selected type of pulse wave and the specified feature points, the pulse wave will be generated by using the proposed Gaussian–cosine method.

3.2.1. Correction and elimination of jitters for the touch screen The operation conducted on the analog resistive film touch screen is measured by the digital output of an A/D converter of the x-channel and the y-channel. To map the digital output of an A/D converter onto pixel coordinates of an LCD, 4-points correction is conducted in the software to obtain the minimum and maximum A/D converted values of the x-channel and the y-channel. As shown in Fig. 5, four points A, B, C, and D are drawn on the LCD screen to define the screen coordinate for displaying the pulse wave signal. Touching this screen will generate four pairs of D/A converter outputs, namely, (Vax, Vay), (Vbx, Vby), (Vcx, Vcy), and (Vdx, Vdy). With these four pairs of values, any point that is

146

L. Wang et al. / Computers in Biology and Medicine 59 (2015) 142–151

Fig. 4. The flowchart of the proposed software. (a) Software for initialization; (b) software for user interface.

3.2.2. Generation of noises In the acquisition procedure, noise can be unavoidably introduced. Therefore, it is important to design a filter when pulse wave acquisition and analysis equipment is being designed. To facilitate the evaluation of the acquisition/analysis system's performance on de-noising, signals with noise need to be generated. In our design, three types of noise can be added, i.e., 1) white Gaussian noise; 2) 50-Hz power line noise; 3) uniform distributed white noise.

Fig. 5. Analog resistive film touch screen.

touched can be mapped into the LCD pixel coordinate according to the following equation: 8   V x  ðVax þ2 VbxÞ LCD_W > > > < x ¼ ðVcx þ VdxÞ  ðVax þ VbxÞ 2  2 > V y  ðV ay þ2 VdyÞ LCD_H > > y ¼ ðVby þ VcyÞ ðVay þ VdyÞ : 2



ð7Þ

2

where LCD_W and LCD_H are the width and height of the LCD, respectively. Due to the existence of a disturbance during the touch of the screen, this paper takes advantage of software counting to eliminate jitters. When a user has touched the screen, the corresponding coordinates will be calculated and saved. When the user clicks the screen again, the corresponding coordinates will be calculated and saved as well. Then, the coordinates of the two clicks will be compared. If the difference is less than five pixels, the average of the coordinate values will be regarded as the inputs.

Generally, noise is measured by the index of SNR, which is calculated by 0 L 1 2 P  SðiÞ  μs  C B B 1 C SNR ¼ 10 log B i ¼ ð8Þ C L  2 A @P N ðiÞ  μn  i¼1

where L is the length of the signal and noise and S and N are the signal and noise, respectively. μs and μn are the mean value of the signal and noise, respectively. With the noise type and the SNR value specified by a user, the amplitude of noise will be calculated according to the amplitude of the pulse wave. Then, the pulse wave with the required noise level can be generated. The 50-Hz power line noise is modeled with a 50-Hz sine function. A random signal could be considered white noise if it has a flat spectrum over the widest possible bandwidth. In this paper, the rand() function defined in the C library “stdlib” was employed to generate a uniformly distributed white noise. For the generation of white Gaussian noise, Box and Muller proposed a method to

L. Wang et al. / Computers in Biology and Medicine 59 (2015) 142–151

> :

y ¼ 2πvarB

Derivative of a real pulse wave Derivative of the fitted curve

First-order derivative

generate a normal distributed sequence with two independent random variables from the same rectangular density function on the interval [0, 1] in [34]. Because white Gaussian noise has a constant spectral density and a Gaussian distribution of amplitude, the process of generating white Gaussian noise consists of two steps. First, two random signals varA and varB on interval (0, 1) were generated using the function rand(). Second, a white Gaussian noise sequence with a mean value of zero and a standard deviation of one was generated by formula (9) [34], where x and y are the intermediate variables and z is the Gaussian noise. pffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi 8 > < x ¼ 2 log ð1:0=ð1  varAÞÞ

0

100

ð9Þ

z ¼ x cos ðyÞ

3.2.3. Generation of baseline drift introduced by respiration and motion artifacts of the subject In the acquisition procedure, the respiration and body motion artifacts of the subject might be introduced [35,36]. Therefore, to simulate the realistic conditions, the pulse waveforms with baseline drifts at different amplitudes can be generated if users need them. The respiration and body motion artifacts are generated as described in [36] according to the pulse rate specified by the user.

4. Results and discussions Having finished the implementation of this system, the performance of the piecewise Gaussian–cosine fitting method and the quality of the analog output are evaluated and discussed in this section. 4.1. Performance of piecewise Gaussian–cosine fitting The pulse waves for evaluating the proposed piecewise Gaussian–cosine fitting method were collected by a pressure detector on the left index finger of volunteers in a sitting position under controlled environmental conditions [5]. Four data sets, which represent four types of pulse waves, are selected from them on which the performance of the piecewise Gaussian–cosine fitting method is tested. Then, the performance is evaluated by calculating the residual of each sampling point. In this paper, we take one single-period of pulse wave and then copy this single-period of pulse wave to form an ideal pulse wave to estimate the performance of our fitting method. Usually, we acquire the pulse wave of a subject for more than 3 min each time. We select the more stable period of pulse wave for analysis. After taking out a single-period pulse wave, we detect its peaks and troughs by finding the zero crossing points of the first-order derivative and the incisuras by finding the zero-crossing points of the second-order derivative. Then, the fitted curve is calculated according to Eq. (3). The smoothness can be verified by calculating the first derivative, as shown in Fig. 6. Because the derivative is continuous, the fitted curve is smooth, which agrees with the characteristics of physiological signals. A total of 100 pulse wave signals (25 pulse wave signals for each type) are processed and fitted by the piecewise Gaussian– cosine fitting method. Several typical results for fitting different types are shown in Fig. 7. In most cases, the residuals between the original pulse wave and the fitting curve are within 8%. Furthermore, the residuals are smaller than 3% except for the starting and ending pieces. At the ascending and descending parts of the pulse wave, the fitting result is not quite satisfactory, which results in relatively high residual errors.

147

200

300

400

500

600

Time(ms) Fig. 6. The first-order derivative of a single-period pulse wave and its fitting curve.

The reasons for degraded performance using the piecewise Gaussian–cosine fitting method at the starting and ending segments of the pulse wave signal are as follows: 1) The starting and ending segments of a pulse wave usually last a relatively long period, and a small wave may exist due to small changes in the cardiovascular system. These changes are hardly described by their feature points. 2) For certain parts of a pulse wave, the concavity of the pulse wave is opposite to the Gaussian curve. In this case, one more fitting point on the inflexion is needed at the ending segments, which should be obtained by further refining the pulse wave classification and then adding a fitting point to this type of pulse wave. In this paper, the normalized root mean square error (NRMSE) is calculated to evaluate the accuracy of the piecewise Gaussian– cosine model and is used to compare the fitted results with the original results as illustrated in the following equation: vffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi u N 2 ^ u X ½PulseðnÞ  PulseðnÞ NRMSE ¼ u  100% ð10Þ u N P tn ¼ 1 PulseðnÞ2 n¼1

Fig. 8 shows the statistical results of fitting 100 pulse waveforms. It is notable that the pulse waveforms generated by the piecewise Gaussian–cosine fitting models are satisfactory on the whole. 4.2. Evaluation of analog output By comparing the errors in amplitude (mV) and time scale (ms) between the expected output set by users and the real output measured by an oscilloscope, the performance of the proposed generator can be evaluated. Analog output signals of the pulse wave generator were sent to an oscilloscope (Tektronix TDS1012BSC) for evaluation. The required range of the output is between 9.7 and 3000 mV. The period of the output pulse wave is set to 850 ms. One generated pulse wave displayed in the proposed system is shown in Fig. 9, and the analog output measured and displayed by the oscilloscope is shown in Fig. 10. Each grid on the y-axis represents 500 mV, and each grid on the x-axis represents 250 ms. By calculating the difference between the required output set by the user and the real output measured by an oscilloscope, the errors are less than 8%. The noise that exists in Fig. 10 is not the noise of the analog output but is due to the inherent noise of the oscilloscope, whose amplitude is above 2 mV. The Type-1 pulse waves with three types of noise at an SNR of 30 dB are demonstrated in Fig. 10(b), (c) and (d), respectively. Fig. 11(b) shows the result of Fig. 11(a) by adding the baseline drift on the clean pulse wave. Fig. 12(a)–(c) demonstrate the pulse wave outputs of Type-2, Type-3 and Type-4, respectively.

L. Wang et al. / Computers in Biology and Medicine 59 (2015) 142–151

1.0

1.0

0.8

0.8

Amplitude

Amplitude

148

0.6 0.4

Real pulse wave Fitted pulse wave

0.2

300

400

500

600

0.03 0

0

100

200

300

Real pulse wave Fitted pulse wave

400

500

600

0 Residuals

Residuals

200

0.4 0.2

0 100

0.6

0.1 0.05 0

0

100

200

300

100

200

300

Time(ms)

0.8

700

400

500

600

700

800

0.8 Amplitude

Amplitude

600

1.0

Real pulse wave Fitted pulse wave

0.6 0.4 0.2

0.6 0.4

Real pulse wave Fitted pulse wave

0.2

0 200

300

400

500

600

700

0

800 Residuals

100 Residuals

500

Time(ms)

1.0

0.1 0.05 0

400

0

100

200

300

400 Time(ms)

500

600

700

800

100

200

300

400

500

600

700

100

200

300

400

500

600

700

0.1 0.05 0

0

Time(ms)

Fig. 7. Different pulses fitted by the piecewise Gaussian–cosine fitting method and their residuals. (a) Type-1 pulse fitted by the piecewise Gaussian–cosine fitting method and its residuals. (b) Type-2 pulse fitted by the piecewise Gaussian–cosine fitting method and its residuals. (c) Type-3 pulse fitted by the piecewise Gaussian–cosine fitting method and its residuals. (d) Type-4 pulse fitted by the piecewise Gaussian–cosine fitting method and its residuals.

Fig. 8. Box plot of the piecewise Gaussian–cosine fitting model's Max residuals and NRMSE in percentage for 100 data sets (25 data sets for each type). Numbers on x-axis and y-axis represent pulse wave types and percentage, respectively. (a)Maximum residuals; (b)NRMSE.

Fig. 9. The interface for selecting the type of pulse, adjusting the feature points, adding noise and baseline drift for the output analog pulse wave.

L. Wang et al. / Computers in Biology and Medicine 59 (2015) 142–151

149

Fig. 11. The Type-1 pulse wave outputs shown in an oscilloscope. (a) The DAC output result of continuous Type-1 pulse waves without noise and baseline drift. (b) The DAC output result with baseline drifts shown in an oscilloscope.

pulse wave is within 8%, and the RMSE is less than 0.8% in amplitude. Furthermore, all of the residual errors of the features points are less than 1% in amplitude and less than 3 ms in time scale. Thus, this proposed generator is effective in reconstructing the pulse wave according to the feature points set by users for evaluating and debugging the pulse wave acquisition and analysis system.

5. Conclusions

Fig. 10. Single-period Type-1 pulse wave outputs shown in an oscilloscope. (a) The DAC output result shown in an oscilloscope without noise. (b) The DAC output result with 50-Hz power line noise shown in an oscilloscope (SNR¼ 30 dB). (c) The DAC output result with Gaussian white noise shown in an oscilloscope (SNR¼ 30 dB). (d) The DAC output result with uniformly distributed white noise shown in an oscilloscope (SNR ¼30 dB).

Using a database of 100 real pulse wave signals, the maximum residual error of each sampling point of the output pulse wave acquired by a digital oscilloscope in comparison with the real

To design an arterial pulse wave generator that can produce different types of pulse waves based on the feature points set by users for debugging and testing various pulse wave monitoring or analysis systems instead of acquiring a real pulse wave through pulse sensors, in this paper, a pulse wave generator system based on an FPGA is designed and implemented. Furthermore, a method to realize pulse wave fitting, namely, the piecewise Gaussian– cosine fitting method, is proposed. Using the proposed system, simulated pulse waves with different types of baseline drifts and SNRs can be produced without using any pulse sensors. The proposed generator has a simple structure and compact size. The integrated touch screen and LCD provide a convenient user interface and prompt response. Because the fitting method does not need any optimization, the computational time is less than one second, and the size area of the proposed system is 110 mm  80 mm, which is slightly larger than the touch screen. The pulse wave generator can generate relatively accurate and controllable real-condition human body pulse waves, which is of great practical significance for research on pulse wave and cardiovascular systems.

150

L. Wang et al. / Computers in Biology and Medicine 59 (2015) 142–151

the pulse wave monitor and analysis systems and for training hospital personnel.

Conflict of interest We certify that there is no conflict of interest with any financial organization regarding the material discussed in the following manuscript.

Acknowedgements This work was supported by the National Natural Science Foundation of China (Grant nos. 61374015 and 61202258), the Ph.D. Programs Foundation of the Ministry of Education of China (No.20110042120037), the Liaoning Provincial Natural Science Foundation of China (No. 201102067), and the Fundamental Research Funds for the Central Universities (nos. N110219001 and N130404016). References

Fig. 12. Three other types of pulse wave outputs shown in an oscilloscope. (a) The Type-2 pulse wave output shown in an oscilloscope. (b) The Type-3 pulse wave output shown in an oscilloscope. (c) The Type-4 pulse wave output shown in an oscilloscope.

The piecewise Gaussian–cosine fitting method can restore the pulse wave according to its feature points and gain a smooth fitting. The accuracy of fitting at the start and end part of the pulse wave needs to be improved in the future. However, because this method can produce diverse pulse waves based on only five or six feature points, the feasibility of the proposed pulse wave generator increases. In the future, additional types of pulse waves still need to be studied and generated. This paper reports the design and implementation of a precision pulse signal generator for testing and calibrating the pulse wave monitor and analysis devices and the pulse signal processing systems and provides a cardiovascular teaching tool. The signal generator outputs a precision differential signal via a digital-toanalog stage, which has been designed using low noise techniques to produce accurate signals. The results demonstrated that this tester, due to its simplicity in construction and easiness of use, could be a practical, reliable and economical solution for testing

[1] W.B. Murray, P.A. Foster, The peripheral pulse wave: information overlook, J. Clin. Monit. 12 (1996) 365–377. http://dx.doi.org/10.1007/BF02077634. [2] W.W. Nichols, M.F. O'Rourke, C. Vlachopoulos (Eds.), McDonald's Blood Flow in Arteries, in: Theoretical, Experimental and Clinical Principles, sixth ed., Hodder Arnold, London, 2011. [3] S.C. Millasseau, R.P. Kelly, J.M. Ritter, P.J. Chowienczyk, Determination of agerelated increases in large artery stiffness by digital pulse contour analysis, Clin. Sci. 103 (4) (2002) 371–377. [4] Z.C. Luo, S. Zhang, Y.M. Yang, Engineering Analysis for Pulse Wave and Its Applications in Clinical Practice, Science Publishing House, Beijing (2006) 8–31. [5] L. Wang, L.S. Xu, S.T. Feng, et al., Multi-Gaussian fitting for pulse waveform using weighted least squares and multi-criteria decision making method, Comput. Biol. Med. 43 (11) (2013) 1661–1672. [6] D.D. Caviglia, A.D. Gloria, G. Donzellini, et al., Design and construction of an arbitrary waveform generator, IEEE Trans. Instrum. Meas. 32 (3) (1983) 398–403. [7] W.B. Hu, C.L. Lee, X.A. Wang, Arbitrary waveform generator based on direct digital frequency synthesizer, in: Proceedings of the 4th IEEE International Symposium on Electronic Design, Test & Application, 2008, pp. 567–570. [8] Y.L. Wang, S. Zhang, Y.M. Yang, et al., Study of pulse wave signal generator, in: Proceedings of the 2nd IEEE International Conference on Bioinformatics and Biomedical Engineering, 16–18 May 2008, pp. 1621–1623. [9] U. Rubins, A. Grabovskis, J. Grube, et al., Photoplethysmography analysis of artery properties in patients with cardio vascular disease, in: Proceedings of NBC, Springer Verlag, 20, 2008,19–22. [10] N. Kontodimopoulos, N. Pallikarakis, I. Christov, et al., In-house development of test equipment for quality control and training. Case study: a prototype ECG simulator-tester, Med. Eng. Phys. 20 (1998) 717–721. [11] J.M. Ivison, O.J. Wheaton, An arterial pulse wave simulator, Med. Biol. Eng. 5 (1967) 513–518. [12] J. Weinman, D. Sapoznikov, Electrical simulation of arterial pulse waves an aid to continuous pulse wave velocity measurements, Med. Biol. Eng. 8 (1970) 25–35. [13] Y. Li, S. Zhang, M.R. Peng, et al., Design of monitoring system of pulse wave signal generator based on C8051F020, China Med. Equip. 8 (no. 11) (2011) 8–14. [14] J.R. Chang Chien, Design of a programmable electrocardiogram generator using a microcontroller and the CPLD technology, in: Proceedings of the 33rd Annual Conference of the IEEE Industrial Electronics Society (IECON), Taipei, November 2007. [15] M.J. Burke, M. Nasor, An accurate programmable ECG simulator, J. Med. Eng. Tech. 25 (2001) 97–102 June. [16] C. Caner, M. Engin, E.Z. Engin, The programmable ECG simulator, J. Med. Syst. 32 (2008) 355–359. [17] M. Marsousi, J. Alirezaie, K. Umapathy, A flexible approach for simulating physiological signals, Physiol. Meas. 34 (2013) 695–712. [18] L.S. Xu, S.T. Feng, Y. Zhong, et al., Multi-Gaussian fitting for digital volume pulse using weighted least squares method, in: Proceedings of the IEEE International Conference on Information Automation, 6–8 June, 2011, pp. 52–57. [19] U. Rubins, Finger and ear photoplethysmogram waveform analysis by fitting with Gaussians, Med. Biol. Eng. Comput. 46 (12) (2008) 1271–1276. [20] S.C. Millasseaua, J.M. Rittera, K. Takazawab, et al., Contour analysis of the photoplethysmographic pulse measured at the finger, J. Hypertens. 24 (2006) 1449–1456.

L. Wang et al. / Computers in Biology and Medicine 59 (2015) 142–151

[21] M. Huotari, K. Maatta, J. Kostamovaara, Radial artery pulse wave measurement by photoplethysmograpy and compound pulse wave decomposition, in: Proceedings of the 12th Biennial Baltic Electronics Conference (BEC2010), Tallinn, Estonia, 4–6 October, 2010, pp. 281–282. [22] M. Aboy, J. McNames, T. Thong, et al., An automatic beat detection algorithm for pressure signals, IEEE Trans. Biol. Med. Eng. 52 (10) (2005) 1662–1670. [23] M.C. Baruch, D.E.R. Warburton, S.S.D. Bredin, et al., Pulse decomposition analysis of the digital arterial pulse during hemorrhage simulation, EPJ Nonlinear Biomed. Phys. 5 (1) (2011). [24] M. Cvikl, A. Zemva, FPGA-oriented HW/SW implementation of ECG beat detection and classification algorithm, Digit. Signal Process. 20 (2010) 238–248. [25] D.P. Morales, A. García, E. Castillo, et al., Flexible ECG acquisition system based on analog and digital reconfigurable devices, Sens. Actuators A: Phys. A165 (2011) 261–270. [26] E. Monmasson, M.N. Cirstea, FPGA design methodology for industrial control systems—a review, IEEE Trans. Ind. Electron. 54 (4) (2007) 1824–1842. [27] S.A.A.P. Hoeksel, J.R.C. Jansen, J.A. Blom, et al., Detection of dicrotic notch in arterial pressure signals, J. Clin. Monit. 13 (1997) 309–316.

151

[28] L.S. Xu, D. Song, J.L. Chen, et al., The implementation of pulse wave signal generator based on piecewise Gaussian–cosine fitting, in: Proceedings of the IEEE International Conference on Information and Automation, 06.08.2012, Shenyang China, 2012, pp. 674–679. [29] 〈http://www.altera.com〉. [30] 〈http://www.r8c.com/english/〉. [31] Sharp, Liquid Crystal Displays Group LQ080V3DG01 TFT-LCD Module, July 28, 2003. [32] Texas Instruments, Touch Screen Controller ADS7843 Data Sheet, 2000. [33] Texas Instruments, Low-Power, Rail-to-Rail Output, 12-Bit Serial Input Digitalto-analog Convert DAC7513, 2000. [34] G.E.P. Box, M.E. Muller, A note on the generation of random normal deviates, Ann. Math. Stat. 29 (2) (1958) 610–611. [35] B.W. Schaaf, P.H. Abbrecht, Digital computer simulation of human systemic arterial pulse wave transmission: a nonlinear model, J. Biomech. 5 (1972) 345–364. [36] L.S. Xu, D. Zhang, K.Q. Wang, et al., Baseline wander correction in pulse waveforms using wavelet-based cascaded adaptive filter, Comput. Biol. Med. 37 (5) (2007) 716–731.

FPGA-based design and implementation of arterial pulse wave generator using piecewise Gaussian-cosine fitting.

Because arterial pulse waves contain vital information related to the condition of the cardiovascular system, considerable attention has been devoted ...
4MB Sizes 0 Downloads 8 Views