Estimation of pulsatile flow and differential pressure based on multi-layer perceptron using an axial flow blood pump

: This study proposes a non-invasive method for estimating the pulsating flow and pressure difference, which uses the blood pump estimation model based on a multi-layer perceptron to calculate the flow and pressure difference under pulsating conditions. The model takes 11 parameters such as the rotational speed, power, and pulsation waveform of the blood pump as the input and uses the pressure difference and flow as the output. The experimental results of 119,590 sample data show that the flow error of the training set of the blood pump estimation model is 0.14 l/min and the pressure difference error is 7.50 mmHg; the flow error of the test set is 0.14 l/min and the pressure difference error is 7.50 mmHg. Compared with the traditional flow and pressure prediction method, this method has higher precision, which will provide a certain technical accumulation for accurately estimating the flow and pressure difference of the blood pump in the pulsating conditions.


Introduction
The treatment of patients with heart failure by implanting a blood pump is the best treatment option in the absence of a cardiac donor. The output flow and pressure are important characteristic parameters of the design and operation of the blood pump. The measurement accuracy and method are directly related to the practical application effect of the blood pump in animal experiments and clinical practice [1,2]. The measurement of blood pump output flow and pressure is divided into direct measurement and indirect measurement, and direct measurement has shortcomings such as implantation difficulty and sensor malfunction. Therefore, many research teams have conducted research on non-invasive flow and pressure difference measurement of the blood pump.
The studies by Funakubo et al. [3] and Ayre et al. [4] have shown using the pump's characteristic curve to estimate the average flow pressure difference of the pump can obtain accurate results under steady-state conditions. Current clinical devices such as HeartMate III have operated by using pulsating flow, and studies have shown that this approach can reduce thrombus formation compared to blood pumps operating under steady-state conditions [5]. However, due to the numerous factors that need to be considered for the estimation of the blood pump flow and pressure difference under pulsating conditions, there are few studies on this aspect. Tsukiya et al. [6] used the power and rotational speed to estimate the dimensionless instantaneous flow. Karantonis et al. [7] used the autoregressive with exogenous input model to accurately estimate the pulsating flow and differential pressure, but they did not consider the different pulsation waveforms that have an influence on estimating the flow and differential pressure.
In this study, a new method for estimating the fluctuating flow and pressure difference of the blood pump using a multi-layer perceptron model is proposed. Firstly, the principle of this method and the selection of related parameters are introduced, and then the proposed method is verified by using an in vitro simulated circulation loop. Finally, to verify the reliability of the method, the estimation error of the traditional method is compared with that of the method in this paper.

Principle of the estimation model
The blood pump converts the input electrical energy into electromagnetic energy, and then the electromagnetic energy drives the impeller to rotate to generate mechanical energy. Finally, the impeller rotates to generate a flow field change to generate hydraulic energy. If we want to know the output flow and pressure difference of the blood pump, we need to establish the relationship between the hydraulic parameters of the output and the input electrical parameters. Also, the neural network can fit arbitrary functions with arbitrary precision. Based on this idea, consider using a multi-layer perceptron to model the experimental data of the blood pump, and obtain the blood pump input parameters and output parameters by training a certain sample. With this model, if the input of the blood pump is given, the flow rate and differential pressure output under pulsating conditions can be obtained.
The multi-layer perceptron consists of an input layer, several hidden layers, and an output layer. The first layer is the input layer, the last layer is the output layer, and the middle layers are the hidden layers. Each layer is composed of nodes. Each node is connected to all nodes in the adjacent layer and the output of a node in the last layer is an input parameter of a node in the next layer. The ultimate training goal of a multi-layer perceptron is to find the optimal combination of connection weights and offsets in the network, which will contribute to accurately derive the relationship between the input vectors and the output vectors. The structure model of the multi-layer perceptron in this paper is shown in Fig. 1. Its input layer is composed of 11 parameters and the output layer is composed of 2 parameters which are flow and differential pressure, and it includes 3 hidden layers.
As described in Fig. 1, the model has five layers. The input layer was recorded as l 1 , the three hidden layers were recorded as where f ⋅ is the activation function, y l j is the output of node j of layer l, and u l j is the input of the node. The formula for u l j is where w l ji is the weight of node i in layer l − 1 to node j in layer l and b l j is the offset of node j in layer l. The commonly used activation functions are sigmoid function, tanh function, rectified linear unit (ReLu) function, swish function etc. In this paper, tanh function and ReLu functions are selected as the activation function, respectively. The mathematical expressions of tanh function and ReLu functions are

Selection of input elements in the estimation model
The flow and pressure difference of blood pump under the pulse condition is affected by many factors. It is important to select the parameters that have an important influence on the flow estimation and differential pressure estimation as the input elements of the multi-layer perceptron. The parameters affecting the flow and pressure difference mainly include input power and rotational speed. When the blood pump operates in a pulsating manner, its power and rotational speed are constantly changing. Therefore, the rotational speed change rate, power change rate, power/rotational speed, power change rate/rotational speed, power change rate/rotational speed change rate of these five parameters are added to the input of the model. At the same time, if we adopt different speed pulsation waveforms, the output of flow and pressure difference is different. The parameters related to the speed pulsation waveform mainly include centre rotation speed, amplitude, period, and waveform [8,9]. In summary, the rotational speed, power, rotational speed change rate, power change rate, power/rotational speed, power change rate/rotational speed, power change rate/rotational speed change rate, centre speed, waveform, amplitude, and period of the 11 parameters are used as input elements of the multilayer perceptron.

Modelling and training of estimation model
The network structure of the model for estimating the flow and pressure difference of the blood pump under pulsating conditions is shown in Table 1. The hidden layers use the dropout layer and the ratio of dropout is 0.5.
In this paper, tensorflow [10,11] and keras are used to build a multi-layer perceptron model for estimating the flow pressure difference. The training set data is used to train the model, and the test set data is used to test the training results. The parameters in the training process are batch_size = 350, epoch = 1000. Adam optimiser is used to optimise the model and its learning rate To measure the rationality of model training, we need to use the loss function to evaluate. In this paper, we use mean-square error (MSE) function as the loss function. The mathematical expression is where Y i is the predicted value of the sample and Y i is the true value of the sample. The larger the function value is, the worse the prediction effect of the model is.

Traditional estimation methods
The traditional method of predicting the flow and pressure difference of the blood pump is mainly to extract the signal characteristics from the blood pump, which include the speed, current, and power of the pump. Then the output flow and pressure difference between the inlet and outlet of the blood pump are estimated. Malagutti et al. [12] proposed a flow and differential pressure estimation model based on power and speed as follows: where Q est is the predicted flow rate, P est is the predicted pressure difference, ω is the rotational speed of the blood pump, p is the input power of the blood pump, and the parameters before ω and p are coefficients of the model. The traditional prediction model is fitted with experimental data under fluctuating conditions. The results are shown in Tables 2 and  3.

Experimental device
The experimental system needs to complete the flow and pressure difference estimation experiment of the axial flow blood pump under the pulsating condition. It needs to implement the real-time collection of experimental data such as speed, input voltage, current, power, output flow, pressure difference. The overall layout of the test bed is shown in Fig. 2. In Fig. 2, 1 is the system blood circulation line; 2 is the constant temperature water bath, which ensures that the circulating blood is always maintained at the normal physiological temperature, avoiding the accuracy of the experimental results such as haemolysis due to temperature; 3 is a damping valve, which is used to simulate different resistance conditions; 4 is the ultrasonic flow sensor, at the same time, the upstream section of the flow meter is guaranteed to be larger than five times the diameter of the straight pipe, and the downstream section is larger than three times the diameter, to measure the circulating flow field of the system accurately; 5 and 6 are high-precision pressure sensors, which use diffused silicon piezoresistive sensors to measure the pressure difference between inlet and outlet; 7 is the exhaust valve; 8 is an axial flow blood pump; 9 is the driving coil; and 10 is the driving circuit board.
The axial flow blood pump model was designed by Central South University in this experiment. It consists of pre-turning vane, impeller, and rear guide vane. The design flow is 5 l/min, pressure difference is 100 mmHg, speed is 8000 r/min, and the material is titanium alloy.

Experimental process
In this experiment, experiments were carried out at three kinds of centre speeds. Two kinds of pulsating waveforms of the square wave and sine wave were selected. The pulsation frequency was 0.5, 1.0, and 2.0 Hz. The experimental group is shown in Table 4. The experiment receives data through the serial port and collects a total of 119,590 sample data, including target speed, actual speed, voltage, current, flow, inlet pressure, and outlet pressure. Through the data processing, the values of the rotational speed change rate, the power change rate, the power/speed, the power change rate/ rotation speed, and the power change rate/the rotational speed change rate are obtained.
The collected 119,590 sample data were divided into training sets and test sets. Sixty per cent of the sample data was divided into training sets, the number of which is 71,754. Forty per cent of the sample data was divided into test sets, the number of which is 47,836. Pandas are used to clean the training set data. The main process is to read the data, randomly scramble the data, process the data into a mean of 1, variance of 1, and store it in the H5 file. The Python language is used to build the multi-layer perceptron model described above, and then the file is imported into the programme. Through the operation of the programme, the operation result and model error of the method will be obtained.

Result and discussion
Based on the training results of the model, the flow and pressure difference estimation experiments were carried out on two kinds of pulsating waveforms of a sine wave and a square wave. The results are shown in Figs. 3 and 4.
Among them, the flow estimation error of the model on the training set is 0.14 l/min, and the pressure difference estimation error is 7.50 mmHg. The flow estimation error of the model on the test set is 0.14 l/min and the differential pressure estimation error is 7.50 mmHg.
Comparing the estimation method of multi-layer perceptron with the traditional one, the results are shown in Table 5.
In this study, a multi-layer perceptron model for pulsatile flow and pressure difference estimation was successfully designed and validated. The model proposed in this paper produced superior results in the experiment, and its error was obviously smaller than that of the traditional estimation method. This shows that the prediction method has high accuracy. The estimation of the sine wave was slightly better than that of the square wave, which may be due to the larger velocity change rate of the square wave under fluctuating conditions. By accurately estimating the pulsatile flow and pressure difference, it is helpful to optimise the closed-loop control system of the pump.

Conclusion
In this paper, a new method of estimating the flow and pressure difference of an axial flow blood pump by using a multi-layer perceptron model was proposed. The feasibility of the method was proved both theoretically and practically, and satisfactory experimental results were obtained. Compared with the traditional estimation method, the model error is smaller and the accuracy is higher. Owing to the limitation of experimental conditions, this method has not been tested on a centrifugal blood pump, and subsequent experiments will be carried out on a centrifugal blood pump using this method.