Disclosure of Invention
In view of the above, the invention provides an implantable diaphragm pacemaker and a control method thereof, which can monitor, process and analyze the surface diaphragm electrical signals of a diaphragm paced patient in real time, realize the on-line adjustment of the stimulation signal parameters, so that the breathing state is optimal, the manual adjustment of medical staff is not needed, and the workload of the medical staff is reduced.
In order to achieve the above purpose, the present invention adopts the following technical scheme:
An implantable diaphragm pacemaker comprises a controller, a body surface electrode and an photoelectrode, wherein the controller comprises a singlechip, a man-machine interaction module, a photoelectrode driving module, a signal processing module and a constant current stimulation module, wherein the singlechip is respectively and electrically connected with the man-machine interaction module, the signal processing module and the constant current stimulation module;
the man-machine interaction module is used for setting or adjusting initial stimulation parameters of the singlechip;
The body surface electrode is used for collecting the electric signals of diaphragm muscles in real time;
the signal processing module predicts the actual respiratory airflow according to the electric signal of diaphragm;
The singlechip is used for comparing the actual respiratory airflow with the ideal respiratory airflow, and adaptively adjusting the initial stimulation parameters according to the comparison result to generate new stimulation parameters;
the constant-current stimulation module is used for generating constant stimulation current according to the new stimulation parameters;
the photoelectrode driving module is used for controlling the photoelectrode to generate a corresponding photoelectrode stimulation signal according to the stimulation current.
Preferably, the photoelectrode consists of a hydrogel substrate, a plurality of conductive electrode plates and a plurality of conductive electrode plates;
The hydrogel substrate comprises a mounting surface and mounting lugs, wherein the mounting surface is of an arc surface structure, the conductive electrode plates and the conductive electrode plates are arranged in a staggered array and embedded into the inner arc surface of the mounting surface, and the mounting lugs are radially mounted on the outer arc surface of the mounting surface and are symmetrically arranged.
Preferably, the cross section of the mounting surface is in a 2/3 circular arc shape.
Preferably, the body surface electrode is a medical surface electrode, and the surface of the medical surface electrode is coated with silver.
Preferably, the model of the singlechip is STM32F091RxT, and the model of the photoelectrode driving module is TLC5940 LED.
Compared with the prior art, the invention discloses an implanted diaphragm pacemaker, wherein a doctor sets initial stimulation parameters according to specific symptoms of a patient through a human-computer interaction module before implantation, body surface electrodes acquire the change condition of electric signals of diaphragm muscles of the patient in real time after implantation, a signal processing module converts and processes the electric signals of the diaphragm muscles to convert analog signals into digital signals, a singlechip calculates the processed diaphragm electric signals to judge whether the current stimulation degree meets the physiological requirements of the patient, and when the current stimulation parameters are not matched with the physiological requirements of the patient, the current stimulation parameters are adaptively adjusted to generate new stimulation parameters, under the new stimulation parameters, a constant current stimulation module generates constant stimulation current, a photoelectric driving module drives a photoelectric stimulation signal of corresponding degree according to the stimulation current and acts on diaphragm nerves, and the diaphragm nerves are controlled to pace corresponding degrees under the stimulation of the photoelectric signals, so that the purpose of adjusting respiratory airflow is achieved. The controller takes the singlechip as a core, and is assisted with the man-machine interaction module, the photoelectrode driving module, the signal processing module and the constant current stimulation module to form a closed loop system with a feedback regulation function, so that medical staff is not required to nurse in real time, self-adaptive adjustment can be carried out according to the physiological needs of patients, the safety and stability are greatly improved, and the life safety of the patients is ensured.
In addition, the invention can reduce the stimulation threshold by adopting a photoelectric combined stimulation mode, realize the accurate regulation and control of the phrenic nerve and improve the safety and the high efficiency of diaphragm pacing.
The invention also provides a control method of the implanted diaphragm pacemaker, which comprises the following steps:
Acquiring initial stimulation parameters of the diaphragm pacemaker and real-time electric signals of the diaphragm;
Predicting the current actual respiratory airflow according to the real-time electric signals of diaphragm;
Calculating ideal respiratory airflow based on an ideal respiratory airflow model, comparing the current actual respiratory airflow with the ideal respiratory airflow, and adaptively adjusting the initial stimulation parameters according to the comparison result to generate new stimulation parameters;
generating a constant stimulation current according to the new stimulation parameters;
and controlling the photoelectrode to generate a corresponding photoelectric stimulation signal according to the stimulation current, and acting on the contact site.
Preferably, the predicting the current actual respiratory airflow according to the real-time electric signal of the diaphragm comprises:
performing digital band-pass filtering processing on the diaphragmatic electromyographic signals acquired by the body surface electrodes in real time to obtain processed diaphragmatic electromyographic signals;
calculating a sample entropy value of the processed diaphragmatic electromyographic signals;
predicting a current actual respiratory airflow based on the sample entropy value.
Preferably, calculating the sample entropy value of the processed diaphragmatic electromyographic signal includes:
generating a data sequence { x (i) } based on the processed diaphragmatic electrical signals, wherein i = 1,2,..n, N is the sum of the data lengths;
respectively constructing m-dimensional vector matrixes X (i) and X (j) based on a data sequence { X (i) };
X(i)=[x(i),x(i+1),...,x(i+m-1)];X(j)=[x(j),x(j+1),...,x(j+m-1)];
wherein m represents m continuous values in the electromyographic signal data sequence, i is more than or equal to 1 and less than or equal to N-m+1, j is more than or equal to 1 and less than or equal to N-m, and i is not equal to j;
Determining a difference maximum d ij in the two vectors in X (i);
Given a similarity tolerance r, counting the number of d ij r < r in X (i), and averaging the sum of the numbers of d ij r < r under all N-m conditions;
In the formula, the value of r is 0.1-0.25SD (X), and SD represents the standard deviation of signals; Representing the ratio of the number of d ij r less than or equal to the number of elements in the d ij array in X (i), and B m (r) represents the average value of the vector sum of the numbers of d ij r less than or equal to the number of the elements in the d ij array under all N-m conditions;
the average of all vector sums of the m+1-dimensional vector matrix is calculated using the following formula:
the sample entropy of the diaphragmatic electrical signal with data length N is calculated using the following formula:
preferably, the calculating the ideal respiratory airflow based on the ideal respiratory airflow model, comparing the current actual respiratory airflow with the ideal respiratory airflow, and adaptively adjusting the initial stimulation parameter according to the comparison result, so as to generate a new stimulation parameter, including:
An ideal respiratory airflow model and a photoelectric stimulation waveform model are built, and ideal respiratory airflow is generated based on the ideal respiratory airflow model;
comparing the current actual respiratory airflow with the ideal respiratory airflow to generate a respiratory airflow difference value and a difference value change rate;
Blurring the difference value of the respiratory airflow and the change rate of the difference value, adaptively adjusting the initial stimulation parameter by using a blurring rule, and determining an adaptive adjustment rule of the stimulation parameter;
establishing a linear relation between the self-adaptive adjustment rule of the stimulation parameters and the photoelectric stimulation waveform model;
and adjusting the original stimulation parameters of the photoelectric stimulation waveform model based on the linear relation, and generating new stimulation parameters.
Preferably, the calculation formula of the adaptive adjustment rule of the stimulus parameter is as follows:
△fl(t)=fl1(t)-fl2(t);
u (t) is the system output control quantity at time t, K p is a proportional coefficient, K i is an integral coefficient, K d is a differential coefficient, fl 1 (t) is an ideal respiratory airflow, and fl 2 (t) is an actual respiratory airflow.
Compared with the prior art, the control method of the implanted diaphragm pacemaker comprises the steps that a doctor sets initial stimulation parameters according to specific symptoms of a patient through a human-computer interaction module, body surface electrodes acquire electric signal change conditions of diaphragm muscles of the patient in real time, a signal processing module converts and processes electric signals of the diaphragm muscles, predicts current actual respiratory airflow according to the electric signals of the diaphragm muscles and transmits the actual respiratory airflow to a singlechip, the singlechip compares the actual respiratory airflow with ideal respiratory airflow to judge whether the current stimulation degree meets physiological requirements of the patient, and when the actual respiratory airflow is inconsistent with the ideal respiratory airflow, the stimulation parameters are adaptively adjusted to generate new stimulation parameters, under the new stimulation parameters, constant stimulation current is generated by a constant current stimulation module, a photoelectric driving module drives a photoelectric electrode to generate photoelectric stimulation signals of corresponding degrees according to the stimulation current, the photoelectric stimulation signals act on diaphragm nerves, and the diaphragm nerves are stimulated by the photoelectric signals to control pacing of response degrees of the diaphragm muscles, so that the purpose of adaptively adjusting respiratory airflow is achieved.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
As shown in fig. 1-2, the embodiment of the invention discloses an implantable diaphragm pacemaker, which comprises a controller 1, a body surface electrode 2 and a photoelectrode 3, wherein the controller 1 comprises a singlechip 11, a man-machine interaction module 12, a photoelectrode driving module 13, a signal processing module 14 and a constant current stimulation module 15, wherein the singlechip 11 is respectively and electrically connected with the man-machine interaction module 12, the signal processing module 14 and the constant current stimulation module 15, the signal processing module 14 is electrically connected with the body surface electrode 2, and the photoelectrode driving module 13 is respectively and electrically connected with the constant current stimulation module 15 and the photoelectrode 3;
the man-machine interaction module 12 is used for setting or adjusting initial stimulation parameters of the singlechip 11;
The body surface electrode 2 is used for collecting the electric signals of diaphragm muscles in real time;
the signal processing module 14 predicts the actual respiratory airflow from the electrical signal of the diaphragm muscle;
The singlechip 11 is used for comparing the actual respiratory airflow with the ideal respiratory airflow, and adaptively adjusting the initial stimulation parameters according to the comparison result to generate new stimulation parameters;
the constant current stimulation module 15 is used for generating constant stimulation current according to the new stimulation parameters;
The photoelectrode driving module 13 is used for controlling the photoelectrode 3 to generate corresponding photoelectric stimulation signals according to the stimulation current.
In the embodiment of the invention, the SCM 11 is STM32F091RxT model, and the SCM integrates high performanceThe M0 32 bit RISC core runs at frequencies up to 48mhz, the high speed embedded memory (flash memory up to 256kbytes and SRAM of 32 kbytes) is compatible to a high degree.
The photoelectrode driving module 13 selects a Texas instrument TLC5940 LED driver, the driver is provided with 16 constant current output channels, the maximum current of 120mA can be output, the driver is connected with a miniature light emitting diode of a light guide conductive photoelectrode, and a singlechip regulates and controls the frequency, amplitude and duty ratio of the output current, so that the flexible regulation of the light stimulation parameters (frequency, light intensity and duty ratio) can be realized.
The singlechip 11 respectively generates positive and negative pulses with stimulation amplitude, stimulation frequency, stimulation pulse width and inspiration time through two paths of DACs. The two paths of DACs realize voltage following through 2 operational amplifiers, and then realize the synthesis of the stimulation waveforms through 1 operational amplifier. In order to avoid external interference or influence of human impedance difference, the synthesized stimulation waveform is input to a constant-current stimulation module to ensure constant stimulation current of the system.
The signal processing module 14 selects an AD620 operational amplifier of ADI company to filter the noise of the system components, and selects an active double T trap to filter the power frequency interference, and the signals of the interference and the noise are read and analyzed by a singlechip ADC.
As shown in fig. 3, the photoelectrode 3 is composed of a hydrogel substrate 31, a plurality of conductive electrode pieces 32, and a plurality of conductive electrode pieces 33;
The hydrogel substrate 31 comprises a mounting surface 311 and mounting lugs 312, the mounting surface 311 is of a cambered surface structure, the conductive electrode plates 32 and the conductive electrode plates 33 are arranged in a staggered array and embedded into the inner cambered surface of the mounting surface 311, the mounting lugs 312 are radially arranged on the outer cambered surface of the mounting surface 311 and are symmetrically arranged, and the mounting lugs 312 are provided with mounting holes 3121.
In the embodiment, the light guide electrode plates are selected from micro light emitting diodes with the size of 200 mu m multiplied by 260 mu m, the conductive electrode plates are made of platinum materials with the size of 200 mu m multiplied by 260 mu m, and the light guide electrode plates and the conductive electrode plates are embedded into the hydrogel substrate with biological compatibility in a staggered mode so as to realize the functions of light guide and conductivity.
The mounting piece of the conductive photoelectric electrode is designed to be 2/3 circular arc, two mounting lugs are designed on two sides of the mounting piece, and mounting holes are formed in the mounting piece, so that a doctor can conveniently penetrate a surgical wire into the through holes to fix the electrode on the epidermis during surgery. The outer diameter of the hydrogel substrate is 4mm, the inner diameter is 3mm, the height is 10mm, a doctor performs surgery to penetrate the photoelectrode into the phrenic nerve, and the photoelectrode contacts with the nerve to realize photoelectric combined stimulation of the phrenic nerve.
In one embodiment, among others, the body surface electrodes 2 are provided with a set of 3 individual body surface electrodes 2. The body surface electrode 2 is attached to the skin of the body surface, the position is the straight line intersection point of the horizontal right (left) nipple of the chest of the human body and the natural vertical of the right (left) arm of the human body, the position of the second rib and the position of the fourth rib are the first position point and the second position point of electrode attachment, the third electrode is the reference electrode, and the third electrode is attached to the abdomen. The surface electrode adopts a medical surface electrode, and the surface is coated with silver, so that the surface electrode can be disassembled and used immediately, and is convenient to use.
As shown in fig. 4, the embodiment of the invention also discloses a control method of the implanted diaphragm pacemaker, which comprises the following steps:
s1, acquiring initial stimulation parameters of a diaphragm pacemaker and real-time electric signals of the diaphragm;
s2, predicting the current actual respiratory airflow according to the real-time electric signals of the diaphragm;
S3, calculating ideal respiratory airflow based on an ideal respiratory airflow model, comparing the current actual respiratory airflow with the ideal respiratory airflow, and adaptively adjusting initial stimulation parameters according to a comparison result to generate new stimulation parameters;
s4, generating constant stimulation current according to the new stimulation parameters;
S5, controlling the photoelectrode to generate a corresponding photoelectric stimulation signal according to the stimulation current, and acting on the contact site.
The following details the corresponding steps:
S2 specifically comprises:
s21, performing digital band-pass filtering processing on the diaphragm electromyographic signals acquired by the body surface electrodes in real time to obtain processed diaphragm electromyographic signals.
S22, calculating the sample entropy value of the processed diaphragm electromyographic signals.
The fixed sample entropy processing of the surface diaphragm electrical signal adopts a moving window calculation method, namely, for the surface diaphragm electrical signal with the length of N, a moving window with the length of N w is added, the overlapping amount of the windows is 90% of the length of the moving window N w, and the fixed sample entropy value in each moving window is calculated, so that a sample entropy curve is obtained.
The formula of the sample entropy calculation is:
S221, generating a data sequence based on the processed diaphragmatic electrical signals, and setting the data sequence of each frame of diaphragmatic electrical signals as { x (i) }, wherein i=1, 2, & gt, N, N being the sum of data lengths;
S222, respectively constructing m-dimensional vector matrixes X (i) and X (j) based on a data sequence { X (i) }, wherein vector dimension m=2;
X (i) = [ X (i), X (i+1),. The number of times, X (i+m-1) ], X (j) = [ X (j), X (j+1),. The number of times, X (j+m-1) ], wherein m represents m consecutive values in the data sequence of the electromyographic signal, 1.ltoreq.i.ltoreq.N-m+1, 1.ltoreq.j.ltoreq.N-m, i.noteq.j;
S223, defining the distance d [ X (i), X (j) ] between X (i) and X (j) as the maximum value d ij of the difference value between the two corresponding elements;
S224, counting the number of d ij r less than or equal to r in X (i) and averaging the sum of the numbers of d ij r less than or equal to r under all N-m conditions given a similarity tolerance r;
Wherein, the value of r is 0.1-0.25SD (X), SD represents the standard deviation of the signal, B i m (r) represents the ratio of the number of d ij r less than or equal to r in X (i) to the number of elements in the d ij array, and B m (r) represents the average value of the vector sum of the numbers of d ij r less than or equal to r under all N-m conditions;
s225, calculating the average value of all vector sums of the m+1-dimensional vector matrix by using the following formula:
S226, calculating a sample entropy value of the diaphragmatic electromyographic signal with the data length of N by using the following formula:
s23, predicting the current actual respiratory airflow based on the sample entropy value.
The diaphragm myoelectric signal X (i) _1 and the respiratory airflow signal fl (t) _1 are simultaneously acquired and recorded at a sampling frequency of 2000 Hz.
(1) The electromyographic signal is processed, wherein a zero-phase fourth-order Butterworth filter with the cut-off frequency of 5-400Hz is adopted for digital band-pass filtering during the collection of the surface diaphragmatic electromyographic signal, and fixed sample entropy calculation in a moving window is carried out to obtain a processed electromyographic signal X (i);
(2) Respiratory airflow signal processing, namely smoothing respiratory airflow signals by a moving average method to remove high-frequency noise and obtain processed respiratory airflow signals fl (t);
(3) The fixed sample entropy of the surface diaphragmatic electromyographic signal X (i) predicts the respiratory airflow signal fl (t) by a linear least squares (polynomial fitting) method, that is, a given electromyographic signal X (i) and airflow signal fl (t) are fitted by m times polynomial, and the coefficient a= [ a m,…,a1,a0 ] of the polynomial is calculated by calling a polyfit () function in matlab, so the relation between the respiratory airflow signal and the diaphragmatic electromyographic signal can be established as follows:
fl(t)=a*X(i);
s3 comprises the following steps:
s31, an ideal respiratory airflow model and a photoelectric stimulation waveform model are built, and ideal respiratory airflow is generated based on the ideal respiratory airflow model;
S32, comparing the current actual respiratory airflow with the ideal respiratory airflow to generate a respiratory airflow difference value and a difference value change rate;
S33, blurring the difference value and the difference value change rate of the respiratory airflow, adaptively adjusting initial stimulation parameters by using a blurring rule, and determining an adaptive adjustment rule of the stimulation parameters;
S34, establishing a linear relation between a self-adaptive adjustment rule of the stimulation parameters and the photoelectric stimulation waveform model;
s35, based on the linear relation, the original stimulation parameters of the photoelectric stimulation waveform model are adjusted, and new stimulation parameters are generated.
The principle of the self-adaptive closed-loop control is as follows:
(1) Calculating the difference Deltafl (t) between the ideal airflow fl 1 (t) and the actual respiratory airflow fl 2 (t) predicted based on the real-time acquired surface diaphragm electromyographic signals according to the acquired surface diaphragm electromyographic signals to predict airflow signals
△fl(t)=fl1(t)-fl2(t)。
(2) Calculating the error change rate delta flc (t):
△flc(t)=△fl(t)-△fl(t-1)。
(3) Discretizing the continuous control system according to an ideal PID control rule to obtain:
u (t) is the system output control quantity at the moment t, K p is a proportional coefficient, K i is an integral coefficient, and K d is a differential coefficient.
(4) Fuzzy controller design
The difference delta fl (t) between the ideal air flow and the actual predicted air flow and the difference change rate delta flc (t) are fuzzified by the membership function, and then the increment coefficient adjustment control parameters K p、ki and K d are deduced according to a fuzzy rule, so that the output control quantity u (t) is adjusted. And establishing a linear relation u (t) between the output control quantity u (t) and the stimulation parameter stim (a_1, a_2, f_1, f_2, d_1, d_2) models, and finally realizing the adjustment of the stimulation parameters.
According to the invention, the actual respiratory airflow is predicted according to the body surface diaphragm electrical signals, the predicted respiratory airflow physical quantity is used as a feedback signal, and the feedback signal is added into the self-adaptive fuzzy controller to form a closed-loop implanted diaphragm pacing system, so that the problem that the existing open-loop implanted diaphragm pacing system is poor in stimulation effect after long-time use is solved, in addition, the stimulation threshold is reduced in a photoelectric combined stimulation mode, and the stability and safety of diaphragm pacing are effectively enhanced. The invention monitors, processes and analyzes the surface diaphragmatic electromyographic signals of the patient with diaphragm pacing in real time, realizes the on-line adjustment of the stimulation signal parameters, so that the breathing state is optimal, the manual adjustment of medical staff is not needed, and the workload of the medical staff is reduced.
In the present specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, and identical and similar parts between the embodiments are all enough to refer to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.