Blood Glucose Prediction With VMD and LSTM Optimized by Improved Particle Swarm Optimization

The time series of blood glucose concentration in diabetics are time-varying, nonlinear and non-stationary. To improve the accuracy of blood glucose prediction, a short-term blood glucose prediction model (VMD-IPSO-LSTM) combining variational modal decomposition (VDM) and improved Particle swarm optimization optimizing Long short-term memory network (IPSO-LSTM) was proposed. Firstly, the time series of blood glucose concentration of patients was decomposed by using VMD method to obtain the intrinsic modal functions (IMF) of blood glucose components in different frequency bands, so as to reduce the non-stationarity of blood glucose time series. Then a prediction model was established for each blood glucose component IMF by using the long and short time memory network. Since the number of neurons, learning rate and time window length of LSTM are difficult to determine, the improved PSO algorithm is used to optimize these parameters. The optimized LSTM network was used to predict each IMF, and finally the predicted subsequence was superimposed to obtain the final prediction result. The data of 56 patients were selected as experimental data from 451 patients with diabetes mellitus. The experimental results showed that the proposed VMD-IPSO-LSTM model could achieve high prediction accuracy at 30min, 45min and 60min in advance. When predicted 60 minutes in advance, compared with the LSTM, VMD-LSTM and VMD-PSO-LSTM methods, the RMSE of proposed method decreased by 15.565,3.402,1.215 and the MAPE of proposed method decreased by 11.284%,2.024%, 0.834%, and the percentage of predicted values falling into the A zone increased by 23.5%,6.1% and 2.8% in the Clarke error grid, respectively. The improved accuracy of blood glucose prediction and longer prediction time can provide sufficient time for physicians and patients to control blood glucose concentrations and improve the effectiveness of diabetes treatment.


I. INTRODUCTION
According to statistics, there are nearly 34.7 million diabetics in the world [1]. Diabetes has a long course of disease, which is easy to cause damage to the tissues and organs of the whole body, resulting in disease and even death [2], [3]. The artificial pancreas can effectively control and stabilize the blood glucose level of patients, and blood glucose prediction is the key to its improved control performance. However, the time variability, nonlinearity and non-stationarity of the time series of blood glucose concentration in patients greatly affect the accuracy of blood glucose prediction.
The associate editor coordinating the review of this manuscript and approving it for publication was Nuno Garcia .
Domestic and foreign scholars have proposed various blood glucose prediction methods for data-driven models and physiological models. Wang et al. [4] improved the grey prediction model in terms of smoothness, which significantly improved the prediction accuracy of postprandial blood glucose in diabetic patients compared with AR model. Mo et al. [5] used the extreme learning machine and the regular limit learning machine for blood glucose prediction and hypoglycemia alarm. The comprehensive performance of the two machines is quite good in most cases, with good and stable specificity and acceptable sensitivity. Georga et al. [6] first used the random forest (RF) algorithm to rank the candidate feature sets (blood glucose level, insulin dose, dietary intake, physical activity, etc.), and then combined with the regression model to predict blood glucose concentration. Shanthi [7] introduced a classical statistical method, namely the algorithm based on the Autoregressive Integrated Moving Average Model (ARIMA) model, to predict blood glucose within 30 ∼ 60 minutes. Jun Yang et al. [8] improved the ARIMA method and proposed an adaptive order ARIMA method for predicting blood glucose concentration. Daskalaki et al. [9] used the glucose prediction method of machine learning to use the real-time learning of the glucose and insulin information of the recursive neural network (RNN). The model outperformed both an autoregressive (AR) model using glucose information, as well as an AR model with external insulin input (ARX). Bunescu et al. [10] proposed that using support vector regression (SVR) to predict blood glucose, by taking into account daily events, such as insulin pills and diet. Georga et al. [11] proposed a method of combining dietary model, insulin model and exercise model to predict individual blood glucose by SVR method. Mhaskar [12] et al. proposed a deep convolutional neural network (DCNN) method to predict blood glucose, which's performance is better than shallow network.
Recurrent Neural Network (RNN) [13] introduces the concept of timing sequence into the design of Network structure, making the network show stronger adaptability in time series data analysis. Hochreater and Schmidhuber [14] proposed a Long Short-Term Memory (LSTM) model by improving the network unit structure of RNN. By designing the control gate structure, they made up for the problems of RNN, such as gradient disappearance and gradient explosion and the lack of long-term memory ability, make the LSTM network can make full use of the long-distance time sequence information [15].
At present, LSTM neural network has been successfully applied in financial market price prediction [16], traffic flow prediction [17], ocean surface temperature prediction [18] and medical prediction [19]. The prediction method based on LSTM network has also been well applied in the prediction of blood glucose. Qingnan Sun et al. [20] used LSTM network and bidirectional LSTM network to predict the blood glucose concentration sequence, and made a comparative analysis for the prediction results of LSTM and bidirectional LSTM. Aliberti et al. [21] combined the LSTM network with the multi-patient data-driven method to predict the patient's blood glucose concentration, and achieved a good prediction effect.
But because the time series of blood glucose concentration has strong time-varying, which is a typical non-linear and non-stationary series, directly using LSTM to predict blood glucose sequence will affect the prediction accuracy to a certain extent. It is also a difficulty to determine the parameters of LSTM network. The existing research results show that multi-scale decomposition can reduce the influence of non-stationary on the prediction results. Therefore, this paper proposes a blood glucose prediction model based on various mode decomposition and Particle swarm optimization LSTM network (VMD-IPSO-LSTM). Firstly, the time series of blood glucose concentration collected by the continuous glucose monitoring (CGM) were decomposed by VMD, and the intrinsic mode function (IMF) of blood glucose component in different frequency bands was obtained, which can effectively reduce the non-stationary changes of blood glucose concentration in patients. Then, the LSTM prediction model is established for each IMF sequence, and the key parameters of the LSTM model are optimized by the improved particle swarm optimization (IPSO) algorithm of the adaptive learning strategy. The optimization of LSTM network parameters by IPSO method can match the characteristics of IMF sequence with the topological structure of network and improve the prediction accuracy of IMF sequence.
Finally, the IMFs sequence prediction results are superimposed to obtain the final blood glucose prediction, so as to realize the prediction of the patient's future blood glucose concentration. The model in this paper was used to predict the actual data collected from diabetic patients. The experimental results verified the effectiveness of the proposed method and achieved a good prediction effect 60 minutes in advance.

II. VARIATIONAL MODAL DECOMPOSITION(VMD)
The decomposition process of VMD can be understood as the process of finding the optimal solution to the variational problem [22]. This problem can be transformed into the construction and solution of the variational problem, which involves 3 concepts: classic Wiener filtering, Hilbert transform and frequency mixing. Assume that the multi-component signal In Equation (1), phase φ k (t) is a non-decreasing function,that is φ k (t) ≥ 0, A k (t) represents the envelope function. Assuming that the center frequency of each IMF is ω k , when the constraint condition is that the sum of each mode equals to the input signal f , the specific construction steps of VMD are as follows: First perform the Hilbert transform to obtain the analytic signal of u k (t) and calculate the unilateral spectrum, then multiply by e −jω k t to modulate the center band of u k (t) to the corresponding base band Then calculate the L 2 norm of the demodulated signal gradient above, estimate the bandwidth of each modal signal, and obtain the constrained variational problem as: In order to find the optimal solution of the above-mentioned constrained variational problem, a Lagrangian multiplication operator λ(t) and secondary penalty factor α are introduced to VOLUME 8, 2020 transform the constrained problem into an unconstrained variational problem. In the case of ensuring the accuracy of the signal reconstruction, the Lagrangian multiplication operator λ(t) maintains strict constraints. The extended Lagrangian expression is as follows: Finally, the multiplier alternating direction algorithm is used to solve the above problems, and the components and their frequencies are updated continuously. The saddle point of the unconstrained model is obtained in the end, which is the optimal solution of the original problem. All components can be obtained from equation (5) in the frequency domain: In formula (5),û n+1 k (ω),f (ω) andλ(ω) respectively represent the Fourier transform of u n+1 k (t), f (t) and λ(t). u n+1 k (ω) is the result of passing the current remaining amountf (ω)− i =k u i (ω) through the Wiener filter. In the algorithm, the center frequency is re-estimated according to the center of gravity of the power spectrum of each component, and w is updated by Equation (6).
According to the above analysis, the algorithm flow of VMD is as follows: Step 1, initialize {û 1 k }, {ω 1 k },λ 1 and n = 0; Step 2, recursively deduce n ← n + 1, and update u k and ω k ; according to formula (5) and formula (6); Step 3, update λ; Step 4, if where ε is the discrimination accuracy, if ε > 0, stop the iteration, output the results, and get k modal components and their center frequencies; otherwise, return to step 2.

III. LSTM PREDICTION MODEL OPTIMIZED BY IMPROVED PSO A. LONG AND SHORT-TERM MEMORY Network (LSTM)
The difference between RNN and general neural network lies in the different way of neuron connection: the information of general neural network flows in one direction from the input layer to the hidden layer to the output layer, and there is a directional cycle in the information transmission of RNN. RNN is prone to gradient disappearance and gradient explosion [24]. LSTM is a special RNN, which learns long-term dependent information and avoids the problem of gradient disappearance [21]. In the hidden layer neurons of RNN, LSTM adds a structure called memory cell to remember the past information (as shown in Figure 1), and adds three kinds of gates (input gate, forget gate, output gate) to control the use of historical information.
If the input sequence is (x 1 , x 2 , · · · , x T ) and the hidden layer status is (h 1 , h 2 , · · · , h T ), then at time t there are: where i t , f t , o t are input gate, forget gate and output gate respectively; c t is the cell, W f , W i , W C and W o are weights of each layer of network respectively; b f , b i , b c and b o are threshold values of each function respectively; σ (·) and tanh (·) are sigmoid function and tanh function respectively.
The key of LSTM is the cell state C, which keeps the cell state storage at time t, and the cell state storage is adjusted by forget gate f t and input gate i t . The forget gate is for the cell to remember or forget its previous state C t−1 ; the input gate will allow or prevent the input signal from updating the unit state; the output gate is the output of the control unit state C and is transmitted to the next cell. In order to make the LSTM meet the prediction purpose, a linear regression layer needs to be added, that is: where, y t represents the output of the final prediction result; b t is the threshold of the linear regression layer.

B. PRINCIPLE OF PSO
If the potential solution of the optimization problem is regarded as a particle, the particle continuously flies in space, and the position is adjusted according to its own experience and the experience of the best individual in the process of searching for the best position. The particle swarm algorithm first initializes to obtain a set of random solutions, and then iterates and finds the optimal solution by tracking the best particles in the current space. In the multi-dimensional search space, m particles form a group. In the t-th iteration, the position and velocity of the i-th particle are X i,t and V i,t respectively. The particle updates its position and velocity by supervising two optimal solutions. The first is the optimal solution sought by the particle itself, i.e. personal best pbest i , and the other is the optimal solution currently sought by the whole group, i.e. global best gbest t . When searching for these two optimal solutions, particles update their speed and new position according to the following formula: In formula (7)(8), w is the velocity inertia factor; c 1 and c 2 are the learning factors; Rand is the random number between [0,1]; λ is the velocity coefficient, usually λ = 1.

C. IMPROVED PSO
Because the global optimization ability and convergence speed of the basic PSO are limited, the nonlinear variable inertia weight is proposed to improve the performance of PSO. In basic PSO, fixed w will weaken the global optimization ability and slow down the convergence speed of the algorithm. In this paper, w is changed to the following form: In formula (9), w max and w min are the maximum and minimum values of w respectively; t is the current number of iterations; t max is the maximum number of iterations. When t is small, w is close to w max , and w decreases slowly, which guarantees the global optimization ability of the algorithm; with t increasing, w decreases nonlinearly, and the reduction speed increases rapidly, which guarantees the local optimization ability of the algorithm, so that the algorithm can flexibly adjust the global optimization ability and local optimization ability.

D. PROCESS OF IPSO OPTIMIZING LSTM
The CGM time series has strong nonlinearity and nonstationarity. In order to accurately predict blood glucose concentration, this paper builds a prediction model for blood glucose concentration based on VMD and LSTM models. Since the values of some hyper parameters in the LSTM model control the network structure of the model, an improved particle swarm algorithm is used to determine the optimal hyper parameters of the LSTM in order to match the network structure with the characteristics of the glucose concentration data. Firstly, the model takes the number of hidden layer neurons, learning rate and time window size as the optimization objects of the adaptive particle swarm algorithm, and randomly initializes the position information of each particle according to the hyper parameter range; secondly, it builds the LSTM network model according to the corresponding hyper parameter values of the particle positions, and then trains the model using the training data. The specific steps of the IPSO-LSTM proposed are as follows.
Step 1: initialize parameters. The size of population, the number of iterations, the learning factors and the limited interval of location and speed are determined.
Step 2: Initialize the position and velocity of the particles. A population particle X i,O (h 1 , h 2 , ε, n) is randomly generated, where h 1 represents the number of neurons in the first hidden layer, h 2 represents the number of neurons in the second hidden layer, ε represents the learning rate of LSTM, and n represents the size of the time window.
Step 3: determine the evaluation function of particles. Assign the particle X i,O obtained in step 2 to the parameter of LSTM. The data are divided into training samples, validation samples and prediction samples. Input the training samples for neural network training, and after reaching the limit of iteration times, get the output value of the training samples and the output value of the verification samples of the neural network, then the fitness value fit i of the individual X i is defined as: In equation (18): y j t and y k v are the expected output values of training samples and verification samples respectively. Most of the previous studies only use the fitting error of training samples as fitness value. If the neural network is over fitted, the prediction effect of the model is not optimal. The error of validation sample directly reflects the prediction effect of the model. Therefore, the fitness function includes the fitting error of training sample and the validation error of validation sample. In this paper, the training sample error and the verification sample error are given the same weight, i.e. 0.5, and the sum of the two and the weight is used as the fitness function of the model.
Step 4: Calculate the fitness value corresponding to each particle position X i .The personal best and the group best are determined according to the initial particle fitness value, and the best position of each particle is taken as its historical best position.
Step 5: During each iteration, update the particle's own speed and position according to equations (15) and (16) through personal best and global best; calculate the new particle fitness value, and update the individual extreme value and group extreme value of the particle according to the new population particle fitness value.
Step 6: After satisfying the maximum number of iterations of the PSO algorithm, input the prediction data into the LSTM model trained with the optimal particles and output the prediction value.

IV. GLUCOSE PREDICTION MODEL BASED ON VMD-IPSO-LSTM
Because the blood glucose sequence has the characteristics of randomness, strong non-linearity and non-stationary, it is difficult to effectively improve the prediction accuracy of blood glucose concentration by general prediction methods. Based on the processing of non-stationary signals by the method of variational mode decomposition and the optimization of LSTM parameters by the IPSO algorithm, this paper proposes a prediction model of blood glucose concentration based on VMD and IPSO-LSTM. The algorithm flow chart is shown in Figure 2. The blood glucose concentration prediction process based on VMD and IPSO-LSTM is as follows: Step 1: Use CGM to continuously collect blood glucose values of diabetic patients, obtain blood glucose time series, and normalize blood glucose data to [0,1]; for each patient's blood glucose time series, the first 1000 blood glucose values are selected as the training data set, and the rest 500 are used as the test data set; Step 2: Use VMD to decompose the non-linear and nonstationary blood glucose concentration sequence into K relatively stable IMF components (IMF 1 , IMF 2 , . . . , IMF K ); Step 3: IPSO-LSTM prediction model is established. For the IMF i sequence, the LSTM parameters are optimized through the improved particle swarm algorithm, and the optimized LSTM is used to predict IMF i , then obtain the prediction results of each IMF component; Step 4: The final predicted value of blood glucose concentration of patients is the sum of predicted values of various components by IPSO-LSTM model; Step 5: The VMD-IPSO-LSTM prediction value is compared with the actual value and other prediction models, and the accuracy of the proposed method is verified by error index analysis.

V. RESULTS AND ANALYSIS
In the following, we will experimentally analyze the prediction accuracy of the proposed VMD-IPSO-LSTM model. The prediction algorithm is implemented in the Matlab2018a environment, and the IPSO program is written in the Matlab language in combination with the deep learning library in the Matlab2018 neural network toolbox to build the prediction model. The 125-hour CGM data of diabetic patients (1500 values in total) were selected as experimental data, where the first 1000 data were used as the training set and the remaining 500 data were used as the test set. In order to evaluate the performance of the proposed method, we compared the results obtained by the method in this paper with the results obtained by the LSTM method [21], VMD-LSTM method [27] and VMD-PSO-LSTM method. All four algorithms use the same training set and test set.
The experiment was run on a Window computer equipped with an Intel R Core TM i5-7200U CPU clocked at 2.50 GHz and 8,0 GB of physical memory.

A. SOURCE OF BLOOD GLUCOSE DATA
The data for this article comes from the RT_CGM dataset, which is freely available for study [25] (https://public.jaeb.org/ direcnet/stdy/), the sampling frequency of CGM data is 5 minutes. This data set included glucose trends in 451 heterogeneous populations affected by type I diabetes. Patients were of different ethnic origin and gender (45% males and 55% females) and were divided into three different age groups (adults over 25, adolescents aged 15-24 and children aged [8][9][10][11][12][13][14] [21].The blood glucose time series of 56 patients with type I diabetes were selected and tested on the experiments. The blood glucose concentration data is randomly split the resulting data into two sub-sets for training and testing purposes, containing about 70% and 30% of the initial samples, respectively.

B. MODEL PERFORMANCE EVALUATION INDEX
In order to evaluate the performance of the model, the root mean square error(RMAE), mean absolute percent error(MAPE), and Clark error grid analysis(EGA) method [26] were selected as the performance evaluation indexes in this study. The formula for calculating the root mean square error (RMSE) is as follows: The calculation formula of the mean absolute percentage error MAPE is as follows: EGA uses the Cartesian diagram principle to evaluate the accuracy of the blood glucose prediction method based on the probability that the predicted value falls in each region of A, B, C, D, and E.

C. MODEL PARAMETER SETTINGS
In the experiment, VMD was used to decompose the blood glucose sequence into 10 layers. The structure of IPSO-LSTM model is composed of input layer, LSTM layer and output layer. The loss function uses the mean square error. The training times are 1000, the training target is 0.0001, and the network model is built in the framework of MATLAB R2018a. In this model, the number of neurons, the learning rate and the time window size are set as the optimized parameters of the LSTM. At the same time, the number of particles in the particle swarm is set to 30, the maximum number of iterations is 500, the learning factor c 1 = c 2 = 2, the speed inertia factor w = 0.8, and the speed coefficient λ = 1. w max = 0.9 and w min = 0.1 in the improved PSO.

1) VMD DECOMPOSITION OF BLOOD GLUCOSE SEQUENCES
Taking a patient's 125-hour blood glucose time series as an example, VMD decomposition is performed on the patient's blood glucose time series, and the number of decomposition layers is selected as 10. The decomposition results are shown in Figure 3. IMF 1∼IMF 10 are the intrinsic mode function components of VMD.

2) PREDICTED RESULTS
According to the experimental steps of VMD-IPSO-LSTM combination prediction model in Section IV, the blood glucose of diabetic patients is predicted, and the experimental results are compared with LSTM model [21], VMD-LSTM model [27] and VMD-PSO-LSTM model.  In the LSTM prediction model, the number of neurons in the hidden layer is 15, the learning rate is 0.005, and the time window length is 10. In the VMD-LSTM model, the decomposition layer number of VMD is 10, and the parameters of the LSTM network model are the same.
Four models were used to predict blood glucose 30, 45, and 60 minutes in advance, respectively. The comparison of predicted and true values is shown in Figure 4, 5,6 and 7. The red line represents the predicted value, and the blue line represents the true value. Figure 4   model uses the VMD method to separate the components of each frequency band of blood glucose signal, and then uses the network optimized by improved PSO to predict each IMF separately, which reduces the characteristic interference and non-stationarity of patients' blood glucose signal in different scales. At the same time, improved PSO improves the stability of LSTM network and effectively improves the prediction accuracy.
It can be seen from Figure 5 and 7 that the prediction effect of VMD-IPSO-LSTM prediction model and VMD-LSTM prediction model is not significantly different when they predict 30 minutes in advance, but the prediction effect of VMD-IPSO-LSTM model and VMD-LSTM model is significantly different when they predict 45 and 60 minutes in advance. The VMD-IPSO-LSTM prediction model can well fit the patient's blood glucose non-linear variation curve when making predictions 60 minutes in advance, which shows a great advantage compared with VMD-LSTM. This shows that better prediction effect can be obtained by using IPSO to optimize LSTM, and better parameters can be obtained by IPSO in the process of iteration to optimize LSTM. It can be seen from Figure 6 and Figure 7 that, compared with VMD-PSO-LSTM, IPSO-VMd-LSTM has a smaller prediction error. This indicates that better prediction effect can be obtained by optimizing LSTM with IPSO, and better key parameters can be obtained in the process of IPSO optimizing LSTM. By comparing figure 5-7, it can be seen that using PSO and IPSO to optimize LSTM can effectively improve the prediction accuracy of VMD-LSTM method. However, in the prediction 45 minutes and 60 minutes in advance, the VMD-IPSO-LSTM method has significantly higher prediction accuracy than the VMD-PSO-LSTM method, which shows that IPSO algorithm has better global optimization ability, and the prediction accuracy can be further improved after IPSO optimizes LSTM.
The Clarke error grid analysis method was used to test the prediction effect, and the Clarke error grid of the patient's nail 60 minutes in advance was obtained, as shown in Figure 8. The value falling in area A has high accuracy, which means that the predicted value does not deviate from the reference value by more than 20%. The Clarke error grid of 56 patients 60 minutes in advance was analyzed. The experimental results showed that the VMD-IPSO-LSTM blood glucose prediction model achieved a high prediction accuracy, and more than 95% of the prediction values fell in area A.
The error performances of the four prediction models of 56 patients are analyzed 30, 45 and 60 minutes in advance. The results are shown in Table 1. According to the data in Table 1, RMSE and MAPE of VMD-IPSO-LSTM prediction model are smaller than the corresponding values of LSTM model, VMD-LSTM model and VMD-PSO-LSTM model.
Compared with the LSTM method, the RMSE and MAPE of VMD-IPSO-LSTM method decreased by 9.299 and 6.346% respectively, when predicted 30 minutes in advance; the RMSE and MAPE of VMD-IPSO-LSTM method decreased by 13.608 and 8.744% respectively, when predicted 45 minutes in advance; the RMSE and MAPE of VMD-IPSO-LSTM method decreased by 15.565 and 11.284% respectively, when predicted 60 minutes in advance.
Compared with the VMD-LSTM method, the RMSE and MAPE of VMD-IPSO-LSTM method decreased by 2.534 and 0.933% respectively, when predicted 30 minutes in advance; the RMSE and MAPE of VMD-IPSO-LSTM method decreased by 2.858 and 1.793% respectively, when predicted 45 minutes in advance; the RMSE and MAPE of VMD-IPSO-LSTM method decreased by 3.402 and 2.024% respectively, when predicted 60 minutes in advance.
Compared with the VMD-PSO-LSTM method, the RMSE and MAPE of VMD-IPSO-LSTM method decreased by 0.856 and 0.322% respectively, when predicted 30 minutes in advance; the RMSE and MAPE of VMD-IPSO-LSTM method decreased by 1.006 and 0.733% respectively, when predicted 45 minutes in advance; the RMSE and MAPE of VMD-IPSO-LSTM method decreased by 1.215and 0.834% respectively, when predicted 60 minutes in advance.
It can be seen from Figure 4-8 and table 1 that compared with LSTM, VMD-LSTM and VMD-PSO-LSTM model, the blood glucose prediction ability of VMD-IPSO-LSTM model is better improved.

VI. CONCLUSION
The blood glucose prediction model based on clinical data for personalized evaluation of diabetic patients, early warning of hypoglycemia, and regulation of insulin injections has become a research hotspot in the field of diabetes treatment.
In particular, the blood glucose prediction model is the basis of predictive control of the artificial pancreatic system. So it is important to find an accurate blood glucose prediction model. Due to the influence of factors such as equipment and external environment, the blood glucose data collected by the continuous glucose monitoring (CGM) is non-linear and non-stationary, which seriously affects the accuracy of blood glucose prediction.In this study, the VMD decomposition method was used to stabilize the time series of blood glucose values in time-varying, nonlinear and non-stationary diabetes patients. The fluctuation or trend of blood glucose values at different scales in the time series was decomposed step by step to produce a series of blood glucose components with different frequency bands and then predicted respectively. Due to the influence of equipment, external environment and other factors, the blood glucose data collected by CGMs are highly non-linear and non-stationary, which seriously affects the accuracy of blood glucose prediction. The proposed method uses the VMD method to smooth the blood glucose value time series of diabetic patients. The fluctuations or trends in the time series of blood glucose values at different scales are decomposed step by step to produce a series of blood glucose components with different frequency bands, which are then predicted separately. The parameters to be optimized in the prediction process of the LSTM network are large in size, which leads to slow convergence of the algorithm in the optimization process and makes it easy to fall into the phenomenon of local optimization. We proposes to use an improved PSO algorithm to optimize the key parameters of the network and improve the prediction stability of the network. The experimental results show that 1) The combination of LSTM prediction model and VMD decomposition method can effectively improve the accuracy of blood glucose concentration prediction. The VMD method can effectively solve the modal overlap problem of CGM data, reduce the non-stationary characteristics of the original series, and mine the data features in depth.
2) The improved Particle Swarm Optimization (IPSO) has better parameter finding ability, which can effectively solve the problem of difficult selection of learning parameters in LSTM and greatly improve the prediction accuracy of glucose concentration prediction model.
The proposed VMD-IPSO-LSTM short-term blood glucose prediction model can predict blood glucose 30min, 45min, and 60min in advance with better prediction accuracy, and has better prediction ability than the LSTM prediction model, VMD-LSTM prediction model, and VMD-PSO-LSTM prediction model.
Although the method in this paper has some advantages in terms of prediction accuracy and extended glucose prediction time, there are still some limitations. Firstly, in the proposed method, the parameters of LSTM are optimized using an improved Particle Swarm Optimization, which leads to an increase in computation volume and an increase in running time. Short-term glucose prediction run times to be reduced. Therefore, how to integrate the idea of gradient method into the Particle Swarm Optimization, adopt the velocity monitoring strategy to improve the optimization of LSTM parameters and reduce the running time will be an important direction for further research work. In addition, in this paper, we only rely on CGM data for short-term prediction of blood glucose concentration in the future without considering more relevant factors, such as age, gender, liver function, etc. How to combine more physical characteristics to make medium-term and long-term prediction of patients' blood glucose concentration will also be the focus of our future research.