Intracranial pressure data processing algorithm based on improved wavelet neural network

Through the improved wavelet neural network algorithm, the problem of signal drifting of intracranial pressure monitoring sensors during temperature changes is solved, and more accurate intracranial pressure monitoring and real-time early warning is achieved, which improves the reliability of clinical decision-making.

CN119632534APending Publication Date: 2025-03-18GUANGDONG MEDCODON MEDICAL TECHNOLOGY CO LTD

Patent Information

Application Number
CN202411652738.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-19
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

Existing intracranial pressure monitoring sensors are prone to signal drift when temperature changes, resulting in inaccurate measurement results, and traditional data processing methods are difficult to effectively process nonlinear and non-stationary signals.

Method used

The improved wavelet neural network algorithm is adopted to build an intracranial pressure data processing system that can adapt to different environments through steps such as parameter initialization, pre-training, genetic algorithm optimization and wavelet neural network training, so as to reduce the impact of temperature drift and improve signal processing capabilities.

Benefits of technology

It significantly reduces the error of intracranial pressure sensor measurement, improves the accuracy of monitoring data, realizes real-time monitoring and early warning of intracranial pressure changes, and enhances the reliability of clinical decision-making.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119632534A_ABST
    Figure CN119632534A_ABST
Patent Text Reader

Abstract

The invention provides an intracranial pressure sensor data processing system and algorithm based on an improved wavelet neural network. The system comprises a parameter initialization module; a pre-training module; the parameter generation module is used for generating different parameter sets through improved Tent mapping; a model adjustment module; a training module; an output module; an embedded system module; the data input module takes pressure data acquired by the intracranial pressure sensor as training data and inputs the training data into the embedded system, so that a wavelet neural network structure of the data input module can reach a prediction target and is kept in the system; and the on-line measurement module is used for carrying out on-line measurement in the operation or after the operation, collecting intracranial pressure data in real time and inputting the intracranial pressure data into the system so as to obtain accurate intracranial pressure data. The influence of temperature drift on the sensor is reduced by using the improved wavelet neural network algorithm, so that the sensor has good performance when processing nonlinear and non-stationary signals, and the intracranial pressure monitoring data can reflect the actual intracranial pressure of a patient more accurately.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of intracranial pressure monitoring, and in particular to an intracranial pressure data processing algorithm based on an improved wavelet neural network. Background Art

[0002] Intracranial pressure monitoring is a key technology used clinically to assess elevated intracranial pressure, and is often used to monitor patients with brain injury, cerebral hemorrhage, brain tumors, etc. Intracranial pressure sensors are medical devices used to monitor changes in intracranial pressure, and are widely used in neurosurgery, intensive care, and the management of brain diseases.

[0003] The types of sensors used for intracranial pressure are divided into invasive sensors and non-invasive sensors. Invasive sensors: Common ones include ventricular catheters, submeningeal sensors, and brain parenchyma sensors. These sensors are implanted through surgery and can directly monitor intracranial pressure. Non-invasive sensors: Such as ultrasonic sensors and optical sensors, their detection principle is mainly pressure sensing technology: Most invasive sensors use pressure sensitive elements, such as resistive or capacitive sensors, to calculate intracranial pressure by monitoring the pressure changes of intracranial fluid.

[0004] At present, invasive intracranial pressure monitoring is widely used in critical care, especially in cases of craniocerebral injury, cerebral hemorrhage and cerebral edema. The data of invasive intracranial pressure monitoring is relatively more accurate and reliable, and it is also the most clinically recognized intracranial pressure monitoring solution.

[0005] Piezoresistive sensor is currently the most widely used intracranial pressure monitoring technology. It has the characteristics of high accuracy, good stability, and fast response speed, and is widely used in clinical practice.

[0006] Many hospitals use such sensors in their intracranial pressure monitoring systems because they offer the following advantages:

[0007] It has high sensitivity and can detect tiny changes in intracranial pressure. It is suitable for long-term use and can be continuously monitored, making it easy for doctors to track changes in patients' conditions in real time.

[0008] However, due to material properties, structural changes, production process and environmental influences, almost all types of sensors may be affected by temperature drift, although the degree and cause of the impact vary. That is, nonlinear errors exist since the completion of production and are different for each sensor. Its output signal may drift with temperature changes, resulting in inaccurate measurement results.

[0009] In order to solve this problem, in terms of hardware, it is usually necessary to perform temperature compensation in the design or use more stable materials, which is costly and complex, and is not conducive to actual production applications. In terms of software, traditional sensor data processing methods usually rely on linear methods such as Fourier transform and filtering, but perform poorly when processing nonlinear and non-stationary signals.

[0010] Therefore, the above-mentioned systems and methods for intracranial pressure data processing algorithms still need to be further improved. Summary of the invention

[0011] In order to solve the above problems, the purpose of the present invention is to provide an intracranial pressure data processing system and algorithm based on an improved wavelet neural network. By using the improved wavelet neural network algorithm, the influence of temperature drift on the sensor is reduced, so that it performs well when processing nonlinear and non-stationary signals, and the intracranial pressure monitoring data can more accurately reflect the patient's actual intracranial pressure.

[0012] The present invention is achieved through the following technical solutions:

[0013] An intracranial pressure sensor data processing system based on an improved wavelet neural network, the system comprising:

[0014] 1) Parameter initialization module, used to initialize various parameters in the wavelet neural network;

[0015] 2) Pre-training module, which uses back propagation (BP) neural network to pre-train the training data;

[0016] 3) Parameter generation module, which generates different parameter sets through improved Tent mapping to form the initial population of the genetic algorithm;

[0017] 4) Genetic algorithm module, which performs selection, crossover and mutation operations on the initial population to screen out suitable parameters;

[0018] 5) Model adjustment module, adjusting the BP neural network according to the screened parameters to obtain a neural network model that meets the variance requirements;

[0019] 6) A training module, which trains the optimized neural network until the value of the loss function meets the preset requirements;

[0020] 7) Output module, outputs the individual with the best fitness and further trains it through wavelet neural network;

[0021] 8) Embedded system module, which compiles the improved wavelet neural network algorithm into a system program through computer language and burns it into the embedded intracranial pressure host system;

[0022] 9) Data input module, which inputs the pressure data acquired by the intracranial pressure sensor into the embedded system as training data, so that its wavelet neural network structure can achieve the prediction target and remain in the system;

[0023] 10) Online measurement module: performs online measurement at the operation site, collects intracranial pressure data in real time and inputs it into the system to obtain accurate intracranial pressure data.

[0024] Furthermore, the parameter set generated by the parameter generation module through the improved Tent mapping is dynamically changed to adapt to different monitoring environments.

[0025] Furthermore, the genetic algorithm module adopts an elite strategy to retain individuals with the best fitness and accelerate convergence.

[0026] Furthermore, the training module optimizes the neural network structure through multiple iterations, thereby reducing the error of intracranial pressure sensor measurement and improving the accuracy of monitoring data.

[0027] Furthermore, the online measurement module can provide real-time feedback of intracranial pressure data, so that doctors can make timely clinical decisions.

[0028] In addition, the present invention also discloses a processing algorithm of the intracranial pressure sensor data processing system based on the improved wavelet neural network, and the specific steps include:

[0029] 1) Initialize each parameter in the wavelet neural network; use the BP neural network to pre-train the data; use the improved tent mapping to generate different parameter sets to form the initial population of the genetic algorithm; perform selection, crossover, and mutation operations on the population; adjust the BP neural network according to the selected parameters to obtain the variance requirement of the neural network model that meets the existence of an individual, and end the genetic algorithm; output the individual with the best fitness and run the wavelet neural network; import the original data for training until the value of the loss function meets the requirements and the model iteration is completed;

[0030] 2) The iteratively improved wavelet neural network algorithm is compiled as a system program through computer language, and the program is burned into the embedded intracranial pressure host system;

[0031] 3) Inputting the intracranial pressure sensor pressure and other data into the embedded intracranial pressure host system as training data, so that the improved wavelet neural network structure in the system can achieve the prediction target and keep its network structure in the system;

[0032] 4) Connect the trained embedded intracranial pressure host system to the surgical site for online measurement, collect intracranial pressure data in real time through the intracranial pressure sensor and input it into the system to obtain more accurate intracranial pressure data.

[0033] Specifically, in step 1), the number of neurons in the layer, the weights and thresholds between each neuron in the hidden layer and the input layer and the output layer.

[0034] Specifically, these parameters are used as optimization sets, N groups of different optimization sets are randomly generated, and BP neural network is used for pre-training until at least one group meets the accuracy requirements.

[0035] Among them, BP neural network is a basic three-layer neural network, which consists of input layer, hidden layer and output layer. It consists of three parts, namely forward propagation, back propagation and test model.

[0036] The activation function used by the neurons of the BP neural network is the sigmoid function, which is expressed as:

[0037] Furthermore, based on the value interval [a, b] corresponding to the parameter set obtained by the BP neural network, the Tent chaotic map is used to produce a chaotic sequence within this interval. When the computer performs Tent mapping, the binary number of the decimal part is actually shifted left without a sign. This operation feature makes full use of the characteristics of the computer and is more suitable for the operation and processing of large data-level data sequences. Therefore, the iteration speed of the Tent mapping is faster.

[0038] Among them, the Tent mapping is not perfect, and there are small cycles in the sequence, which will affect the convergence of subsequent algorithms. To avoid this problem, this patent adds a random variable to the Tent mapping function to solve this problem.

[0039] Among them, i is the current iteration number; x i With x i+1 is the chaotic mapping value of the i-th and i+1-th operations; N is the population size, and τ is a random number in [0,1], the purpose of which is to eliminate the small period problem of the tent mapping function.

[0040] Furthermore, the generated chaotic sequence is used to generate the initial population of the genetic algorithm. Furthermore, the population is subjected to selection, crossover and mutation operations. The selection of the crossover probability P1 and mutation probability P2 of the genetic algorithm will affect the efficiency of the algorithm in seeking the optimal solution.

[0041] The adaptive crossover probability and mutation probability mentioned in the present invention are that the values ​​of P1 and P2 are adaptively changed with the change of the fitness function value during the calculation process. This adaptive method is that the values ​​of P1 and P2 are relative to the maximum and minimum fitness values ​​f 1max 、f 2max 、f 1min and f 2min And the average fitness value of the population f avgAdaptive changes

[0042] When f1≥f avg hour,

[0043] When f1 <f avg When P1=P 1max ;

[0044] When f1≥f avg hour,

[0045] When f2 <f avg When P2=P 2max ;

[0046] Among them, f1 represents the fitness value of the crossover chromosome; f2 represents the fitness value of the mutated chromosome; ρ represents the adjustment factor, which affects the convergence of the algorithm. After multiple tests, ρ is selected as 9.90.

[0047] Furthermore, the wavelet neural network has three layers, namely the input layer, hidden layer and output layer. The input layer has two neuron nodes, which input the original temperature data and pressure data respectively, the hidden layer has twelve nodes, and the output layer has one neuron node, which outputs the predicted pressure value.

[0048] The output calculation formula of the hidden layer of the wavelet neural network structure is:

[0049]

[0050] In the above formula, i n is the input signal (n represents two input neurons, n=1, 2; input pressure signal and temperature signal respectively); I m is the input value of the hidden layer; O(m) is the output value of the mth node in the hidden layer; w nm is the weight between the input layer and the hidden layer; b m is the wavelet basis function h m The translation factor of m is the wavelet basis function h m The expansion factor of

[0051] h m As the activation function of the hidden layer, the Morlet mother wavelet basis function of the wavelet basis function is used, and its mathematical expression is:

[0052]

[0053] The output calculation formula of the output layer is:

[0054]

[0055] In the above formula, w tq is the weight from the hidden layer to the output layer; O1(t) is the output of the tth hidden layer neuron; u is the number of neurons in the hidden layer; q is the number of neurons in the output layer. Since this patent only outputs the pressure value, q=1.

[0056] The difference between the predicted value and the true value output by the model is used as the loss function to guide the model to continuously optimize the weights of each neuron in each layer until the error between the predicted value and the true value meets the requirements and the model is established.

[0057] The loss function calculation formula is:

[0058] σ=P(q)-O2(q);

[0059] In the above formula, P(q) is the standard pressure value; O2(q) is the pressure value predicted by the wavelet neural network.

[0060] By means of the above technical solution, the beneficial effects of the present invention are:

[0061] 1) Through this algorithm, the sensor temperature drift data can be calibrated. The training module optimizes the neural network structure through multiple iterations, reduces the error of intracranial pressure sensor measurement, and improves the accuracy of monitoring data.

[0062] 2) It can realize real-time monitoring of changes in intracranial pressure, analyze the data through algorithms, issue early warnings in time, and help doctors make decisions.

[0063] 3) Extend the detection time of the intracranial pressure sensor at room temperature to simulate patients with chronic intracranial hypertension, especially those without clinical symptoms, to evaluate whether the real-time monitoring system can accurately detect subtle changes, set corresponding thresholds for the real-time monitoring system, and alarm when the thresholds are exceeded. By comparing the data detected by traditional methods, the early warning success rate of the real-time monitoring system has been significantly improved, and warnings can be issued when the data fluctuates greatly.

[0064] 4) It can fuse and analyze data, integrate data from multiple sensors, conduct multi-dimensional analysis, and improve the reliability of intracranial pressure detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0065] Figure 1a-1b The comparison results of the application of the improved wavelet network and the calibration of the traditional algorithm under different temperature gradients are shown respectively;

[0066] Figure 2 This is a comparison chart of the application of improved wavelet network and traditional algorithm under different temperatures and the same pressure conditions;

[0067] Figure 3a It is a structural schematic diagram of an intracranial pressure sensor data processing system based on an improved wavelet neural network of the present invention;

[0068] Figure 3b It is a flow chart of the intracranial pressure sensor data processing algorithm based on improved wavelet neural network of the present invention;

[0069] Figure 4 is the neuron of BP neural network;

[0070] Figure 5 It is the structural diagram of wavelet neural network;

[0071] Figure 6 It is the raw pressure measurement data of intracranial pressure;

[0072] Figure 7 This is the effect diagram of the intracranial pressure sensor after correction by the wavelet neural network model based on the improved genetic algorithm. DETAILED DESCRIPTION

[0073] To make the purpose, technical solution and advantages of the present invention more clearly understood, the technical solution provided by the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them.

[0074] Under different temperature conditions, the intracranial pressure sensor was calibrated using the traditional method and the temperature drift calibration method based on the improved wavelet neural network algorithm. After the traditional method temperature drift calibration, the sensor measurement error was large. After the temperature drift calibration method based on the improved wavelet neural network algorithm was used, the sensor measurement error was significantly reduced. Figure 1a , Figure 1b shown.

[0075] Through the testing of different batches of intracranial pressure sensors, the tests were carried out under different temperatures and pressure conditions. According to the data sent back by the temperature sensor to the system, combined with the improved wavelet neural network data processing system, the temperature drift of the pressure sensor can be calibrated more accurately. The data is stored in the database, and the more accurate pressure values ​​under different temperatures and pressure conditions are obtained through algorithm analysis, so that the pressure values ​​of the sensors can be corrected in the future.

[0076] Experiments show that the accuracy and sensitivity of the data processing system based on the improved wavelet neural network in intracranial pressure detection are significantly improved. Compared with the traditional monitoring system, the false alarm rate and missed alarm rate are significantly reduced. Figure 2 shown.

[0077] like Figure 3a As shown, the present invention provides an intracranial pressure sensor data processing system based on an improved wavelet neural network, the system comprising:

[0078] 1) Parameter initialization module, used to initialize various parameters in the wavelet neural network;

[0079] 2) Pre-training module, which uses back propagation (BP) neural network to pre-train the training data;

[0080] 3) Parameter generation module, which generates different parameter sets through improved Tent mapping to form the initial population of the genetic algorithm;

[0081] 4) Genetic algorithm module, which performs selection, crossover and mutation operations on the initial population to screen out suitable parameters;

[0082] 5) Model adjustment module, adjusting the BP neural network according to the screened parameters to obtain a neural network model that meets the variance requirements;

[0083] 6) A training module, which trains the optimized neural network until the value of the loss function meets the preset requirements;

[0084] 7) Output module, outputs the individual with the best fitness and further trains it through wavelet neural network;

[0085] 8) Embedded system module, which compiles the improved wavelet neural network algorithm into a system program through computer language and burns it into the embedded intracranial pressure host system;

[0086] 9) Data input module, which inputs the pressure data acquired by the intracranial pressure sensor into the embedded system as training data, so that its wavelet neural network structure can achieve the prediction target and remain in the system;

[0087] 10) Online measurement module: performs online measurement at the operation site, collects intracranial pressure data in real time and inputs it into the system to obtain accurate intracranial pressure data.

[0088] The parameter set generated by the parameter generation module through the improved Tent mapping is dynamically changed to adapt to different monitoring environments. The genetic algorithm module adopts an elite strategy to retain the individuals with the best fitness and accelerate convergence.

[0089] The training module optimizes the neural network structure through multiple iterations, reduces the error of intracranial pressure sensor measurement, and improves the accuracy of monitoring data. The online measurement module can feedback intracranial pressure data in real time, so that doctors can make timely clinical decisions.

[0090] The present invention reduces the influence of temperature drift on the sensor by using an improved wavelet neural network algorithm, so that the sensor performs well in processing nonlinear and non-stationary signals, and the intracranial pressure monitoring data more accurately reflects the actual intracranial pressure of the patient.

[0091] Flowchart as Figure 3b The intracranial pressure sensor data processing algorithm based on the improved wavelet neural network including the above system comprises the following specific steps:

[0092] 1) Initialize each parameter in the wavelet neural network; use the BP neural network to pre-train the data; use the improved tent mapping to generate different parameter sets to form the initial population of the genetic algorithm; perform selection, crossover, and mutation operations on the population; adjust the BP neural network according to the selected parameters to obtain the variance requirement of the neural network model that meets the existence of an individual, and end the genetic algorithm; output the individual with the best fitness and run the wavelet neural network; import the original data for training until the value of the loss function meets the requirements and the model iteration is completed;

[0093] 2) The iteratively improved wavelet neural network algorithm is compiled as a system program through computer language, and the program is burned into the embedded intracranial pressure host system;

[0094] 3) Inputting the intracranial pressure sensor pressure and other data into the embedded intracranial pressure host system as training data, so that the improved wavelet neural network structure in the system can achieve the prediction target and keep its network structure in the system;

[0095] 4) Connect the trained embedded intracranial pressure host system to the surgical site for online measurement, collect intracranial pressure data in real time through the intracranial pressure sensor and input it into the system to obtain more accurate intracranial pressure data.

[0096] In step 1), the parameters of the wavelet neural network are the wavelet odd function scaling factor, translation factor, learning rate, number of iterations, number of neurons in the hidden layer, weights and thresholds between each neuron in the hidden layer and the input layer and output layer.

[0097] Specifically, these parameters are used as optimization sets, N groups of different optimization sets are randomly generated, and BP neural network is used for pre-training until at least one group meets the accuracy requirements.

[0098] Among them, BP neural network is a basic three-layer neural network, which consists of input layer, hidden layer and output layer. It consists of three parts, namely forward propagation, back propagation and test model.

[0099] like Figure 4 As shown, the activation function used by the neurons of the BP neural network is the sigmoid function, which is expressed as:

[0100] Furthermore, based on the value interval [a, b] corresponding to the parameter set obtained by the BP neural network, the Tent chaotic map is used to produce a chaotic sequence within this interval. When the computer performs Tent mapping, the binary number of the decimal part is actually shifted left without a sign. This operation feature makes full use of the characteristics of the computer and is more suitable for the operation and processing of large data-level data sequences. Therefore, the iteration speed of the Tent mapping is faster.

[0101] Among them, the Tent mapping is not perfect, and there are small cycles in the sequence, which will affect the convergence of subsequent algorithms. To avoid this problem, this patent adds a random variable to the Tent mapping function to solve this problem.

[0102] The specific implementation is as follows:

[0103] when hour,

[0104] when hour,

[0105] Among them, i is the current iteration number; x i With x i+1 is the chaotic mapping value of the i-th and i+1-th operations; N is the population size, and τ is a random number in [0, 1], the purpose of which is to eliminate the small period problem of the tent mapping function.

[0106] Furthermore, the initial population of the genetic algorithm is generated with the help of the generated chaotic sequence. The initial population of the genetic algorithm is generated in [0, 1]. The calculation formula is as follows: i =a min +x i (a max -a min ), where A i is the i-th individual generated after combining the chaotic sequence with tent mapping, a min is the minimum individual value before the population is combined with the chaotic series of tent mapping, a max is the maximum value of the individual before the population is combined with the chaotic series of tent mapping, x i Represents the i-th sequence value in the chaotic sequence generated by the tent chaotic function.

[0107] Furthermore, the population is subjected to selection, crossover and mutation operations. The selection of the crossover probability P1 and mutation probability P2 of the genetic algorithm will affect the efficiency of the algorithm in seeking the optimal solution.

[0108] The adaptive crossover probability and mutation probability mentioned in the present invention are that the values ​​of P1 and P2 are adaptively changed with the change of the fitness function value during the calculation process. This adaptive method is that the values ​​of P1 and P2 are relative to the maximum and minimum fitness values ​​f 1max 、f 2max 、f 1min and f 2min And the average fitness value of the population f avg Adaptive changes

[0109] When f1≥f avg hour,

[0110] When f1<f avg When P1=P 1max ;

[0111] When f1≥f avg hour,

[0112] When f2<f avg When P2=P 2max ;

[0113] Among them, f1 represents the fitness value of the crossover chromosome; f2 represents the fitness value of the mutated chromosome; ρ represents the adjustment factor, which affects the convergence of the algorithm. After multiple tests, ρ is selected as 9.90.

[0114] Furthermore, the wavelet neural network has a total of 3 layers: input layer, hidden layer and output layer. The input layer has 2 neuron nodes, which input the original temperature data and pressure data respectively, the hidden layer has 12 nodes, and the output layer has one neuron node, which outputs the predicted pressure value.

[0115] like Figure 5 As shown in the figure, it is a wavelet neural network structure diagram. The output calculation formula of the hidden layer is:

[0116]

[0117] In the above formula, i n is the input signal (n represents two input neurons, n=1, 2; input pressure signal and temperature signal respectively); I m is the input value of the hidden layer; O(m) is the output value of the mth node in the hidden layer; w nm is the weight between the input layer and the hidden layer; b m is the wavelet basis function h m The translation factor of m is the wavelet basis function h m The expansion factor of

[0118] h mAs the activation function of the hidden layer, the Morlet mother wavelet basis function of the wavelet basis function is used, and its mathematical expression is:

[0119]

[0120] The output calculation formula of the output layer is:

[0121]

[0122] In the above formula, w tq is the weight from the hidden layer to the output layer; O1(t) is the output of the tth hidden layer neuron; u is the number of neurons in the hidden layer; q is the number of neurons in the output layer. Since this patent only outputs the pressure value, q=1.

[0123] The difference between the model output prediction value and the true value is used as the loss function to guide the model to continuously optimize the weights of each layer and each neuron until the error between the prediction value and the true value meets the requirements and the model is established. The loss function calculation formula is:

[0124] σ=P(q)-O2(q)

[0125] In the above formula, P(q) is the standard pressure value; O2(q) is the pressure value predicted by the wavelet neural network.

[0126] The present invention will be further described below in conjunction with the embodiments and the accompanying drawings, but is not limited thereto.

[0127] The intracranial pressure sensor is calibrated to obtain the data output by the pressure sensor at various temperatures.

[0128] In step (1), an ultra-high precision thermostatic bath is required, and the temperature controllable range is: 10℃-180℃, and its temperature accuracy is ±0.001℃. At the same time, a pressure generator is used to provide reliable and stable pressure for the pressure sensor, and its range is 500~1100hPa. The calibration temperature range is selected to be 30℃~42℃, and the appropriate pressure points and temperature points are selected for calibration. The experiment selects pressure every 1kPa or 5kPa, and temperature every 1℃ for calibration. During calibration, a constant temperature point is maintained, and 70kPa~140kPa is gradually applied. After the pressure of the pressure generator is stable, a five-and-a-half-digit multimeter is used to collect voltage signals, and the output voltage of the obtained pressure value and temperature value is used as a test sample. A wavelet neural network model based on an improved genetic algorithm is established to fuse the sample data and output the pressure prediction value.

[0129] Construct a wavelet neural network, including input layer, hidden layer and output layer.

[0130] The measured pressure value x1 and temperature value x2 are received as network input, and the network output is the pressure value y. In order to train the network, a series of pressure points and temperature points are selected for calibration, and the temperature and pressure of each point are recorded. The input and output of the same calibration point have a mapping relationship. Collect n groups of test data with a mapping relationship and store them in the database as samples.

[0131] Normalize the sample data.

[0132] In step 3), the specific disclosure of normalization processing is The data is normalized to (-1, 1), and y in the formula max Take 1, y min Take -1, x can be the output voltage value of the pressure sensor at the reference temperature, x max is the maximum value of the pressure sensor output at the reference temperature, x min The minimum value of the output; according to this formula, the output voltage of the pressure sensor, the calibration pressure value and the temperature value are normalized to finally obtain a normalized test sample;

[0133] According to the test samples obtained in step 3), after being fused, the corresponding mapping relationship between the input and output is analyzed, and a wavelet neural network mathematical model based on quantum particle swarm improvement is constructed.

[0134] In step 4), constructing a wavelet neural network mathematical model based on quantum particle swarm improvement also includes setting the input layer of the wavelet neural network to 2 nodes, the hidden layer to 12 nodes, and the output layer to 6 nodes, wherein the output layer nodes correspond to the output of the air pressure value after data fusion; in the input signal sequence x i When (i=1, 2), the output calculation formula of the hidden layer is:

[0135]

[0136] In the above formula, i n is the input signal (n represents two input neurons, n=1, 2; input pressure signal and temperature signal respectively); I m is the input value of the hidden layer; O(m) is the output value of the mth node in the hidden layer; w nm is the weight between the input layer and the hidden layer; b m is the wavelet basis function h m The translation factor of m is the wavelet basis function h m The expansion factor of m As the activation function of the hidden layer, the Morlet mother wavelet basis function of the wavelet basis function is used, and its mathematical expression is:

[0137]

[0138] The output calculation formula of the output layer is:

[0139]

[0140] In the above formula, w tq is the weight from the hidden layer to the output layer; O1(t) is the output of the tth hidden layer neuron; u is the number of neurons in the hidden layer; q is the number of neurons in the output layer. Since this patent only outputs the pressure value, q=1.

[0141] In this process, the network weights and the parameters of the wavelet basis function are continuously adjusted so that the output value of the wavelet neural network continuously approaches the target value until the iteration ends;

[0142] 5) Modified wavelet neural network.

[0143] The error formula for calculating the network output value is: Among them, y n (k) is the target value, i.e., the standard pressure value, y(k) is the predicted output of the wavelet neural network, and n is the number of samples.

[0144] According to the prediction error e, the connection weights, translation and scaling factors of the wavelet neural network are recalculated to make the prediction value of the network continuously approach the target value.

[0145] After determining the parameters of various aspects of the wavelet neural network, the wavelet neural network algorithm training is carried out, including the following steps:

[0146] 5.1 Network initialization: The randomly initialized wavelet function is the translation factor of the wavelet basis function; is the scaling factor of the wavelet basis function, and the connection weight of the network.

[0147] 5.2 Sample classification: The data used in the experiment is divided into training data and test data. The training data is used to train the network, and the test data is used to test the accuracy and feasibility of the network.

[0148] 5.3 The input data is forward propagated through the network to obtain the output value of each neuron and the final prediction result. The error value e is obtained, and the connection weights, translation factors, and shrinkage factors of the neural network are corrected according to the error value e.

[0149] The threshold and weight range determined by the normalized test samples in the above steps are then optimized by genetic algorithm to obtain the optimized weights, scaling factors and translation factors, and then form a wavelet neural network. After the above training, the connection weights of the input layer and hidden layer, the hidden layer and the output layer of the wavelet neural network, the translation factor and scaling factor of the wavelet function have been obtained. These parameters form a known wavelet neural network and are transplanted into the stm32f407 chip.

[0150] The weights are optimized using a genetic algorithm.

[0151] 61. Generate the initial population of the genetic algorithm: Generate the initial population of the genetic algorithm randomly, and use real number coding to encode the scaling factor, translation factor of the wavelet function, and the connection weight of the network, that is, arrange all weights in order into a real number vector as the gene of the individual. Each individual represents a set of parameter combinations, and a total of 100 different individuals are generated.

[0152] 6.2 Define the fitness function: Apply the individual weights (connection weights, translation factors, and shrinkage factors) to the wavelet neural network. Then calculate the loss value of the neural network on the training data. The fitness function is the negative value of the loss value, because the genetic algorithm optimizes the maximization of the fitness value, and what is ultimately needed is the minimization of the loss value. The mean square error is used as the fitness function. The specific formula is:

[0153]

[0154] In this formula, y n (k) is the target value, i.e., the standard pressure value, y(k) is the prediction output of the wavelet neural network, and n is the number of samples;

[0155] 6.3 Setting adaptive crossover rate and mutation rate: The selection of crossover probability P1 and mutation probability P2 of genetic algorithm will affect the efficiency of the algorithm in finding the optimal solution. Adaptive crossover probability and mutation probability mean that the values ​​of P1 and P2 change adaptively with the change of fitness function value during the operation. This adaptive method is that P_1 and P_2 change with the maximum and minimum fitness values ​​f 1max 、f 1min , the maximum and minimum fitness values ​​f 2max 、f 2min And the average fitness value of the population f avg changes and adapts to changes.

[0156] When f1≥f avg hour,

[0157] When f1 <f avg When P1=P 1max ;

[0158] When f1≥f avg hour,

[0159] When f2 <f avg When P2=P 2max .

[0160] Among them, f1 represents the fitness value of the crossover chromosome; f2 represents the fitness value of the mutated chromosome; ρ represents the adjustment factor, which affects the convergence of the algorithm. After multiple tests, ρ is selected as 9.90.

[0161] 6.4 Set the selection operation of the genetic algorithm: Use the roulette selection operation to select the parent individuals. The initial group composed of all individuals is subjected to the survival of the fittest operation through the selection operator, and the number of individuals to be selected for the crossover operation is determined by the crossover rate. The crossover rate of this patent is adaptive and does not need to be set by itself; proportional selection is adopted, that is, the probability of each individual being selected is proportional to its fitness; the probability of individuals with higher fitness being inherited to the next generation group is higher, and the probability of individuals with lower fitness being inherited to the next generation group is lower; the specific steps are as follows:

[0162] 6.4.1 Normalize the fitness value of each individual: a i A represents the normalized value of the i-th individual (i=1,2,...S), S is the population size; i represents the fitness value of the i-th individual, A j Represents the fitness value of the jth individual.

[0163] 6.4.2 Generate a random number: Next, generate a uniformly distributed random number r between 0 and 1. This random number will be used to select a point on the disk.

[0164] 6.4.3. Select a sector based on a random number r. Traverse each individual in the population and add up their normalized fitness values ​​until the sum is greater than or equal to r. The last individual added up is the individual corresponding to the selected sector.

[0165] 6.4.4 Repeat steps 2 and 3 for S times.

[0166] 6.5 Set the crossover operation of the genetic algorithm: Use the two-point crossover method to randomly select two different crossover points within the gene sequence length range of the parent individual (the gene length of the individual in this patent is N=102). The gene sequence between the two crossover points will be exchanged to generate new offspring individuals.

[0167] 6.6 Set the mutation operation of the genetic algorithm: Use the Gaussian mutation method to perform the mutation operation. By traversing each gene of each individual and generating a random number for each gene to decide whether to mutate. If the random number generated for each gene is less than the mutation probability, then the gene will mutate; conversely, if the random number is greater than or equal to the mutation probability, then the gene will not mutate. After optimization, each individual is decoded and substituted into the wavelet neural network model and trained to obtain the corresponding fitness value. The individual with the highest fitness value is selected for comparison with the expected fitness value. If it is not satisfied, the genetic algorithm operation is repeated until it is satisfied.

[0168] In actual situations, the maximum error of the present invention is 65 Pa. Therefore, the performance of the sensor temperature drift is greatly improved after the algorithm is integrated, and the accuracy is significantly improved, which basically meets the measurement requirements.

[0169] Figure 6 is the raw pressure measurement data of intracranial pressure, Figure 7 The wavelet neural network model based on the improved genetic algorithm corrects the measured data of the intracranial pressure sensor. It can be clearly seen that the neural model has a significant correction effect on temperature drift. The trained neural network model is transplanted into the stm32 microprocessor module, and the corrected voltage value can be output.

[0170] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any form. Therefore, any simple modification, equivalent change and modification made to the above embodiment according to the technical essence of the present invention without departing from the technical solution of the present invention still fall within the scope of the technical solution of the present invention.

Claims

1. An intracranial pressure sensor data processing algorithm based on improved wavelet neural network, characterized in that: The system comprises: 1) Parameter initialization module, used to initialize various parameters in the wavelet neural network; 2) Pre-training module, which uses back propagation (BP) neural network to pre-train the training data; 3) Parameter generation module, which generates different parameter sets through improved Tent mapping to form the initial population of the genetic algorithm; 4) Genetic algorithm module, which performs selection, crossover and mutation operations on the initial population to screen out suitable parameters; 5) Model adjustment module, adjusting the BP neural network according to the screened parameters to obtain a neural network model that meets the variance requirements; 6) A training module, which trains the optimized neural network until the value of the loss function meets the preset requirements; 7) Output module, outputs the individual with the best fitness and further trains it through wavelet neural network; 8) Embedded system module, which compiles the improved wavelet neural network algorithm into a system program through computer language and burns it into the embedded intracranial pressure host system; 9) Data input module, which inputs the pressure data acquired by the intracranial pressure sensor into the embedded system as training data, so that its wavelet neural network structure can achieve the prediction target and remain in the system; 10) Online measurement module: performs online measurement at the operation site, collects intracranial pressure data in real time and inputs it into the system to obtain accurate intracranial pressure data.

2. The intracranial pressure sensor data processing algorithm according to claim 1, characterized in that: The parameter set generated by the parameter generation module through the improved Tent mapping is dynamically changed to adapt to different monitoring environments.

3. The intracranial pressure sensor data processing algorithm according to claim 1, characterized in that: The genetic algorithm module adopts an elite strategy to retain the individuals with the best fitness and accelerate convergence.

4. The intracranial pressure sensor data processing algorithm according to claim 1, characterized in that: The training module optimizes the neural network structure through multiple iterations, thereby reducing the error of intracranial pressure sensor measurement and improving the accuracy of monitoring data.

5. The intracranial pressure sensor data processing algorithm according to claim 1, characterized in that: The online measurement module can provide real-time feedback of intracranial pressure data, so that doctors can make timely clinical decisions.

6. The intracranial pressure sensor data algorithm based on improved wavelet neural network according to any one of claims 1 to 5, characterized in that: The specific steps include: 1) Initialize each parameter in the wavelet neural network; use the BP neural network to pre-train the data; use the improved tent mapping to generate different parameter sets to form the initial population of the genetic algorithm; perform selection, crossover, and mutation operations on the population; adjust the BP neural network according to the selected parameters to obtain the variance requirement of the neural network model that meets the existence of an individual, and end the genetic algorithm; output the individual with the best fitness and run the wavelet neural network; import the original data for training until the value of the loss function meets the requirements and the model iteration is completed; 2) The iteratively improved wavelet neural network algorithm is compiled as a system program through computer language, and the program is burned into the embedded intracranial pressure host system; 3) Inputting the intracranial pressure sensor pressure and other data into the embedded intracranial pressure host system as training data, so that the improved wavelet neural network structure in the system can achieve the prediction target and keep its network structure in the system; 4) Connect the trained embedded intracranial pressure host system to the surgical site for online measurement, collect intracranial pressure data in real time through the intracranial pressure sensor and input it into the system to obtain more accurate intracranial pressure data.

7. The intracranial pressure sensor data processing algorithm based on improved wavelet neural network as claimed in claim 6, characterized in that: In step 1), the number of neurons in each layer, the weights and thresholds between each neuron in the hidden layer and the input layer and the output layer are calculated; these parameters are used as the optimization set, and N groups of different optimization sets are randomly generated, and pre-trained using the BP neural network until at least one group meets the accuracy requirements; Among them, BP neural network is a basic three-layer neural network, which consists of input layer, hidden layer and output layer. It consists of three parts, namely forward propagation, back propagation and test model; the activation function used by neurons in BP neural network is sigmoid function, which is expressed as:

8. The intracranial pressure sensor data processing algorithm based on improved wavelet neural network as claimed in claim 6, characterized in that: The adaptive crossover probability and mutation probability are that the values ​​of P1 and P2 change adaptively with the change of the fitness function value during the operation; This adaptive method is that the values ​​of P1 and P2 are relative to the maximum and minimum adaptive values ​​f 1max 、f 2max 、f 1min and f 2min And the average fitness value of the population f avg Adaptive changes When f1≥f avg hour, When f1 <f avg When P1=P 1max ; When f1≥f avg hour, When f2 <f avg When P2=P 2max ; Among them, f1 represents the fitness value of the crossover chromosome; f2 represents the fitness value of the mutated chromosome; ρ represents the adjustment factor, which affects the convergence of the algorithm. After multiple tests, ρ is selected as 9.

90.

9. The intracranial pressure sensor data processing algorithm based on improved wavelet neural network as claimed in claim 6, characterized in that: The wavelet neural network has three layers, namely the input layer, hidden layer and output layer. The input layer has two neuron nodes, which input the original temperature data and pressure data respectively. The hidden layer has twelve nodes, and the output layer has one neuron node, which outputs the predicted pressure value. The output calculation formula of the hidden layer of the wavelet neural network structure is: In the above formula, i n is the input signal (n represents two input neurons, n = 1, 2; input pressure signal and temperature signal respectively); I m is the input value of the hidden layer; O(m) is the output value of the mth node in the hidden layer; w nm is the weight between the input layer and the hidden layer; b m is the wavelet basis function h m The translation factor of m is the wavelet basis function h m The expansion factor of h m As the activation function of the hidden layer, the Morlet mother wavelet basis function of the wavelet basis function is used, and its mathematical expression is: The output calculation formula of the output layer is: In the above formula, w tq is the weight from the hidden layer to the output layer; O1(t) is the output of the tth hidden layer neuron; u is the number of neurons in the hidden layer; q is the number of neurons in the output layer. Since this patent only outputs the pressure value, q = 1; The difference between the predicted value and the true value output by the model is used as the loss function to guide the model to continuously optimize the weights of each neuron in each layer until the error between the predicted value and the true value meets the requirements and the model is established; The loss function calculation formula is: σ=P(q)-O2(q); In the above formula, P(q) is the standard pressure value; O2(q) is the pressure value predicted by the wavelet neural network.

Citation Information

Patent Citations

  • Array type air pressure measurement compensation device and method based on quantum particle swarm wavelet neural network

    CN105258839A

  • A short-term network traffic prediction method for optimizing a wavelet neural network based on an adaptive differential evolution algorithm

    CN109818775A

  • Intracranial pressure measuring device of BP neural network model based on genetic algorithm optimization and working method thereof

    CN112274129A

  • Tobacco leaf dynamic weighing method based on multi-strategy wolf pack algorithm ELM

    CN115752666A

  • Multi-objective optimization scheduling method for active power distribution network containing distributed energy storage

    CN116388288A

Cited By

  • Self-adaptive anti-shake control method and system for mechanical arm of neurosurgical robot

    CN120549619A

  • Continuous prediction method for intracranial pressure of traumatic brain injury patient based on LSTM (Long Short Term Memory) model

    CN121637194A