CN113332597B - Functional electric stimulation instrument capable of adaptively adjusting output intensity and control method thereof - Google Patents

Functional electric stimulation instrument capable of adaptively adjusting output intensity and control method thereof Download PDF

Info

Publication number
CN113332597B
CN113332597B CN202110556392.XA CN202110556392A CN113332597B CN 113332597 B CN113332597 B CN 113332597B CN 202110556392 A CN202110556392 A CN 202110556392A CN 113332597 B CN113332597 B CN 113332597B
Authority
CN
China
Prior art keywords
timer
output
pulse
mode
pulse width
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110556392.XA
Other languages
Chinese (zh)
Other versions
CN113332597A (en
Inventor
李玉榕
陈楷
陈建国
郑楠
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fuzhou University
Original Assignee
Fuzhou University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fuzhou University filed Critical Fuzhou University
Priority to CN202110556392.XA priority Critical patent/CN113332597B/en
Publication of CN113332597A publication Critical patent/CN113332597A/en
Application granted granted Critical
Publication of CN113332597B publication Critical patent/CN113332597B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61NELECTROTHERAPY; MAGNETOTHERAPY; RADIATION THERAPY; ULTRASOUND THERAPY
    • A61N1/00Electrotherapy; Circuits therefor
    • A61N1/18Applying electric currents by contact electrodes
    • A61N1/32Applying electric currents by contact electrodes alternating or intermittent currents
    • A61N1/36Applying electric currents by contact electrodes alternating or intermittent currents for stimulation
    • A61N1/36014External stimulators, e.g. with patch electrodes
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61NELECTROTHERAPY; MAGNETOTHERAPY; RADIATION THERAPY; ULTRASOUND THERAPY
    • A61N1/00Electrotherapy; Circuits therefor
    • A61N1/18Applying electric currents by contact electrodes
    • A61N1/32Applying electric currents by contact electrodes alternating or intermittent currents
    • A61N1/36Applying electric currents by contact electrodes alternating or intermittent currents for stimulation
    • A61N1/36014External stimulators, e.g. with patch electrodes
    • A61N1/3603Control systems
    • A61N1/36031Control systems using physiological parameters for adjustment
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The invention provides a functional electric stimulation instrument capable of adaptively adjusting output intensity and a control method thereof, which are characterized by comprising the following steps: and the processor is respectively connected with the processor: the device comprises a Bluetooth communication module, an angular velocity acquisition module, a power module, a boosting module and a pulse output module; the power supply module is connected with the pulse output module through the boosting module. The device adopts lithium battery power supply, and is small, light in weight, the wearing of being convenient for. Communication with the smart phone is realized through bluetooth to utilize the smart phone as the host computer, carry out the control of instruction and the data transmission between the two to the device on the smart phone, convenient to use. A mathematical model of a calf angular velocity signal and a myoelectric signal is built offline by adopting a BP neural network with a simple network structure, real-time prediction of the tibial anterior myoelectric signal in the walking process is realized on the device, and output intensity modulation is carried out according to the predicted myoelectric signal, so that electric stimulation output intensity meeting the natural gait requirement can be provided.

Description

Functional electric stimulation instrument capable of adaptively adjusting output intensity and control method thereof
Technical Field
The invention belongs to the technical field of medical instruments, and particularly relates to a functional electrical stimulation instrument capable of adaptively adjusting output intensity and a control method thereof.
Background
In the technology disclosed or used at present, when the functional electrical stimulation (functional electrical stimulation, FES) is applied to a user, the output intensity is adjusted by the following three methods: 1. the electrical stimulus outputs a full or no stimulus envelope, i.e. the output stimulus intensity toggles between maximum intensity and zero. This steep rise and fall variation can lead to the user lifting too fast on the toe during walking, causing an unstable center of gravity and further increasing the risk of falling. 2. The electrical stimulation outputs a trapezoidal stimulation envelope, i.e. after the stimulation is started, the stimulation intensity is gradually increased from zero to a stable value, then constant stimulation is maintained for a certain time, and finally the stimulation intensity is gradually reduced to zero. The trapezoidal stimulation envelope also has the disadvantage of having a large number of redundant stimulation and stimulation dead zones. Redundant stimulation means that the stimulation amount provided by electric stimulation is larger than the energy required by the tibialis anterior in the natural gait maintenance process, which can cause excessive stimulation received by the tibialis anterior and easily cause muscle fatigue; the stimulation blind area refers to that no electric stimulation is output to provide energy for the tibialis anterior when the stimulation amount is still required to maintain the natural gait, and the unstable gravity center still can be caused, so that the risk of falling is increased. 3. The electric stimulation outputs a natural stimulation envelope curve, and the stimulation intensity is modulated and output according to the Electromyographic (EMG) of the tibialis anterior when a healthy person walks normally, so that the lower limb of the user can accord with the natural gait when walking. However, the stimulation envelope modulated by this method is fixed, i.e. the output intensity for the same moment is constant in one gait cycle, and cannot be adjusted according to the real-time gait information of different users.
For natural stimulus envelope, to make FES have adaptive characteristics when outputting under natural envelope, FES output needs to be modulated according to real-time gait information when walking. The characteristic amounts of gait information include plantar pressure, three-dimensional angular velocity and three-dimensional acceleration of the thigh and the calf, activation states of the corresponding muscles, and the like. The characteristic quantity of gait information can represent different stages of a gait cycle, the existing technical means is that based on a long short-term memory (LSTM) artificial neural network, an electromyographic signal is predicted by using an angular velocity signal, and the self-adaptive adjustment of the electrical stimulation intensity is realized, but the LSTM neural network is used as a circulating neural network, the calculated amount is large, the network structure is complex, and the real-time realization is difficult on wearable equipment.
For the wearable FES devices on the market and in clinic, most of them use trapezoidal envelope lines, and part of them use plantar pressure as a stimulus start and stop signal, and plantar pressure needs to be measured by a force-sensing sensor (FSR), which is an external sensor, and it has a certain difficulty to integrate with a processor. Even pressure sensors with bluetooth transmission function can be limited in use occasions due to integration with insoles.
In summary, current foot drop FES studies mainly suffer from the following deficiencies: (1) The output mode cannot be adaptively adjusted according to the real-time gait information of the user when walking. (2) For gait information prediction of lower limb movements, a plurality of sensors are typically used to collect relevant data. The built model is complex, the calculated amount is large, the response is slow, and the robustness is relatively poor. (3) The modeling method needs a large amount of data support, network operation needs high-speed operation speed, and the modeling method is only suitable for offline analysis and is difficult to realize in real time on wearable equipment.
Disclosure of Invention
In view of the above, in order to make up for the blank and the deficiency of the prior art, the present invention aims to provide a functional electro-stimulation apparatus capable of adaptively adjusting output intensity and a control method thereof,
the functional electric stimulation instrument designed by the invention refers to a wearable electric stimulation output device, the matched device is a smart phone (the type of the smart phone is not limited, as long as the smart phone can be provided with Bluetooth or other equivalent wireless connection functions as an upper computer of the wearable electric stimulation output device and execute corresponding control instructions, and the device can also be replaced by other equivalent devices such as a tablet personal computer) and the like, and the electric stimulation output device is powered by a lithium battery, so that the portable electric stimulation output device has small volume, light weight and convenient wearing. Communication is carried out between the two, and the intelligent mobile phone carries out instruction control and data transmission through the android APP, so that the intelligent mobile phone is convenient to use. According to the invention, a functional electric stimulation instrument capable of adaptively adjusting the output intensity is designed according to the self-adaptive control algorithm, a mathematical model of a calf angular velocity signal and an electromyographic signal is built off line by adopting a BP neural network with a simple network structure, real-time prediction of the anterior tibial electromyographic signal in the walking process is realized, and then the output intensity is modulated according to the predicted electromyographic signal, so that the electric stimulation output intensity meeting the natural gait requirement can be provided. Because the walking process of the person has certain regularity and periodicity, the activity law of the walking process of the person is mainly reflected on the sagittal plane, the angular velocity change law of the ankle joint and the lower leg of the person has consistency, and the upper part of the lower leg is selected as the acquisition position of the angular velocity signal and the wearing position of the device in consideration of the wearing comfort and the aesthetic property of the device. The invention utilizes the shank angular velocity signal to carry out output intensity modulation, effectively solves the problem that the output mode can not carry out self-adaptive adjustment according to the real-time gait information when walking, can avoid redundant stimulation and stimulation blind areas caused by trapezoidal envelope lines used by wearable FES equipment on the market and clinically, and can also avoid the problem of model complicacy caused by using a plurality of sensors to carry out data acquisition. Meanwhile, the BP neural network is utilized to establish the electromyographic signal prediction model, so that the model can be simplified, the calculated amount and the calculated time can be reduced, and the electromyographic signal prediction model can be realized on wearable equipment in real time.
The invention adopts the following technical scheme:
a functional electrical stimulation apparatus capable of adaptively adjusting output intensity, comprising: and the processor is respectively connected with the processor: the device comprises a Bluetooth communication module, an angular velocity acquisition module, a power module, a boosting module and a pulse output module; the power supply module is connected with the pulse output module through the boosting module; the Bluetooth communication module is connected with the smart phone and takes the smart phone as an upper computer to control the device by instructions; the device receives the control instruction of the smart phone, and then adjusts the stimulation parameters and outputs bipolar constant current pulses in real time through the processor.
Further, the processor is an STM32 microprocessor.
Further, the power module comprises a lithium battery, a USB charging circuit and a voltage conversion circuit which are connected with the lithium battery.
Further, the boost module comprises a primary boost circuit connected with the lithium battery, a secondary boost circuit connected with the primary boost circuit, a DAC converter connected with the primary boost circuit, and a digital potentiometer connected with the secondary boost circuit, wherein the DAC converter and the digital potentiometer are also respectively connected to the processor.
Further, the pulse output module comprises an H-bridge circuit connected with the secondary boost circuit and a constant current output circuit connected with the H-bridge circuit, and the H-bridge circuit and the constant current output circuit are also respectively connected to the processor.
Further, the processor receives data sent by the smart phone through a serial port interrupt service subroutine, the STM32 receiving register receives data of one character to generate serial port interrupt once, and the data is read into the STM32, wherein the serial port interrupt comprises amplitude adjustment, pulse width adjustment, mode selection, start and stop output instructions; and then calculating a boosting parameter or an H-bridge control parameter according to the data received by the serial port interrupt and setting a corresponding timer interrupt, wherein the boosting parameter comprises a primary boosting parameter and a secondary boosting parameter, and the H-bridge control parameter comprises time corresponding to the output high-low level.
Further, the control flow comprises the following specific steps:
step S1: after the processor is electrified and initialized, judging whether a mark Start generated after the serial port receives an opening output instruction through the Bluetooth module is 1, if the mark Start is not equal to 1, outputting no pulse until the mark Start=1, and executing the subsequent steps;
step S2: performing pulse parameter initialization operation and outputting initial pulses;
step S3: judging whether a mark received generated after the serial port receives a control instruction sent by the smart phone through the Bluetooth module is 1, if yes, continuing to output an initial pulse until the mark received=1, and executing the subsequent steps;
Step S4: setting a mark received generated after the serial port receives a group of control instructions to 0, and executing corresponding steps by a processor according to the instructions; the smart phone sends control instructions through the APP, and the instructions comprise amplitude adjustment, pulse width adjustment, mode selection, starting and stopping output.
Further, the output intensity of the device is adjusted in real time according to the shank angular velocity signal during walking through the self-adaptive control algorithm; the self-adaptive control algorithm utilizes BP neural network by collecting angular velocity signals in real timeModel calculation output electromyographic signals E t And apply the electromyographic signal E t Scaled to the electrical stimulation output intensity F t
Further, the output intensity is adjusted according to the myoelectric signal in one gait cycle in the walking process of the healthy person, so that the change rule of the output intensity in the output time is consistent with the change rule of the myoelectric signal in one gait cycle; and inserts a stop output time between output times, adjusting the output intensity by varying the pulse width.
Further, the amplitude adjustment instruction comprises an increase amplitude and a decrease amplitude, after the processor receives the amplitude adjustment instruction, the amplitude is calculated, primary boost parameters and secondary boost parameters are calculated according to the amplitude, and a DAC converter of the boost unit and a register of the digital potentiometer are configured through an I2C interface of the STM32 processor;
The pulse width adjustment instruction comprises an increase pulse width and a decrease pulse width, the pulse width is calculated after the processor receives the pulse width adjustment instruction, and the control parameter of the H bridge circuit, namely the timing time of high and low levels, is calculated according to the pulse width.
Further, the mode selection includes 3 modes of operation: parameter setting mode, myoelectric modulation mode and adaptive mode; when the processor receives the mode selection instruction, executing the subsequent steps according to the corresponding instruction, wherein the initial mode state mark is model=0 and represents a parameter setting mode; an initial parameter setting flag bit=1 indicates that the setting of parameters is possible.
Compared with the prior art, the invention adopts the lithium battery to supply power in the preferred scheme, has small volume and light weight, and is convenient to wear. Meanwhile, communication with the intelligent mobile phone is realized through Bluetooth, so that the intelligent mobile phone is used as an upper computer, parameters of the device can be set on the intelligent mobile phone, and the intelligent mobile phone is convenient to use.
The self-adaptive mode of the device utilizes the BP neural network to establish an electromyographic signal prediction model which can be realized in wearable equipment, predicts the electromyographic signal in real time based on the angular velocity of the lower leg, modulates the output intensity through the predicted electromyographic signal, avoids redundant stimulation and stimulation blind areas, and can provide the electric stimulation output intensity which meets the requirements of natural gait.
The using mode of the device is as follows: the user connects the electrode plate with the device through a special wire, the device is fixed below the knee through a binding belt, and the anode and the cathode of the electrode plate are attached to the upper end and the lower end of the tibialis anterior;
turning on a power supply of the device, and performing Bluetooth pairing on the smart phone and the device; the user registers on the smart phone APP and logs in to the control interface; the user starts the output to set parameters; closing output after the user parameter is set; a user selects a mode; closing the output after the user opens the output and uses; the user uses the data backstage to save automatically, withdraws from the android APP, turns off the power supply of the device, and takes down the binding band and the electrode slice.
Drawings
The invention is described in further detail below with reference to the attached drawings and detailed description:
fig. 1 is a schematic structural diagram of a wearable electric stimulation output device according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of the STM32 circuit according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of the HC05 working circuit according to the embodiment of the present invention;
FIG. 4 is a schematic diagram of the working circuit of MPU6050 according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of a USB charging circuit according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of a voltage detection circuit of a lithium battery according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of a circuit switching operation circuit according to an embodiment of the present invention;
FIG. 8 is a schematic diagram of a primary boost circuit according to an embodiment of the present invention;
FIG. 9 is a schematic diagram of a DAC circuit according to an embodiment of the present invention;
FIG. 10 is a schematic diagram of a secondary boost circuit according to an embodiment of the present invention;
FIG. 11 is a schematic diagram of an H-bridge circuit according to an embodiment of the present invention;
FIG. 12 is a schematic diagram of a 12V voltage generation circuit in accordance with an embodiment of the present invention;
FIG. 13 is a schematic diagram of a constant current output circuit according to an embodiment of the present invention;
FIG. 14 is a schematic diagram of an embodiment of an H-bridge output voltage sampling circuit;
FIG. 15 is a flowchart illustrating a main process according to an embodiment of the present invention;
FIG. 16 is a schematic diagram of a BP neural network topology according to an embodiment of the present invention;
FIG. 17 is a schematic diagram of an amplitude adjustment process according to an embodiment of the present invention;
FIG. 18 is a schematic diagram of a pulse width modulation and pulse generation flow according to an embodiment of the present invention;
FIG. 19 is a schematic diagram of an embodiment of an output start flow chart of the present invention;
FIG. 20 is a schematic diagram of a process of generating 1s pulses by a timer according to an embodiment of the present invention;
FIG. 21 is a schematic diagram of a myoelectricity modulation mode timer interrupt service flow according to an embodiment of the present invention;
fig. 22 is a schematic diagram of a software implementation flow of an adaptive electromyography modulation algorithm according to an embodiment of the invention.
Detailed Description
In order to make the features and advantages of the present patent more comprehensible, embodiments accompanied with figures are described in detail below:
the purpose of this embodiment is to provide a functional electrical stimulation instrument and control method that can self-adaptively adjust stimulation intensity, and communication is performed between the wearable electrical stimulation output device and the smart phone through bluetooth. The smart phone performs instruction control and data transmission through the android APP. There are three modes of operation for the functional electrical stimulation apparatus: parameter setting mode, myoelectric modulation mode and adaptive mode. The parameter setting mode may set parameters of the output pulse. The myoelectricity modulation mode modulates output intensity according to myoelectricity signals in one gait cycle in the walking process of a healthy person, and the change rule of the output intensity is consistent with the change rule of the myoelectricity signals in one gait cycle. The self-adaptive mode can adjust the electric stimulation output intensity according to the real-time calf angular velocity signal during walking, and redundant stimulation and stimulation blind areas are avoided.
1. Wearable electric stimulation output device
The wearable electric stimulation output device comprises an STM32 microprocessor, a Bluetooth communication module for realizing communication between the STM32 and the smart phone, an angular velocity acquisition module for realizing angular velocity acquisition, a power module for supplying power to the whole device, a boosting module and a pulse output module, wherein all modules of the device are connected as shown in figure 1.
The power module comprises a lithium battery, a USB charging circuit and a voltage conversion circuit, wherein the USB charging circuit and the voltage conversion circuit are connected with the lithium battery. The boost module comprises a primary boost circuit connected with the lithium battery, a secondary boost circuit connected with the primary boost circuit, a DAC converter connected with the primary boost circuit, and a digital potentiometer connected with the secondary boost circuit, wherein the DAC converter and the digital potentiometer are also respectively connected to the processor.
The pulse output module comprises an H-bridge circuit connected with the secondary boost circuit, and a constant current output circuit connected with the H-bridge circuit, wherein the H-bridge circuit and the constant current output circuit are also respectively connected to the processor.
The invention designs the wearable electric stimulation output device capable of adaptively adjusting the output intensity based on the STM32 processor (STM 32F407VET6 and other chips with the same functions), and receives the instructions of amplitude adjustment, pulse width adjustment, mode selection (including parameter setting mode, myopoint modulation mode and gait self-adaptive mode), starting and stopping output and the like sent by the smart phone through the Bluetooth communication module so as to realize the self-adaptive adjustment of the output intensity according to the real-time gait information. The specific hardware components comprise an STM32 processor, a Bluetooth communication module, a power module, a boosting module, a pulse output module and an angular velocity acquisition module. The device adopts a 4.2V rechargeable lithium battery as a power supply, the lithium battery is charged through a USB wire, the lithium battery is used as the driving voltage of STM32 through a voltage conversion circuit, meanwhile, the lithium battery is used as the input voltage of a boosting module, and the output voltage of the boosting module is used as the working voltage of a constant current output module.
STM32 processor selects STM32F407VET6, and the working circuit is shown in figure 2. The CPU is a 32-bit processor, the working frequency of the CPU is 72MHz, the peripheral devices are rich, and the timer, the ADC, the I2C, GPIO and the USART function module which meet the requirements of a constant current output device are provided. The I2C peripheral module is used for configuring registers of the DAC converter and the digital potentiometer; 8 common I/O ports are used for controlling the pulse output module; the ADC module is used for collecting battery voltage and voltage of the pulse output circuit.
The Bluetooth communication module adopts an ATK-HC05 master-slave integrated Bluetooth serial port module, has small volume and high stability, and can be used for realizing mutual transmission of data with an upper computer. The device adopts the smart phone APP as an upper computer. Communication is realized through the USART interface of HC05 and STM32, and the communication baud rate is 115200kb/s. The working circuit is shown in fig. 3, and the LED represents an indicator lamp and is connected with the IO port. The indicator lamp 2s flashes slowly once, which indicates that the HC05 enters the AT mode, and parameters of the HC05 can be set, including baud rate, name, password, master-slave roles, etc. The indicator lights flash to indicate that the initialization of HC05 is complete and enter a mateable state. The indicator light 1s flashes twice to indicate that the pairing state has been entered. The KEY is connected with the IO port, and HC05 enters the AT mode AT high level. RX and TX are respectively connected with TX and RX of STM32 USART interface to implement mutual transmission of data.
The angular velocity acquisition module selects the MPU6050 as a sensor for acquiring angular velocity signals, and the working circuit is shown in fig. 4. The MPU6050 sensor performs data transmission with the STM32 through the IIC interface, and performs DA conversion on the read angular velocity number to obtain a true value. The MPU6050 sensor contains 3 gyroscopes, the range selection is determined by a gyroscope configuration register with address 0X1B, where two bits of FS_SEL [1:0] (i.e., bit3 and bit 4) are used to set the full range of the gyroscopes.
The power module consists of a battery, a USB charging circuit and a voltage conversion circuit, wherein the battery is a 4.2V rechargeable lithium battery, the battery is charged through a USB wire, the battery charging circuit adopts an MP2615 high-efficiency charger chip, the voltage conversion circuit converts the battery voltage into the voltage for the STM32 to work, and the USB charging circuit is shown in figure 5. In the device, a green light D5 and a red light D6 respectively represent an effective power input indicator light and a charging indicator light, and when a 5V voltage is input by a USB line, the red light and the green light are normally on. The charging circuit only needs to charge 1 section of 4.2V lithium battery, therefore, the 4 th pin of MP2615 is connected with the VCC pin through the 0R resistor and is set to charge 1 section of battery. The 5 th pin is suspended and is arranged to charge the 4.2V battery. In order to prevent the voltage of the lithium battery from exceeding the allowable voltage range of the ADC module, the lithium battery needs to be connected in series with 2 100K resistor voltage dividing circuits, and the divided voltage is input to the ADC module of STM32 for detecting the battery power. When green light D6 goes off, it indicates that the battery voltage is too low, STM32 can not work normally, and the lithium battery needs to be charged. The 3.3V voltage conversion working circuit is shown in fig. 7, the lithium battery is connected in series with a switch and then connected with the XC6206 chip, and when the switch is closed, 4.2V voltage is converted into 3V3 voltage through the XC6206 chip to serve as the driving voltage of STM 32.
The boost module is a two-stage boost circuit comprising a primary boost circuit and a secondary boost circuit, and the primary boost circuit and the secondary boost circuit adopt a parallel connection mode to boost the power supply voltage to the required voltage. The lithium battery is used as the input voltage of the primary booster circuit, and the voltage after primary boosting is used as the input voltage of the secondary booster circuit. The primary boost employs an FP6296XR chip, the operating circuit of which is shown in fig. 8. In the device, the input voltage of the primary booster circuit is 4.2V, the output voltage is up to 12V, the 5 th pin of the primary booster chip is used as a voltage feedback pin, the feedback voltage VFB is 1.2V, and a linear addition circuit is externally connected. The output voltage is controlled by controlling the voltage level of the adder input ch1_adj2. Increasing the voltage of ch1_adj2 can reduce the output voltage V of the primary booster circuit O The method comprises the steps of carrying out a first treatment on the surface of the Otherwise, the output voltage V of the primary booster circuit is increased O . The voltage of ch1_adj2 is determined by the voltage of the output of the DAC converter controlled by the I2C interface of STM32, and the DAC conversion operation circuit is shown in fig. 9. The output voltage is used as the input voltage of the secondary Boost circuit, and the secondary Boost circuit adopts a Boost circuit, and the working circuit of the Boost circuit is shown in fig. 10. In the device, a high-performance PWM controller BIT3260 is adopted to control the switch of an MOS tube, the voltage of an OCP pin is 0.5V, a digital potentiometer MCP4018-502 is externally connected, the digital potentiometer is connected in series with a 100K resistor R22, and the output voltage is calculated according to the voltage division principle (assuming that the resistance of the digital potentiometer is R x ). The register of the digital potentiometer is configured through the I2C interface of the STM32, the resistance value of the digital potentiometer is changed, and the output voltage of secondary boost is controlled.
The pulse output module consists of an H-bridge circuit and a constant current output circuit, and the H-bridge working circuit is shown in figure 11. The I/O port of STM32 controls the alternate conduction of the H bridge, and controls the frequency and pulse width of the output bipolar pulse according to the calculated frequency and pulse width. The lower tube of the H bridge adopts an MOS tube, the driving voltage of the MOS tube is set to be 12V, and a 12V voltage working circuit is generated as shown in figure 12. The device adopts an FP6291 boosting integrated chip, the feedback voltage of 5 pins is 0.6V, and the external voltage dividing resistors R54 and R57 ensure that the output voltage is 12V, and the device provides driving voltage for the MOS tube. Constant current output circuit as shown in fig. 13, R26 resistance is used for small current output and load resistance measurement. When the R26 resistor is connected into the circuit, a series circuit is formed with the load, and the magnitude of the load resistor can be measured through the voltages of two output ends of the H bridge and the voltage of the R26 resistor. The ch1_sw2 switch determines whether to turn on the bypass R26 and ch1_sw1 determines whether to open the channel. The working circuit for sampling the voltages at the two output ends of the H-bridge is shown in fig. 14, and in order to prevent the voltages from exceeding the allowable voltage range of the ADC module, the voltages are divided by resistors and then input into the ADC module. The constant current output is actually a constant current output circuit controlled by voltage, the voltage corresponding to the current required by output is calculated first, and a register corresponding to a DAC converter and a digital potentiometer is configured through an I2C interface, so that the output voltage of the secondary boost circuit is stable. Detecting the current flowing through the load, and when the load current is smaller than a set value, reducing the resistance of the digital potentiometer and increasing the output voltage of the booster circuit so as to increase the load current; when the load current is larger than the set value, the resistance of the digital potentiometer is increased, and the output voltage of the boost circuit is reduced, so that the load current is reduced, and constant current output is finally realized.
2. Software control method of processor
The processor STM32 of the electrical stimulation output device receives data sent from the smart phone through the serial interrupt service routine. The STM32 receiving register receives data of one character to generate a serial port interrupt, and reads the data into the STM32, wherein the serial port interrupt comprises commands such as amplitude adjustment (increasing and decreasing amplitude), pulse width adjustment (increasing and decreasing pulse width), mode selection (parameter setting mode, myoelectricity modulation mode and adaptive mode), starting and stopping outputting and the like. And then calculating a boosting parameter or an H-bridge control parameter according to the data received by the serial port interrupt and setting a corresponding timer interrupt, wherein the boosting parameter comprises a primary boosting parameter and a secondary boosting parameter, and the H-bridge control parameter comprises time corresponding to the output high-low level.
The main program control flow of the electric stimulation output device is shown in figure 15,
the method comprises the following specific steps:
first, after the processor is powered on and initialized, judging whether a mark Start generated after the serial port receives an opening output instruction through the Bluetooth module is 1, if the mark Start is not equal to 1, no pulse is output, and executing subsequent steps until the mark start=1.
And step two, performing pulse parameter initialization operation and outputting initial pulses.
Thirdly, judging whether a mark received generated after the serial port receives a group of data (control instructions) sent by the smart phone through the Bluetooth module is 1, if yes, continuing to output initial pulses until the mark received=1, and executing subsequent steps.
Fourthly, setting a mark received generated after the serial port receives a group of control instructions to 0, and executing corresponding steps by the processor according to the instructions. The smart phone sends control instructions through the APP, and the instructions comprise amplitude adjustment, pulse width adjustment, mode selection, starting and stopping output.
1. Self-adaptive mode electric stimulation output intensity control method
The self-adaptive mode can adjust the output intensity of the device in real time according to the shank angular velocity signal during walking, and is realized by a self-adaptive control algorithm.
The algorithm calculates and outputs an electromyographic signal E by utilizing a BP neural network model through collecting angular velocity signals in real time t And apply the electromyographic signal E t Scaled to the electrical stimulation output intensity F t
A schematic diagram of a BP neural network is shown in fig. 16, which includes three parts of an input layer, an hidden layer, and an output layer.
The calculation process of the BP neural network comprises the following steps:
activation function:
hidden layer:
output layer:
updating a weight threshold value:
Wherein the connection weight between the ith neuron of the input layer and the jth neuron of the hidden layer is W ij The connection weight between the jth neuron of the hidden layer and the neuron of the output layer is W j The threshold value of the jth neuron of the hidden layer is theta j The threshold value of the neuron of the output layer is theta, S j Receiving input of input layer for the j-th neuron of hidden layer, delta j For the j-th neuron of the hidden layer, delta is the output layer counter-propagating error, e t To expectError, η is the learning rate.
Myoelectric signal E t Scaled to the electrical stimulation output intensity F t The calculation formula of (2) is as follows:
F t =(sat-thr)·E t +thr
where thr and sat are the threshold and tolerance values set by the user, respectively. The present invention adjusts the output intensity by varying the pulse width.
Before use, the BP neural network is trained offline, and because gait data has periodicity and time sequence, in order to accurately predict electromyographic signals by using collected angular velocity signals, the input signals in the model of the BP neural network are angular velocity signals A from time t, time t-1, time t-2 to time t-N+1 t , A t-1 ,A t-2 …A t-N+1 (N is a positive integer), and the output signal is an electromyographic signal E corresponding to different angular speeds at the moment t t
The offline training method of the BP neural network model comprises the following specific steps: a healthy tester walks in a normal straight line on the flat ground according to metronome signals, the metronome signals are respectively set to 60 steps/min and 70 steps/min to 110 steps/min, and simultaneously, calf angular velocity signals and tibial anterior myoelectricity signals are collected. Full-wave rectification, low-pass filtering (6 th order Butterworth low-pass filtering, cut-off frequency 4 Hz), resampling (100 Hz) and normalization are carried out on the collected electromyographic signals. The collected angular velocity signal is subjected to low-pass filtering (butterworth low-pass filtering of order 6, cut-off frequency of 4 Hz), resampling (100 Hz) and normalization. The sampling frequencies of the two groups of data are consistent, and the BP neural network is utilized to model the calf angular velocity signal and the tibialis anterior myoelectric signal. Wherein the angular velocity signals at N consecutive moments (including the current moment) are taken as inputs to the neural network, and the tibialis anterior electromyographic signals at the current moment are taken as outputs.
The method for taking the values of the number N of the input layers and the number M of the neurons of the hidden layers of the BP neural network is to take different values respectively, test the network performance by utilizing root mean square error and regression coefficient, and determine the values of N and M after comprehensively considering the network complexity, root mean square error and regression coefficient.
2. Method for controlling electric stimulation output intensity of myoelectric modulation mode
The myoelectricity modulation mode of the invention adjusts the output intensity according to the myoelectricity signal in one gait cycle in the walking process of a healthy person, and the change rule of the output intensity in 1s is consistent with the change rule of the myoelectricity signal in one gait cycle. In the myoelectric modulation mode, the output duration is 1s, then 2s is stopped, and 1s is output, so that the cycle is completed.
Myoelectric signal E t Scaled to the electrical stimulation output intensity F t The calculation formula of (2) is as follows:
F t =(sat-thr)·E t +thr
where thr and sat are the threshold and tolerance values set by the user, respectively. The present invention adjusts the output intensity by varying the pulse width.
3. Control instructions
(1) Amplitude adjustment instruction
The amplitude adjustment instruction comprises an amplitude increasing instruction and an amplitude decreasing instruction, after the processor receives the amplitude adjustment instruction, the amplitude is calculated, primary boost parameters and secondary boost parameters are calculated according to the amplitude, and a DAC converter of the boost unit and a register of the digital potentiometer are configured through an I2C interface of the STM32 processor. The amplitude adjustment flow is shown in fig. 17.
The method comprises the following specific steps:
calculating a load resistance Resistor; judging whether the Resistor is between 900 and 4000; if yes, continuing to execute the subsequent steps, and if not, not configuring the boosting parameters; when the Resistor is between 900 and 4000, judging whether the amplitude value tar=amp is larger than 12V, if the amplitude value is smaller than or equal to 12V, setting the flag bit EaState for starting the secondary boost to 0, which means that the secondary boost is not performed. And simultaneously calculating the parameter of the input end CH1_ADJ2 of the adding circuit in the primary booster circuit, thereby controlling the output voltage of the primary booster circuit. If the amplitude is greater than 12V, eaState is set to 1, indicating that a secondary boost is performed. And setting the parameter of the input end CH1_ADJ2 of the adding circuit in the primary booster circuit to 0, and simultaneously calculating the parameter of the digital potentiometer in the secondary booster circuit, so as to control the output voltage of the secondary booster circuit.
(2) Pulse width modulation instruction
The pulse width adjustment instruction comprises an increase pulse width and a decrease pulse width, the pulse width is calculated after the processor receives the pulse width adjustment instruction, and the control parameter of the H bridge circuit, namely the timing time of high and low levels, is calculated according to the pulse width. The pulse width modulation and pulse generation flow is shown in fig. 18.
The method comprises the following specific steps:
After the timer interrupt is generated, closing the timer; setting the timing time of a timer and a pulse state mark according to the current pulse state mark, wherein the initial state mark is CH_INIT; when the state mark is CH_INIT, the processor calculates HIGH-low level duration according to the received regulating instruction, the timer sets the HIGH-level duration, the state mark is changed into CLTP_HIGH, and the timer is started to output forward pulse; after the timer interrupt is generated, closing the timer; when the state mark is CLTP_HIGH, the timer sets low-level delay time, outputs low level, then the timer sets HIGH-level duration, the state mark is changed into CLTN_HIGH, and the timer is started to output negative-going pulses; after the timer interrupt is generated, closing the timer; when the state flag is CLTN_HIGH, the timer sets the duration of the LOW level, the state flag is changed to HOLD_LOW, the timer is started, and the LOW level is output; after the timer interrupt is generated, closing the timer; when the state mark is HOLD_LOW, the processor calculates HIGH-LOW level duration according to the received regulating instruction, the timer sets the HIGH-level duration, the state mark is changed into CLTP_HIGH, and the timer is started to output forward pulse; the cycle is then repeated while determining if the current count value of the timer is less than T, less than and approaching the timer setting, when the status flag is cltp_high or cltn_high. When the current count value of the timer is smaller than T, sampling the load current through the AD module, and outputting the load current I f And setting a current I r Comparing to obtain a current deviation value delta I, wherein delta I=I f -I r . The digital potentiometer is finely adjusted according to the deviation value delta I, when delta I is more than 0, the resistance value of the digital potentiometer is increased, and the output voltage of the booster circuit is reduced, so that the load current is reduced; when deltaI is less than 0, the resistance of the digital potentiometer is reduced, the output voltage of the booster circuit is increased, and therefore the load current is increased; and then returning to continue to execute the current step until the current count value of the timer is greater than T, and exiting the timer interrupt service. To ensure the periodic integrity of the output pulse, the high-LOW duration can be changed only when the status flag bit is hold_low; the low-level delay time is a dead time reserved for the positive and negative pulses not to jump, which is different from the low-level duration.
(3) Mode selection
The device comprises 3 working modes: parameter setting mode, myoelectric modulation mode and adaptive mode. When the processor receives the mode selection instruction, executing the subsequent steps according to the corresponding instruction, wherein the initial mode state flag is model=0, and the initial mode state flag indicates a parameter setting mode. An initial parameter setting flag bit=1 indicates that the setting of parameters is possible.
The method comprises the following specific steps:
Receiving a parameter setting mode instruction
The mode status flag bit Model is set to 0, and the parameter setting flag bit=1 indicates that parameter setting can be performed, including output amplitude and pulse width adjustment. The output mode of the parameter setting mode is to output 1s pulse, stop 2s pulse, and repeat the above steps. The pulse width and amplitude of the output pulse are the current set value.
Receiving myoelectric modulation mode instruction
The mode state flag bit Model is set to 1, which indicates that the myoelectricity modulation mode is currently adopted; and calculating pulse width values in one output period according to the stored threshold value and tolerance value information, wherein the number of the pulse width values is f, and the pulse width values are stored as an array PW [ f ], and f is pulse output frequency. The myoelectric modulation mode is output by outputting a 1s pulse, stopping for 2s, and repeating the above steps. The amplitude of the output pulse is set, and the pulse width is changed f times within 1s according to the array PW [ f ].
Receiving an adaptive mode instruction
The mode status flag bit Model is set to 2, indicating that the adaptive mode is currently being used. The output mode of the self-adaptive mode is whole-course output, and the acquired angular velocity is converted into pulse width according to the self-adaptive myoelectric modulation algorithm, so that pulses with the pulse width changing along with the change of the angular velocity are output.
(4) Opening an output instruction
When the processor receives the start output instruction, the different timers are enabled to interrupt and control the start of different output modes through parameters, and the flow is shown in fig. 19.
The method comprises the following specific steps:
judging whether the mode state flag bit Model is equal to 0;
if model=0, the current mode is the parameter setting mode; enabling the timer 1 and closing the timer 2 with the timing time of 2 s; determining the number of timer_R of Timer overflow interruption according to the pulse frequency, wherein the number of timer_R is 3 times of the pulse frequency so as to realize the pulse duration of 1 s; when the number of timer_C of Timer overflow interruption is not smaller than timer_R, resetting timer_C, closing Timer 1, and enabling Timer 2; timer 2 times 2s and interrupt service enables timer 1. The 1s pulse generation flow is shown in fig. 21. If the Model is not equal to 0, setting ParSet to 0, and prohibiting parameter setting; the parameter setting mode timer 1 interrupts the service flow as shown in fig. 20.
Judging whether the mode state flag bit Model is equal to 1;
if model=1, the current mode is the myoelectric modulation mode; setting ParSet to 0, which indicates that parameter setting is forbidden; enabling the timer 1 and closing the timer 2 with the timing time of 2 s; determining the number of pulse width change times in 1s according to the pulse frequency, changing the pulse width after outputting a pulse with a complete period, and calculating a specific value through a threshold value and a tolerance value; when the number of timer_C of Timer overflow interruption is not smaller than timer_R, resetting timer_C, closing Timer 1, and starting Timer 2; timer 2 times 2s and interrupt service enables timer 1. When the Timer overflow interrupt number timer_c is smaller than timer_r, the H-bridge control parameter is recalculated once every three interrupts. The myoelectric modulation mode timer 1 interrupts the service flow as shown in fig. 21.
If the Model is not equal to 1, the current mode is the adaptive mode; setting ParSet to 0, which indicates that parameter setting is forbidden; enabling a timer 3 and a timer 1, wherein the timing time of the timer 1 is 2s, and the timer 3 is 10ms; the timer 3 interrupts service to collect an angular velocity signal, and converts the angular velocity into a control H-bridge control parameter (pulse width) through an adaptive myoelectricity modulation algorithm; the H-bridge control parameters are recalculated according to the angular velocity signal after outputting a complete pulse so as to realize the self-adaptive adjustment of the output intensity.
The self-adaptive control algorithm is implemented in the interrupt service of the timer 3, and the flow is shown in fig. 22, and the specific steps are as follows: after the timer interrupt is generated, closing the timer; array gyro [ N ]]Storing angular velocity signals at the current moment and the first N moments, calculating an output value of an implicit layer by using a weight threshold of the implicit layer, calculating the output value by using the weight threshold of the output layer to obtain an electromyographic signal predicted value EMG, and obtaining a formula F according to the following formula t = (sat-thr) ·emg+thr calculate H-bridge control parameter (high level duration, i.e. pulse width); a timer is started.
(5) Closing output instruction
When the processor receives the instruction of closing output, all timers are closed, the boosting is closed, and the H bridge is blocked to stop the output of the pulse. If the ParSet=0, the ParSet is set to 1 when an instruction to close the output is received.
3. Android APP
The device realizes data transmission with the smart phone through Bluetooth and instruction control of the smart phone to the device, and the specific steps of the operation flow are as follows:
installing an android APP by a user;
after a user wears the device and turns on a power switch, bluetooth pairing is carried out;
the user inputs a user name and a password for registration and login;
the user clicks an 'open output' button on the screen, and the button adopts a switch button (ToggleButton) which becomes an 'close output' button after clicking;
the user sets the parameters to increase and decrease the amplitude and pulse width. The user determines the threshold and tolerance values by increasing and decreasing the pulse width;
the user clicks the "close output" button;
the user clicks a parameter setting mode, an myoelectricity modulation mode and an adaptive mode button selection mode;
the user clicks the "open output" button;
the user clicks the output closing button after finishing the use;
and the user exits the android APP, and the user parameter set value and the angular velocity data thereof are automatically stored in the background.
The present invention is not limited to the best mode, any person can obtain other various types of functional electric stimulation instruments capable of adaptively adjusting the output intensity and control methods thereof under the teaching of the present invention, and all equivalent changes and modifications made according to the scope of the present invention should be covered by the present invention.

Claims (5)

1. A functional electrical stimulation apparatus capable of adaptively adjusting output intensity, comprising: and the processor is respectively connected with the processor: the device comprises a Bluetooth communication module, an angular velocity acquisition module, a power module, a boosting module and a pulse output module; the power supply module is connected with the pulse output module through the boosting module; the Bluetooth communication module is connected with the intelligent mobile phone, and takes the intelligent mobile phone as an upper computer to control instructions of the instrument; the instrument receives a control instruction of the smart phone, and then adjusts the stimulation parameters and outputs bipolar constant current pulses in real time through the processor;
the processor is an STM32 microprocessor; the power module comprises a lithium battery, a USB charging circuit and a voltage conversion circuit which are connected with the lithium battery;
the boosting module comprises a primary boosting circuit connected with the lithium battery, a secondary boosting circuit connected with the primary boosting circuit, a DAC (digital-to-analog converter) connected with the primary boosting circuit, and a digital potentiometer connected with the secondary boosting circuit, wherein the DAC and the digital potentiometer are also respectively connected to the processor;
the pulse output module comprises an H-bridge circuit connected with the secondary boost circuit and a constant current output circuit connected with the H-bridge circuit, and the H-bridge circuit and the constant current output circuit are also respectively connected to the processor;
The processor receives data sent by the smart phone through a serial port interrupt service subprogram, the STM32 receives data of a character received by a register to generate serial port interrupt once, and the data is read into the STM32, wherein the serial port interrupt comprises amplitude adjustment, pulse width adjustment, mode selection, start and stop output instructions; then, according to the data received by the serial port interrupt, calculating a boosting parameter or an H bridge control parameter and setting a corresponding timer interrupt, wherein the boosting parameter comprises a primary boosting parameter and a secondary boosting parameter, and the H bridge control parameter comprises time corresponding to the output high-low level;
the mode selection includes 3 modes of operation: parameter setting mode, myoelectric modulation mode and adaptive mode; when the processor receives the mode selection instruction, executing the subsequent steps according to the corresponding instruction, wherein the initial mode state mark is model=0 and represents a parameter setting mode; an initial parameter setting flag bit set=1, which indicates that parameter setting can be performed;
the method comprises the following specific steps:
receiving a parameter setting mode instruction:
the mode state flag bit Model is set to 0, and the parameter setting flag bit ParSet=1 indicates that parameter setting can be performed, including output amplitude and pulse width adjustment; the output mode of the parameter setting mode is to output 1s pulse, stop 2s, and repeat the above steps; the pulse width and amplitude of the output pulse are the current set value;
And receiving an myoelectricity modulation mode instruction:
the mode state flag bit Model is set to 1, which indicates that the myoelectricity modulation mode is currently adopted; simultaneously calculating pulse width values in an output period according to the stored threshold value and tolerance value information, wherein the number of the pulse width values is f, and the pulse width values are stored as an array PW [ f ], and f is pulse output frequency; the myoelectricity modulation mode is output in a pulse mode of 1s, 2s is stopped, then 1s pulse is output, 2s is stopped, and the operation is repeated; the amplitude of the output pulse is a set value, and the pulse width is changed f times within 1s according to the array PW [ f ];
receiving an adaptive mode instruction:
the mode status flag bit Model is set to 2, indicating that the current adaptive mode is currently adopted; the output mode of the self-adaptive mode is whole-course output, and the acquired angular velocity is converted into pulse width according to the self-adaptive myoelectric modulation algorithm, so that pulses with the pulse width changing along with the change of the angular velocity are output;
when the processor receives the start output instruction, the different timers are enabled to interrupt and control the start of different output modes through parameters, and the specific steps are as follows:
judging whether the mode state flag bit Model is equal to 0:
if model=0, the current mode is the parameter setting mode; enabling the timer 1 and closing the timer 2 with the timing time of 2 s; determining the number of timer_R of Timer overflow interruption according to the pulse frequency, wherein the number of timer_R is 3 times of the pulse frequency so as to realize the pulse duration of 1 s; when the number of timer_C of Timer overflow interruption is not smaller than timer_R, resetting timer_C, closing Timer 1, and enabling Timer 2; the timing time of the timer 2 is 2s, and the interrupt service is the enabling timer 1; if the Model is not equal to 0, setting ParSet to 0, and prohibiting parameter setting;
Judging whether the mode state flag bit Model is equal to 1;
if model=1, the current mode is the myoelectric modulation mode; setting ParSet to 0, which indicates that parameter setting is forbidden; enabling the timer 1 and closing the timer 2 with the timing time of 2 s; the interrupt service of the timer 1 is the interrupt service of controlling H bridge parameters in pulse width adjustment instructions to generate bipolar rectangular pulses, the number of pulse width change times in 1s is determined according to pulse frequency, the pulse width is changed after a pulse with a complete period is output, and a specific value is obtained through calculation of a threshold value and a tolerance value; when the number of timer_C of Timer overflow interruption is not smaller than timer_R, resetting timer_C, closing Timer 1, and starting Timer 2; the timing time of the timer 2 is 2s, and the interrupt service is the enabling timer 1; when the number of timer_C of Timer overflow interruption is smaller than timer_R, recalculating an H-bridge control parameter once every three interruption;
if the Model is not equal to 1, the current mode is the adaptive mode; setting ParSet to 0, which indicates that parameter setting is forbidden; enabling timer 3 and timer 1; the timer 3 interrupts service to collect angular velocity signals and converts the angular velocity into control H-bridge control parameters through an adaptive control algorithm; the timer 1 interrupt service is the interrupt service for controlling the H-bridge parameter in the pulse width adjustment instruction to generate bipolar rectangular pulses; recalculating H-bridge control parameters according to the angular speed signals after outputting a pulse with a complete period to realize self-adaptive adjustment of output intensity;
The self-adaptive control algorithm is realized in the interrupt service of the timer 3, and comprises the following specific steps: after the timer interrupt is generated, closing the timer; array gyro [ N ]]Storing angular velocity signals at the current moment and the first N moments, calculating an output value of an hidden layer by using a weight threshold of the hidden layer, calculating the output value by using the weight threshold of the output layer to obtain an electromyographic signal predicted value EMG, and electrically stimulating the output intensity F according to a formula t = (sat-thr) ·emg+thr calculate H-bridge control parameter, i.e. high level duration, i.e. pulse width; starting a timer; wherein thr and sat are a threshold value and a tolerance value set by a user, respectively;
when the processor receives the instruction of closing output, all timers are closed, the boosting is closed, and the H bridge is blocked so as to stop the output of the pulse; if the ParSet=0, the ParSet is set to 1 when an instruction to close the output is received.
2. The method for controlling a functional electrical stimulation apparatus capable of adaptively adjusting output intensity according to claim 1, wherein:
the control flow comprises the following specific steps:
step S1: after the processor is electrified and initialized, judging whether a mark Start generated after the serial port receives an opening output instruction through the Bluetooth module is 1, if the mark Start is not equal to 1, outputting no pulse until the mark Start=1, and executing the subsequent steps;
Step S2: performing pulse parameter initialization operation and outputting initial pulses;
step S3: judging whether a mark received generated after the serial port receives a control instruction sent by the smart phone through the Bluetooth module is 1, if yes, continuing to output an initial pulse until the mark received=1, and executing the subsequent steps;
step S4: setting a mark received generated after the serial port receives a group of control instructions to 0, and executing corresponding steps by a processor according to the instructions; the smart phone sends control instructions through the APP, and the instructions comprise amplitude adjustment, pulse width adjustment, mode selection, starting and stopping output.
3. The method for controlling a functional electrical stimulation apparatus capable of adaptively adjusting output intensity according to claim 1, wherein: the output intensity of the instrument is adjusted in real time according to the shank angular velocity signal during walking through a self-adaptive control algorithm; the self-adaptive control algorithm calculates and outputs an electromyographic signal E by utilizing a BP neural network model through collecting angular velocity signals in real time t And apply the electromyographic signal E t Scaled to the electrical stimulation output intensity F t
4. The method for controlling a functional electrical stimulation apparatus capable of adaptively adjusting output intensity according to claim 1, wherein: according to the electromyographic signals in one gait cycle in the walking process of a healthy person, the output intensity is adjusted, so that the change rule of the output intensity in the output time is consistent with the change rule of the electromyographic signals in one gait cycle; the output stopping time is inserted between the output times, and the output intensity is adjusted by changing the pulse width.
5. The method for controlling a functional electrical stimulation apparatus capable of adaptively adjusting output intensity according to claim 1, wherein:
the amplitude adjustment instruction comprises an amplitude increasing instruction and an amplitude decreasing instruction, after the processor receives the amplitude adjustment instruction, the current amplitude is calculated, primary boost parameters and secondary boost parameters are calculated according to the amplitude, and a DAC converter of the boost unit and a register of the digital potentiometer are configured through an I2C interface of the STM32 processor; the amplitude adjustment flow comprises the following specific steps:
calculating a load resistance Resistor; judging whether the Resistor is between 900 and 4000; if yes, continuing to execute the subsequent steps, and if not, not configuring the boosting parameters; when the Resistor is between 900 and 4000, judging whether the amplitude value tar=amp is larger than 12V, if the amplitude value is smaller than or equal to 12V, setting a flag bit EaState for starting secondary boost to be 0, and indicating that secondary boost is not performed; simultaneously calculating the parameter of an input end CH1_ADJ2 of an adding circuit in the primary booster circuit, thereby controlling the output voltage of the primary booster circuit; if the amplitude is greater than 12V, setting EaState to 1, and carrying out secondary boosting; setting the parameter of an addition circuit input end CH 1-ADJ 2 in the primary booster circuit to 0, and simultaneously calculating the parameter of a digital potentiometer in the secondary booster circuit, so as to control the output voltage of the secondary booster circuit;
The pulse width adjustment instruction comprises an increase pulse width and a decrease pulse width, and after the processor receives the pulse width adjustment instruction, the pulse width is calculated, and the control parameters of the H bridge circuit, namely the timing time of high and low levels, are calculated according to the pulse width; the pulse width adjustment and pulse generation process comprises the following specific steps:
after the timer interrupt is generated, closing the timer; setting the timing time of a timer and a pulse state mark according to the current pulse state mark, wherein the initial state mark is CH_INIT; when the state mark is CH_INIT, the processor calculates HIGH-low level duration according to the received regulating instruction, the timer sets the HIGH-level duration, the state mark is changed into CLTP_HIGH, and the timer is started to output forward pulse; after the timer interrupt is generated, closing the timer; when the state mark is CLTP_HIGH, the timer sets low-level delay time, outputs low level, then the timer sets HIGH-level duration, the state mark is changed into CLTN_HIGH, and the timer is started to output negative-going pulses; after the timer interrupt is generated, closing the timer; when the state flag is CLTN_HIGH, the timer sets the duration of the LOW level, the state flag is changed to HOLD_LOW, the timer is started, and the LOW level is output; after the timer interrupt is generated, closing the timer; when the state mark is HOLD_LOW, the processor calculates HIGH-LOW level duration according to the received regulating instruction, the timer sets the HIGH-level duration, the state mark is changed into CLTP_HIGH, and the timer is started to output forward pulse; and then repeat Meanwhile, when the state mark is CLTP_HIGH or CLTN_HIGH, judging whether the current count value of the timer is smaller than T, wherein T is smaller than and is close to a timer set value; when the current count value of the timer is smaller than T, sampling the load current through the AD module, and outputting the load current I f And setting a current I r Comparing to obtain a current deviation value delta I, wherein delta I=I f -I r The method comprises the steps of carrying out a first treatment on the surface of the The digital potentiometer is finely adjusted according to the deviation value delta I, when delta I is more than 0, the resistance value of the digital potentiometer is increased, and the output voltage of the booster circuit is reduced, so that the load current is reduced; when delta I is less than 0, the resistance of the digital potentiometer is reduced, and the output voltage of the booster circuit is increased, so that the load current is increased; then returning to continue to execute the current step until the current count value of the timer is greater than T, and exiting the timer interrupt service; to ensure the periodic integrity of the output pulse, the high-LOW duration can be changed only when the status flag bit is hold_low; the low-level delay time is a dead time reserved for the positive and negative pulses not to jump, which is different from the low-level duration.
CN202110556392.XA 2021-05-21 2021-05-21 Functional electric stimulation instrument capable of adaptively adjusting output intensity and control method thereof Active CN113332597B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110556392.XA CN113332597B (en) 2021-05-21 2021-05-21 Functional electric stimulation instrument capable of adaptively adjusting output intensity and control method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110556392.XA CN113332597B (en) 2021-05-21 2021-05-21 Functional electric stimulation instrument capable of adaptively adjusting output intensity and control method thereof

Publications (2)

Publication Number Publication Date
CN113332597A CN113332597A (en) 2021-09-03
CN113332597B true CN113332597B (en) 2023-08-15

Family

ID=77470549

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110556392.XA Active CN113332597B (en) 2021-05-21 2021-05-21 Functional electric stimulation instrument capable of adaptively adjusting output intensity and control method thereof

Country Status (1)

Country Link
CN (1) CN113332597B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114652961A (en) * 2022-04-01 2022-06-24 山东海天智能工程有限公司 Adjustable electrical stimulation walking aid instrument
CN115227971B (en) * 2022-07-28 2023-11-24 喻鹏铭 Autonomic nerve electric stimulator
CN117205442B (en) * 2023-09-18 2024-04-23 易集康健康科技(杭州)有限公司 Control method and system of radio frequency pulse transmitting module

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107596560A (en) * 2017-10-18 2018-01-19 福州大学 A kind of control method of the foot drop walking assisting instrument based on angular velocity signal
CN109011142A (en) * 2018-06-19 2018-12-18 重庆邮电大学 A kind of portable electric stimulation instrument based on 1/f wave theory
CN109276806A (en) * 2018-11-09 2019-01-29 福州大学 The wearable constant current output device and control method that stimulus intensity can adjust in real time
CN209378308U (en) * 2018-11-09 2019-09-13 福州大学 The wearable constant current output device that stimulus intensity can adjust in real time

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11253182B2 (en) * 2018-05-04 2022-02-22 Cadwell Laboratories, Inc. Apparatus and method for polyphasic multi-output constant-current and constant-voltage neurophysiological stimulation

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107596560A (en) * 2017-10-18 2018-01-19 福州大学 A kind of control method of the foot drop walking assisting instrument based on angular velocity signal
CN109011142A (en) * 2018-06-19 2018-12-18 重庆邮电大学 A kind of portable electric stimulation instrument based on 1/f wave theory
CN109276806A (en) * 2018-11-09 2019-01-29 福州大学 The wearable constant current output device and control method that stimulus intensity can adjust in real time
CN209378308U (en) * 2018-11-09 2019-09-13 福州大学 The wearable constant current output device that stimulus intensity can adjust in real time

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
可实时调整刺激参数的功能性电刺激仪的研制;丁建华等;福州大学学报(自然科学版);第47卷(第6期);759-764 *

Also Published As

Publication number Publication date
CN113332597A (en) 2021-09-03

Similar Documents

Publication Publication Date Title
CN113332597B (en) Functional electric stimulation instrument capable of adaptively adjusting output intensity and control method thereof
CN106377837A (en) Functional muscle electrical stimulation walk-assisting device based on gait recognition and control method
CN215309710U (en) Functional electrical stimulation instrument capable of adaptively adjusting output intensity
CN109276806B (en) Wearable constant-current output device with real-time adjustable stimulation intensity and control method
Ilic et al. A programmable electronic stimulator for FES systems
CN108392302A (en) A kind of ankle foot distortion rectification device and its control method
US20140128939A1 (en) Functional electrical stimulation (fes) method and system to improve walking and other locomotion functions
US20150100107A1 (en) Electrical stimulation for a functional electrical stimulation system
Chen et al. Combining vibrotactile feedback with volitional myoelectric control for robotic transtibial prostheses
WO2021047100A1 (en) Adaptive electrical stimulation training system
Bulea et al. Finite state control of a variable impedance hybrid neuroprosthesis for locomotion after paralysis
CN102580240A (en) Electrical stimulation walking-assisting device and output control method thereof
CN114760971A (en) Method and apparatus for providing resistance to a user of a wearable device
CN209378308U (en) The wearable constant current output device that stimulus intensity can adjust in real time
CN104398326A (en) Electrical stimulation muscle electric inducing feedback control method and device for stabilizing output of muscle electric prosthetic hand strength
Chen et al. Promise of using surface EMG signals to volitionally control ankle joint position for powered transtibial prostheses
Basith et al. Embedded fuzzy logic controller for functional electrical stimulation system
Simcox et al. A portable, 8-channel transcutaneous stimulator for paraplegic muscle training and mobility--a technical note.
Arrofiqi et al. Design of wearable system for closed-loop control of gait restoration system by Functional Electrical Stimulation
CN108309308B (en) A kind of apparatus and system for teaching cardiovascular disease athletic rehabilitation
CN115779266A (en) Rehabilitation treatment evaluation system combining functional electrical stimulation device with CPM (continuous phase modulation) rehabilitation device
Hu et al. Stiffness optimal modulation of a variable stiffness energy storage hip exoskeleton and experiments on its assistance effect
CN114344720A (en) Wearable functional electrical stimulation system with myoelectric signals as control switch
CN107596560A (en) A kind of control method of the foot drop walking assisting instrument based on angular velocity signal
CN114618082A (en) Apparatus for electrical stimulation and electric field therapy and circuit thereof

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant