CN113506607A - Portable stroke rehabilitation training system and method based on raspberry pi - Google Patents

Portable stroke rehabilitation training system and method based on raspberry pi Download PDF

Info

Publication number
CN113506607A
CN113506607A CN202110471468.9A CN202110471468A CN113506607A CN 113506607 A CN113506607 A CN 113506607A CN 202110471468 A CN202110471468 A CN 202110471468A CN 113506607 A CN113506607 A CN 113506607A
Authority
CN
China
Prior art keywords
electroencephalogram
hand
raspberry
line
training
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.)
Pending
Application number
CN202110471468.9A
Other languages
Chinese (zh)
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.)
University of Shanghai for Science and Technology
Original Assignee
University of Shanghai for Science and Technology
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 University of Shanghai for Science and Technology filed Critical University of Shanghai for Science and Technology
Priority to CN202110471468.9A priority Critical patent/CN113506607A/en
Publication of CN113506607A publication Critical patent/CN113506607A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16HHEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
    • G16H20/00ICT specially adapted for therapies or health-improving plans, e.g. for handling prescriptions, for steering therapy or for monitoring patient compliance
    • G16H20/70ICT specially adapted for therapies or health-improving plans, e.g. for handling prescriptions, for steering therapy or for monitoring patient compliance relating to mental therapies, e.g. psychological therapy or autogenous training
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/72Signal processing specially adapted for physiological signals or for diagnostic purposes
    • A61B5/7235Details of waveform analysis
    • A61B5/725Details of waveform analysis using specific filters therefor, e.g. Kalman or adaptive filters
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/72Signal processing specially adapted for physiological signals or for diagnostic purposes
    • A61B5/7235Details of waveform analysis
    • A61B5/7264Classification of physiological signals or data, e.g. using neural networks, statistical classifiers, expert systems or fuzzy systems
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/72Signal processing specially adapted for physiological signals or for diagnostic purposes
    • A61B5/7235Details of waveform analysis
    • A61B5/7264Classification of physiological signals or data, e.g. using neural networks, statistical classifiers, expert systems or fuzzy systems
    • A61B5/7267Classification of physiological signals or data, e.g. using neural networks, statistical classifiers, expert systems or fuzzy systems involving training the classification device
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2218/00Aspects of pattern recognition specially adapted for signal processing
    • G06F2218/12Classification; Matching

Landscapes

  • Health & Medical Sciences (AREA)
  • Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Psychiatry (AREA)
  • Public Health (AREA)
  • Medical Informatics (AREA)
  • Molecular Biology (AREA)
  • Biomedical Technology (AREA)
  • Pathology (AREA)
  • Heart & Thoracic Surgery (AREA)
  • Signal Processing (AREA)
  • Surgery (AREA)
  • Biophysics (AREA)
  • Animal Behavior & Ethology (AREA)
  • Veterinary Medicine (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physiology (AREA)
  • Fuzzy Systems (AREA)
  • Mathematical Physics (AREA)
  • Evolutionary Computation (AREA)
  • Primary Health Care (AREA)
  • Epidemiology (AREA)
  • Social Psychology (AREA)
  • Psychology (AREA)
  • Hospice & Palliative Care (AREA)
  • Developmental Disabilities (AREA)
  • Child & Adolescent Psychology (AREA)
  • Measurement And Recording Of Electrical Phenomena And Electrical Characteristics Of The Living Body (AREA)
  • Rehabilitation Tools (AREA)

Abstract

The invention discloses a raspberry pi-based portable stroke rehabilitation training system and method. The system comprises an electroencephalogram cap, a signal amplifier, a multi-parameter synchronizer, a raspberry pi 3B + and a pneumatic hand, wherein the raspberry pi 3B + comprises a user interaction interface, acquisition software, an MI-EEG offline decoding modeling unit and an MI-EEG online identification unit; and playing the video to guide the user to carry out off-line left-right hand motor imagery training, transmitting the acquired data to acquisition software through a router together with a synchronizing signal of the multi-parameter synchronizer after the acquired data is amplified by a signal amplifier, and then decoding the data and establishing a model by an MI-EEG off-line decoding modeling unit. And finally, wearing the pneumatic hand for the user and carrying out an online VR motor imagery task, carrying out online classification and identification on the acquired data by an MI-EEG online identification unit, and controlling the pneumatic hand to drive the hand of the patient to move according to a classification result, thereby achieving the purpose of carrying out rehabilitation training on the user.

Description

Portable stroke rehabilitation training system and method based on raspberry pi
Technical Field
The invention relates to the technical field of bioelectrical signal processing, in particular to a raspberry pi-based portable stroke rehabilitation training system and method.
Background
With the accelerating of social aging and urbanization processes, unhealthy life styles of residents are popular, the stroke disease burden in China is in a explosive growth situation, and the trends of rapid growth of low-income crowds, obvious gender and region difference and youthfulness are presented. The Chinese stroke prevention and treatment report 2019 states that: at present, about 1318 million stroke patients with age of more than 40 years old in China are in increasing numbers every year, and about 190 million people die of stroke every year. Stroke causes various difficulties in the life of the patient, including a more poor health condition, lower educational acceptability, poorer economic participation, higher poverty rate, higher dependence, and the like.
The current cerebral apoplexy rehabilitation mode mainly comprises the following steps: the electric stimulation is used for stimulating the muscles of the affected part of the patient, and the mechanical contraction movement is used for driving the limbs of the affected part of the patient to perform rehabilitation movement, professional medical rehabilitation massage and the like. Most of the current rehabilitation training modes are passive modes, and the training system is huge. Therefore, the current situation that the postoperative rehabilitation effect of the stroke patient is poor is caused.
Disclosure of Invention
The invention aims to provide a raspberry pie-based portable stroke rehabilitation training system and a method, aiming at the defects of the prior art, the system is simple and convenient to use and carry, can decode the intention of a patient, controls a pneumatic hand, and realizes the operation of the pneumatic hand, so that the training effect of the patient is achieved, and the postoperative rehabilitation effect of the stroke patient is improved.
In order to achieve the purpose, the technical scheme of the invention is as follows:
the invention relates to a portable stroke rehabilitation training system based on a raspberry pi, which comprises an electroencephalogram cap, a signal amplifier, a multi-parameter synchronizer, a raspberry pi 3B + and a pneumatic hand, wherein the raspberry pi 3B + comprises a user interaction interface, acquisition software, an MI-EEG offline decoding modeling unit and an MI-EEG online identification unit, the electroencephalogram cap is connected with the signal amplifier in a serial port mode, the signal amplifier is connected with the raspberry pi 3B + in a wireless mode, and the multi-parameter synchronizer and the pneumatic hand are connected with the raspberry pi 3B + through a USB serial port;
the electroencephalogram cap is used for acquiring an off-line training electroencephalogram signal when a patient performs left-hand and right-hand motor imagery according to guidance of a user interaction interface, and acquiring an on-line testing electroencephalogram signal when the patient performs the left-hand and right-hand motor imagery according to feedback of the user interaction interface;
the signal amplifier is used for amplifying the off-line training electroencephalogram signal to generate an off-line training electroencephalogram amplifying signal and amplifying the on-line testing electroencephalogram signal to generate an on-line testing electroencephalogram signal;
the multi-parameter synchronizer is used for marking off-line training synchronous label information and on-line testing synchronous label information;
user interaction interface in the raspberry pi 3B +: for guiding the patient to perform a left-right hand motor imagery;
the collection software in the raspberry pi 3B +: the electroencephalogram cap is used for acquiring an off-line training electroencephalogram signal and an on-line testing electroencephalogram signal sent by the electroencephalogram cap;
an MI-EEG offline decoding modeling unit in the raspberry pi 3B +: the system is used for extracting features of the off-line training data by adopting a common space mode CSP algorithm, classifying the features and known labels by adopting a Support Vector Machine (SVM) algorithm and establishing a stroke rehabilitation training model;
the MI-EEG online identification unit in the raspberry Pi 3B +: after the online data is subjected to feature extraction by using a CSP algorithm, classification and recognition are performed on the features and a stroke rehabilitation training model established by offline training by using an SVM algorithm, and a prediction label is output, wherein the prediction label comprises: the patient imagines the left hand, the patient imagines the right hand;
the raspberry pi 3B + is also used for: converting the predicted label into a control instruction and sending the control instruction to a pneumatic hand;
the pneumatic hand is used for receiving a control instruction and driving the hand of the patient to move according to the control instruction.
Preferably, the system also comprises a user interactive interface, a router, acquisition software, an MI-EEG offline decoding modeling unit and an MI-EEG online identification unit. The raspberry pi 3B + is a microcomputer and comprises a user interaction interface, acquisition software, an MI-EEG offline decoding modeling unit and an MI-EEG online identification unit; the electroencephalogram cap adopts a Boruikang 64 conduction and wetting electrode cap, a patient needs to make an electroencephalogram paste, the electroencephalogram signal can be collected, and the electroencephalogram cap is wirelessly connected with a raspberry pi 3B + after being combined with a signal amplifier; the multi-parameter synchronizer adopts a Borui-Kan serial-port multi-parameter synchronizer to synchronously mark the label signals; the pneumatic hand is in wired connection with the raspberry Pi 3B + and is communicated by a UDP protocol.
A portable stroke rehabilitation training system and method based on raspberry pi is characterized by comprising the following operation steps:
(1) the professional helps the user to wear the electroencephalogram cap and connect the signal amplifier;
(2) starting acquisition software and connecting a multi-parameter synchronizer;
(3) opening a user interaction interface;
(4) and (4) performing off-line training, wherein when the user interaction interface off-line system is started, the patient performs left-hand and right-hand motor imagery according to video guidance. Meanwhile, the electroencephalogram cap collects electroencephalogram signals, and the electroencephalogram signals and the synchronous label signals are transmitted to collection software at a 3B + end of the raspberry group in a wireless mode after being amplified by the signal amplifier;
(5) the MI-EEG off-line decoding modeling unit uses CSP and SVM algorithms to model off-line data stored by acquisition software;
(6) and performing on-line test, and when the on-line system of the user interaction interface is started, performing left-hand and right-hand motor imagery by the patient according to the VR task. Meanwhile, the electroencephalogram cap collects electroencephalogram signals, and the electroencephalogram signals and the synchronous label signals are transmitted to collection software at a 3B + end of the raspberry group in a wireless mode after being amplified by the signal amplifier;
(7) the MI-EEG online identification unit uses CSP and SVM algorithms to classify and identify data forwarded by the acquisition software in real time, and finally outputs a prediction label, namely whether the patient imagines the left hand or the right hand;
(8) the raspberry Pi 3B + converts the online identification result into a control instruction and sends the control instruction to the pneumatic hand to control the movement of the pneumatic hand;
in the step (3), the user interaction interface comprises 4 sub-interfaces, and the starting interface is mainly used for personnel information registration and online task selection; the parameter setting interface can be used for adjusting the operation parameters of the functional modules and controlling the operation state of each functional module, and is the interface with the highest interaction frequency in the system. Each step of operation and the corresponding operation result of the page are displayed in the state display bar, so that the working condition of the system can be mastered in time; and after the start button is clicked, the two auxiliary interfaces in the main interface are automatically jumped, and the two auxiliary interfaces are respectively used for displaying a video guide interface for off-line training and a VR feedback interface for on-line testing.
And (4) performing left-right hand motor imagery by the patient according to video guidance. Meanwhile, the electroencephalogram cap collects electroencephalogram signals, the electroencephalogram signals are amplified by the signal amplifier and then transmitted to collection software at the 3B + end of the raspberry pi together with the synchronous label signals in a wireless mode.
The MI-EEG off-line decoding modeling unit in the step (5) uses CSP and SVM algorithms to model off-line data stored by acquisition software, and the steps are as follows:
(1) preprocessing and filtering the original data;
(2) carrying out diagonalization on the two types of electroencephalogram signal covariance matrixes simultaneously to find an optimal group of spatial filters;
(3) the electroencephalogram data are projected through the optimal spatial filter, so that variance difference values of two types of EEG signals can be extremely large, and the feature extraction of the electroencephalogram data is realized;
(4) the optimal hyperplane is found, and classification is carried out by combining a known label and the extracted electroencephalogram characteristic electroencephalogram data to generate a corresponding model;
and selecting an optimal model for online testing according to the algorithm modeling result.
And (6) when the online system of the user interaction interface is started, the patient performs left-hand and right-hand movement imagination according to the VR task. Meanwhile, the electroencephalogram cap collects electroencephalogram signals, and the electroencephalogram signals and the synchronous label signals are transmitted to collection software at a 3B + end of the raspberry pi in a wireless mode after being amplified by the signal amplifier;
in the step (7), the MI-EEG online identification unit uses CSP and SVM algorithms to classify and identify the data forwarded by the acquisition software in real time, and finally outputs a prediction label, namely, whether the patient imagines the left hand or the right hand, and the steps are as follows:
(1) preprocessing and filtering the original data;
(2) carrying out diagonalization on the two types of electroencephalogram signal covariance matrixes simultaneously to find an optimal group of spatial filters;
(3) the electroencephalogram data are projected through the optimal spatial filter, so that variance difference values of two types of EEG signals can be extremely large, and the feature extraction of the electroencephalogram data is realized;
(4) through searching an optimal hyperplane, classifying by combining a training model and the extracted electroencephalogram characteristic electroencephalogram data, and outputting a prediction label, namely, whether the patient imagines right-handed or left-handed movement;
in the step (8), the raspberry pi 3B + converts the online identification result into a control instruction and sends the control instruction to the pneumatic hand to control the movement of the pneumatic hand;
compared with the prior art, the invention has the following obvious prominent substantive characteristics and obvious advantages:
1. the invention provides a raspberry-pie-based portable stroke rehabilitation training system and a method, which have the basic principle that a patient carries out left-hand and right-hand motor imagery training through video guidance when leaving a line, an electroencephalogram cap collects electroencephalograms of the patient at the moment, transmits the electroencephalograms to an MI-EEG (MI-EEG) offline decoding modeling unit at a raspberry pie end in a wireless mode, carries out filtering and algorithm analysis, and establishes a model for online testing;
2. when the VR motor imagery task is tested on line, the electroencephalogram cap collects electroencephalogram signals of a patient in real time, transmits the electroencephalogram signals to the MI-EEG online identification unit at the raspberry sending end in a wireless mode, carries out filtering and algorithm analysis to obtain a prediction label, namely, the patient wants to move like a left hand or a right hand and feeds back the prediction label, and the system controls the pneumatic hand according to a feedback result;
3. the rehabilitation system is simple to use and convenient to carry, the intention of a patient can be decoded by extracting the characteristics of the electroencephalogram signals and performing classification identification, the control command is output to control the pneumatic hand, the operation of the patient on the pneumatic hand through brain control is realized, the effect of performing active rehabilitation training on the patient is further achieved, and the postoperative rehabilitation effect of the stroke patient is improved.
Drawings
FIG. 1 is a block diagram of the system architecture of the present invention.
FIG. 2 is a general experimental flow chart of the present invention.
FIG. 3 is a user interface of the present invention.
FIG. 4 is a user-interactive offline training video frame of the present invention. The left picture is a left-hand guide picture, and the right picture is a right-hand guide picture.
FIG. 5 is a user interaction online test VR screen of the present invention.
Detailed Description
The system is designed by adopting a brain-computer interface technology, a channel is established between the brain of a user and a raspberry group or other electronic equipment, actual limb behaviors do not exist, the limb actions are imagined by utilizing the brain idea, the interpretation of the brain intention is realized by an algorithm, and the subsequent actual operation is realized by a controller. Motor Image (MI), which is one of brain-computer interface technologies, is a typical mental task, and when a unilateral limb Motor image is performed, two rhythm signals with obvious changes are generated in the cerebral cortex, namely a Mu rhythm signal at 8-15Hz and a Beta rhythm signal at 18-24 Hz. Specifically, the phenomenon that the brain rhythm energy of the brain cortex is reduced to the lateral motor sensory cortex and the brain rhythm energy of the ipsilateral motor sensory area is increased is called event-related desynchronization (ERD) and event-related synchronization (ERS). On the basis, the electroencephalogram signal feature extraction and classification recognition are achieved, the intention of the patient can be decoded, and then the control command is output to control the pneumatic hand, namely the patient controls the pneumatic hand through the brain, and then the rehabilitation training effect is achieved. Effectively promotes the central nerve of the patient to be remodeled, reconstructs the cortex of the injured brain, repairs the function control connection between the external limbs and the brain of the patient, improves the motor function of the affected limbs and solves the problem of inconvenient life.
The invention will be further described with reference to preferred embodiments thereof, in conjunction with the accompanying drawings.
The first embodiment is as follows:
referring to fig. 1, a raspberry pi-based portable stroke rehabilitation training system includes: the device comprises an electroencephalogram cap 3, a signal amplifier 4, a multi-parameter synchronizer 7, a raspberry pi 3B + (1) and a pneumatic hand 10, wherein the raspberry pi 3B + (1) comprises a user interaction interface 2, acquisition software 6, an MI-EEG offline decoding modeling unit 8 and an MI-EEG online identification unit 9, the electroencephalogram cap 3 is connected with the signal amplifier 4 in a serial port mode, the signal amplifier 4 is connected with the raspberry pi 3B + (1) in a wireless mode, and the multi-parameter synchronizer 7 and the pneumatic hand 10 are connected with the raspberry pi 3B + (1) through a USB serial port;
the electroencephalogram cap 3: the system is used for collecting off-line training electroencephalogram signals when a patient carries out left-hand and right-hand motor imagery according to the guidance of the user interaction interface 2 and collecting on-line testing electroencephalogram signals when the patient carries out the left-hand and right-hand motor imagery according to the feedback of the user interaction interface 2;
the signal amplifier 4: the off-line training electroencephalogram signal is amplified to generate an off-line training amplified electroencephalogram signal, and the on-line testing electroencephalogram signal is amplified to generate an on-line testing amplified electroencephalogram signal;
the multi-parameter synchronizer 7: the system is used for marking off-line training synchronous label information and on-line testing synchronous label information;
user interaction interface 2 in raspberry pi 3B + (1): for guiding the patient to perform a left-right hand motor imagery;
the collecting software 6 in the raspberry pi 3B + (1): the electroencephalogram test system is used for collecting an off-line training electroencephalogram signal and an on-line testing electroencephalogram signal sent by the electroencephalogram cap 3;
the MI-EEG offline decoding modeling unit 8 in the Raspberry pie 3B + (1): the system is used for extracting features of the off-line training data by adopting a common space mode CSP algorithm, classifying the features and known labels by adopting a Support Vector Machine (SVM) algorithm and establishing a stroke rehabilitation training model;
MI-EEG online identification unit 9 in the raspberry pi 3B + (1): after feature extraction is performed on the online data by using a CSP algorithm, classification and recognition are performed on the features and a stroke rehabilitation training model established by the offline training by using an SVM algorithm, and a prediction label is output, wherein the prediction label comprises: the patient imagines the left hand, the patient imagines the right hand;
the raspberry pi 3B + (1) is also used for: converting the predicted label into a control instruction and sending the control instruction to the pneumatic hand 10;
the pneumatic hand 10: the hand motion control device is used for receiving a control instruction and driving the hand of a patient to move according to the control instruction.
The portable cerebral apoplexy rehabilitation training system based on the raspberry group of the embodiment is simple and convenient to use and convenient to carry, can decode the intention of a patient, controls the pneumatic hand, and realizes the pneumatic hand operation, thereby achieving the effect that the patient trains, and improving the postoperative rehabilitation effect of the cerebral apoplexy patient.
Example two:
this embodiment is substantially the same as the first embodiment, and is characterized in that:
the user interaction interface 2 comprises at least one of the following four sub-interfaces: a start interface, a parameter setting interface, a first auxiliary interface and a second auxiliary interface, wherein,
the starting interface is used for collecting personnel registration information and identifying an online task selection result;
the parameter setting interface is used for adjusting the operating parameters of the functional modules and controlling the operating state of each functional module;
the first auxiliary interface is used for displaying a video guide interface for off-line training;
and the second auxiliary interface is used for displaying the VR feedback interface of the online test.
During off-line training, feature extraction is carried out on the off-line training data by adopting a CSP algorithm, features and known labels are classified by adopting a Support Vector Machine (SVM) algorithm, and a stroke rehabilitation training model is established, wherein the algorithm implementation steps are as follows:
preprocessing and filtering the original data;
carrying out diagonalization on the two types of electroencephalogram signal covariance matrixes simultaneously to find an optimal group of spatial filters;
the electroencephalogram data are projected through the optimal spatial filter, so that variance difference values of two types of EEG signals can be extremely large, and the feature extraction of the electroencephalogram data is realized;
and (4) classifying by finding an optimal hyperplane and combining the known label and the extracted electroencephalogram characteristic electroencephalogram data to generate a corresponding model.
During on-line testing, after feature extraction is carried out on the on-line data by adopting a CSP algorithm, classification and identification are carried out on the features and a stroke rehabilitation training model established by off-line training by adopting an SVM algorithm, and a prediction label is output, wherein the prediction label comprises: the patient imagines the left hand, the patient imagines the right hand; the algorithm is realized by the following steps:
preprocessing and filtering the original data;
carrying out diagonalization on the two types of electroencephalogram signal covariance matrixes simultaneously to find an optimal group of spatial filters;
the electroencephalogram data are projected through the optimal spatial filter, so that variance difference values of two types of EEG signals can be extremely large, and the feature extraction of the electroencephalogram data is realized;
through finding an optimal hyperplane, classifying by combining a training model and extracted electroencephalogram characteristic electroencephalogram data, and outputting a prediction label, wherein the prediction label comprises: the patient imagines the left hand and the patient imagines the right hand.
The rehabilitation system in this embodiment is simple to use, and convenient to carry through the feature extraction and the categorised discernment that realize EEG signal, can decode out patient's intention, and the pneumatic hand of output control command control has realized the operation that the patient passes through the pneumatic hand of brain control promptly, and then reaches the effect of carrying out the initiative rehabilitation training to the patient to cerebral apoplexy patient postoperative is recovered the effect has been improved.
Example three:
a portable stroke rehabilitation training method based on a raspberry group is applied to a portable stroke rehabilitation training system based on the raspberry group, and is characterized by comprising the following operation steps:
1) acquiring an off-line training electroencephalogram signal and corresponding off-line training synchronous label information marked by a multi-parameter synchronizer when a patient carries out left-right hand motor imagery according to the guidance of a user interaction interface;
2) amplifying the off-line training electroencephalogram signal to generate an off-line training amplified electroencephalogram signal, and taking the off-line training amplified electroencephalogram signal and off-line training synchronous label information marked by the multi-parameter synchronizer as off-line training data;
3) performing feature extraction on the off-line training data by adopting a CSP algorithm, classifying the features and known labels by adopting an SVM algorithm, and establishing a stroke rehabilitation training model;
4) acquiring online test electroencephalogram signals and corresponding online test synchronous label information marked by a multi-parameter synchronizer when a patient carries out left-hand and right-hand motor imagery according to feedback of a user interaction interface;
5) amplifying the on-line test electroencephalogram signal to generate an on-line test amplified electroencephalogram signal, and taking the on-line test amplified electroencephalogram signal and the on-line test synchronous label information as on-line test data;
6) after feature extraction is carried out on the online data by adopting a CSP algorithm, classification and identification are carried out on the features and a stroke rehabilitation training model established by offline training by adopting an SVM algorithm, and a prediction label is output, wherein the prediction label comprises: the patient imagines the left hand, the patient imagines the right hand;
7) and converting the prediction label into a control instruction and sending the control instruction to the pneumatic hand so as to control the pneumatic hand to drive the hand of the patient to move.
When the method is used for testing the VR motor imagery task on line, the electroencephalogram cap collects electroencephalogram signals of a patient in real time, the electroencephalogram signals are transmitted to the MI-EEG online identification unit at the raspberry sending end in a wireless mode, filtering and algorithm analysis are carried out, a prediction label is obtained, namely the patient wants to move like a left hand or a right hand, feedback is carried out, and the system controls the pneumatic hand according to a feedback result.
Example four:
as shown in fig. 1, a portable stroke rehabilitation training system and method based on raspberry pi includes raspberry pi 3B +, a user interaction interface, an electroencephalogram cap, a signal amplifier, a router, acquisition software, a multi-parameter synchronizer, an MI-EEG offline decoding modeling unit, an MI-EEG online identification unit, and a pneumatic hand. The raspberry pi 3B + is a microcomputer and comprises a user interaction interface, acquisition software, an MI-EEG offline decoding modeling unit and an MI-EEG online identification unit; the electroencephalogram cap adopts a Borikang 64-lead wet electrode cap, a patient needs to make an electroencephalogram paste, the electroencephalogram signal can be acquired, and the electroencephalogram cap is wirelessly connected with a raspberry pie 3B + after being combined with a signal amplifier; the multi-parameter synchronizer adopts a Borui-Kan serial-port multi-parameter synchronizer to synchronously mark the label signals; the pneumatic hand is in wired connection with the raspberry pi 3B + and is communicated by a UDP protocol. The operation steps are as follows: firstly, a professional helps a user to wear the electroencephalogram cap and turn on the signal amplifier, then the acquisition software at the 3B + end of the raspberry pi is turned on, and the conductive paste is printed according to a real-time impedance diagram. And then opening a user interaction interface at the 3B + end of the raspberry pi, firstly performing information registration and parameter setting, then playing videos to guide a user to perform left-hand and right-hand Motor Imagery (MI), transmitting the acquired data to acquisition software through a router together with a synchronous signal of a multi-parameter synchronizer after the acquired data is amplified by a signal amplifier, and then decoding the data and establishing a model by an MI-EEG offline decoding modeling unit. And finally, wearing the pneumatic hand for the user and carrying out an online VR motor imagery task, carrying out online classification and identification on the acquired data by an MI-EEG online identification unit, and controlling the pneumatic hand to drive the hand of the patient to move according to a classification result, thereby achieving the purpose of carrying out rehabilitation training on the user (stroke patient).
As shown in fig. 2, an experimental process of a raspberry pi-based portable stroke rehabilitation training system and method is as follows: first, a professional helps a user to wear a good borekang 64-lead wet electrode cap and apply conductive paste. And secondly, opening a user interaction interface and acquisition software of the raspberry pie, and setting parameters. Then judging whether a model is established or not, if not, performing video-guided offline training, acquiring an electroencephalogram signal of a user at the moment by the electroencephalogram cap, amplifying the electroencephalogram signal by a signal amplifier, combining with a synchronous label signal, transmitting the amplified electroencephalogram signal to acquisition software at a raspberry sending end in a wireless mode, and modeling the offline data stored by the acquisition software by an MI-EEG offline decoding modeling unit; if online testing of VR task is carried out through modeling, the MI-EEG online identification unit carries out classification identification on data transmitted by the acquisition software in real time, and finally outputs a prediction label, namely that the patient imagines the left hand or the right hand, and converts the data into a control instruction to be sent to the pneumatic hand to control the pneumatic hand to drive the hand of the patient to move.
As shown in fig. 3, a user interactive interface of a raspberry-pie-based portable stroke rehabilitation training system and method includes 4 sub-interfaces, and a starting interface is mainly used for personnel information registration and online task selection; the parameter setting interface can be used for adjusting the operation parameters of the functional modules and controlling the operation state of each functional module, and is the interface with the highest interaction frequency in the system. Each step of operation and the corresponding operation result of the page are displayed in the state display bar, so that the working condition of the system can be mastered in time; and after the start button is clicked, the two auxiliary interfaces in the main interface realize automatic skip, and the two auxiliary interfaces are respectively used for displaying a video guide interface for off-line training and a VR feedback interface for on-line testing.
The electroencephalogram feature extraction adopts a Common Spatial Pattern (CSP) algorithm, and comprises the following steps:
suppose that the left and right hands of the training set contain n dials, respectively. Containing a single deal of data as EN*TWhere N is the number of channels and T includes the number of points. The CSP is realized by the following steps:
1) the covariance of each triel is calculated, trace (X) represents the trace of matrix X.
Figure BDA0003045571750000081
2) The average covariance C of the left and right hands is calculated separatelylAnd CrAnd mixed spatial covariance Cc
Figure BDA0003045571750000082
Figure BDA0003045571750000083
Cc=Cl+Cr
3) To CcPerforming eigenvalue decomposition, UcFor a matrix of eigenvectors, ΛcFor eigenvalue diagonal matrix:
Figure BDA0003045571750000084
4) constructing a whitening matrix P and a left-right hand corresponding spatial coefficient matrix Sl Sr
Figure BDA0003045571750000091
Sl=PClPT
Sr=PCrPT
5) For the whitened SlAnd SrAnd (3) carrying out characteristic value decomposition:
Sl=BΛlBT
Sr=BΛrBT
6) calculating a spatial filter matrix:
W=(BTP)T
EEG signal EN*TThrough WN*NFiltering, obtaining: zN*T=WN*NEN*T
7) The feature vector f is calculated. The maximum value of the dimension of f cannot exceed the number of electrode leads N. Extracting the front m rows and the back m rows of Z (2m < N):
Figure BDA0003045571750000092
var (X) represents the variance of the calculated sample X. The final result of CSP feature extraction is feature vector f ═ f1,f2,…,f2mWhere m is the chosen eigen logarithm. The variance between the front m dimension and the rear m dimension of the f and the signal of one class are respectively maximum, and the variance between the front m dimension and the rear m dimension of the f and the signal of the other class is minimum.
As shown in fig. 4, a raspberry pi-based portable stroke rehabilitation training system and method for user interactive offline training video frames. During off-line training, corresponding left and right hand training amounts are set according to needs, after training is started, the user interface jumps to an off-line system to play left and right hand guide videos, and a patient conducts off-line training according to the randomly played left and right hand guide pictures.
As shown in fig. 5, a raspberry pi-based portable stroke rehabilitation training system and method for testing VR pictures on line through user interaction. During online testing, the user interaction interface jumps to an online system sub-interface to play a VR task, for example, when a button VR task is pressed, the button is randomly lightened left and right during VR playing, a patient performs corresponding left and right hand movement imagination according to the lightening direction of the button, if the VR is successfully recognized, a hand in the corresponding direction in the VR presses the button, a 'praise' gesture is displayed to indicate that the recognition is successful, at the moment, the successfully recognized result is converted into a control instruction and sent to a pneumatic hand, the pneumatic hand drives the hand of the patient to move, and the patient is assisted in rehabilitation training; if the recognition is wrong, a 'crying face' is displayed, the hand in the corresponding direction in the VR does not press the button, and the instruction is not sent to the pneumatic hand.
The embodiments of the present invention have been described with reference to the accompanying drawings, but the present invention is not limited to the embodiments, and various changes and modifications can be made according to the purpose of the invention, and any changes, modifications, substitutions, combinations or simplifications made according to the spirit and principle of the technical solution of the present invention shall be equivalent substitutions, as long as the purpose of the present invention is met, and the present invention shall fall within the protection scope of the present invention without departing from the technical principle and inventive concept of the present invention.

Claims (5)

1. A portable stroke rehabilitation training system based on raspberry pi includes: brain electricity cap (3), signal amplifier (4), multi-parameter synchronizer (7), raspberry group 3B + (1) and pneumatic hand (10), its characterized in that: the raspberry pi 3B + (1) comprises a user interaction interface (2), acquisition software (6), an MI-EEG offline decoding modeling unit (8) and an MI-EEG online identification unit (9), the EEG cap (3) is connected with a signal amplifier (4) in a serial port mode, the signal amplifier (4) is connected with the raspberry pi 3B + (1) in a wireless mode, and the multi-parameter synchronizer (7) and the pneumatic hand (10) are connected with the raspberry pi 3B + (1) through a USB serial port;
the electroencephalogram cap (3): the system is used for collecting off-line training electroencephalogram signals when a patient carries out left-hand and right-hand motor imagery according to the guidance of the user interaction interface (2), and collecting on-line testing electroencephalogram signals when the patient carries out the left-hand and right-hand motor imagery according to the feedback of the user interaction interface (2);
the signal amplifier (4): the off-line training electroencephalogram signal is amplified to generate an off-line training amplified electroencephalogram signal, and the on-line testing electroencephalogram signal is amplified to generate an on-line testing amplified electroencephalogram signal;
the multi-parameter synchronizer (7): the system is used for marking off-line training synchronous label information and on-line testing synchronous label information;
user interaction interface (2) in raspberry pi 3B + (1): for guiding the patient to perform a left-right hand motor imagery;
the collection software (6) in the raspberry pi 3B + (1): the electroencephalogram test system is used for collecting an offline training electroencephalogram signal and an online test electroencephalogram signal sent by the electroencephalogram cap (3);
an MI-EEG offline decoding modeling unit (8) in the Raspberry pie 3B + (1): the system is used for extracting features of the off-line training data by adopting a common space mode CSP algorithm, classifying the features and known labels by adopting a Support Vector Machine (SVM) algorithm and establishing a stroke rehabilitation training model;
MI-EEG online identification unit (9) in raspberry pi 3B + (1): after feature extraction is performed on the online data by using a CSP algorithm, classification and recognition are performed on the features and a stroke rehabilitation training model established by the offline training by using an SVM algorithm, and a prediction label is output, wherein the prediction label comprises: the patient imagines the left hand, the patient imagines the right hand;
the raspberry pi 3B + (1) is also used for: converting the predicted label into a control instruction and sending the control instruction to a pneumatic hand (10);
the pneumatic hand (10): the hand motion control device is used for receiving a control instruction and driving the hand of a patient to move according to the control instruction.
2. The raspberry pi based portable stroke rehabilitation training system of claim 1, wherein: the user interaction interface (2) comprises at least one of the following four sub-interfaces: a start interface, a parameter setting interface, a first auxiliary interface and a second auxiliary interface, wherein,
the starting interface is used for collecting personnel registration information and identifying an online task selection result;
the parameter setting interface is used for adjusting the operating parameters of the functional modules and controlling the operating state of each functional module;
the first auxiliary interface is used for displaying a video guide interface for off-line training;
and the second auxiliary interface is used for displaying the VR feedback interface of the online test.
3. The raspberry pi based portable stroke rehabilitation training system of claim 1, wherein: during off-line training, feature extraction is carried out on the off-line training data by adopting a CSP algorithm, features and known labels are classified by adopting a Support Vector Machine (SVM) algorithm, and a stroke rehabilitation training model is established, wherein the algorithm implementation steps are as follows:
preprocessing and filtering the original data;
carrying out diagonalization on the two types of electroencephalogram signal covariance matrixes simultaneously to find an optimal group of spatial filters;
the electroencephalogram data are projected through the optimal spatial filter, so that variance difference values of two types of EEG signals can be extremely large, and the feature extraction of the electroencephalogram data is realized;
and (4) classifying by finding an optimal hyperplane and combining the known label and the extracted electroencephalogram characteristic electroencephalogram data to generate a corresponding model.
4. The raspberry pi based portable stroke rehabilitation training system of claim 1, wherein: during on-line testing, after feature extraction is carried out on the on-line data by adopting a CSP algorithm, classification and identification are carried out on the features and a stroke rehabilitation training model established by off-line training by adopting an SVM algorithm, and a prediction label is output, wherein the prediction label comprises: the patient imagines the left hand, the patient imagines the right hand; the algorithm is realized by the following steps:
preprocessing and filtering the original data;
carrying out diagonalization on the two types of electroencephalogram signal covariance matrixes simultaneously to find an optimal group of spatial filters;
the electroencephalogram data are projected through the optimal spatial filter, so that variance difference values of two types of EEG signals can be extremely large, and the feature extraction of the electroencephalogram data is realized;
through finding an optimal hyperplane, classifying by combining a training model and extracted electroencephalogram characteristic electroencephalogram data, and outputting a prediction label, wherein the prediction label comprises: the patient imagines the left hand and the patient imagines the right hand.
5. A raspberry pi-based portable stroke rehabilitation training method is applied to the raspberry pi-based portable stroke rehabilitation training system of claim 1, and is characterized by comprising the following operation steps:
1) acquiring an off-line training electroencephalogram signal and corresponding off-line training synchronous label information marked by a multi-parameter synchronizer when a patient carries out left-right hand motor imagery according to the guidance of a user interaction interface;
2) amplifying the off-line training electroencephalogram signal to generate an off-line training amplified electroencephalogram signal, and taking the off-line training amplified electroencephalogram signal and off-line training synchronous label information marked by the multi-parameter synchronizer as off-line training data;
3) performing feature extraction on the off-line training data by adopting a CSP algorithm, classifying the features and known labels by adopting an SVM algorithm, and establishing a stroke rehabilitation training model;
4) acquiring online test electroencephalogram signals and corresponding online test synchronous label information marked by a multi-parameter synchronizer when a patient carries out left-hand and right-hand motor imagery according to feedback of a user interaction interface;
5) amplifying the on-line test electroencephalogram signal to generate an on-line test amplified electroencephalogram signal, and taking the on-line test amplified electroencephalogram signal and the on-line test synchronous label information as on-line test data;
6) after feature extraction is carried out on the online data by adopting a CSP algorithm, classification and identification are carried out on the features and a stroke rehabilitation training model established by offline training by adopting an SVM algorithm, and a prediction label is output, wherein the prediction label comprises: the patient imagines the left hand, the patient imagines the right hand;
7) and converting the prediction label into a control instruction and sending the control instruction to the pneumatic hand so as to control the pneumatic hand to drive the hand of the patient to move.
CN202110471468.9A 2021-04-29 2021-04-29 Portable stroke rehabilitation training system and method based on raspberry pi Pending CN113506607A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110471468.9A CN113506607A (en) 2021-04-29 2021-04-29 Portable stroke rehabilitation training system and method based on raspberry pi

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110471468.9A CN113506607A (en) 2021-04-29 2021-04-29 Portable stroke rehabilitation training system and method based on raspberry pi

Publications (1)

Publication Number Publication Date
CN113506607A true CN113506607A (en) 2021-10-15

Family

ID=78008389

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110471468.9A Pending CN113506607A (en) 2021-04-29 2021-04-29 Portable stroke rehabilitation training system and method based on raspberry pi

Country Status (1)

Country Link
CN (1) CN113506607A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113712501A (en) * 2021-11-03 2021-11-30 山东中医药大学附属眼科医院 Method and system for detecting synchronous change of eye and brain data
CN114767120A (en) * 2022-04-25 2022-07-22 上海韶脑传感技术有限公司 Depth learning-based selection method for motor imagery electroencephalogram channels of unilateral limb patients

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN205433676U (en) * 2015-12-24 2016-08-10 桂林电子科技大学 Portable many physiological parameters of human body detector based on raspberry group
CN108417249A (en) * 2018-03-06 2018-08-17 上海大学 The multi-modal healing hand function method of audiovisual tactile based on VR
CN108597584A (en) * 2018-03-06 2018-09-28 上海大学 In conjunction with the three stages brain control upper limb healing method of Steady State Visual Evoked Potential and Mental imagery
CN110400619A (en) * 2019-08-30 2019-11-01 上海大学 A kind of healing hand function training method based on surface electromyogram signal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN205433676U (en) * 2015-12-24 2016-08-10 桂林电子科技大学 Portable many physiological parameters of human body detector based on raspberry group
CN108417249A (en) * 2018-03-06 2018-08-17 上海大学 The multi-modal healing hand function method of audiovisual tactile based on VR
CN108597584A (en) * 2018-03-06 2018-09-28 上海大学 In conjunction with the three stages brain control upper limb healing method of Steady State Visual Evoked Potential and Mental imagery
CN110400619A (en) * 2019-08-30 2019-11-01 上海大学 A kind of healing hand function training method based on surface electromyogram signal

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
杨帮华: "基于脑机接口的康复训练系统", 《系统仿真学报》 *
陈伟: "基于运动想象脑-机接口的虚拟康复系统设计", 《中国优秀博硕士学位论文全文数据库(硕士)医药卫生科技辑》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113712501A (en) * 2021-11-03 2021-11-30 山东中医药大学附属眼科医院 Method and system for detecting synchronous change of eye and brain data
CN114767120A (en) * 2022-04-25 2022-07-22 上海韶脑传感技术有限公司 Depth learning-based selection method for motor imagery electroencephalogram channels of unilateral limb patients
CN114767120B (en) * 2022-04-25 2024-05-10 上海韶脑传感技术有限公司 Single-side limb patient motor imagery electroencephalogram channel selection method based on deep learning

Similar Documents

Publication Publication Date Title
CN110765920B (en) Motor imagery classification method based on convolutional neural network
CN113398422B (en) Rehabilitation training system and method based on motor imagery-brain-computer interface and virtual reality
CN106214391B (en) Intelligent nursing bed based on brain-computer interface and control method thereof
CN113506607A (en) Portable stroke rehabilitation training system and method based on raspberry pi
CN111035840B (en) VR closed-loop drug addiction self-control force training system
CN104548347A (en) Pure idea nerve muscle electrical stimulation control and nerve function evaluation system
CN111584031B (en) Brain-controlled intelligent limb rehabilitation system based on portable electroencephalogram acquisition equipment and application
CN112465059A (en) Multi-person motor imagery identification method based on cross-brain fusion decision and brain-computer system
CN111584032B (en) Novel brain-controlled intelligent rehabilitation method based on capsule network and application
US20240081705A1 (en) Non-contact fatigue detection system and method based on rppg
CN111544846B (en) Training and mode switching method for pure idea control rehabilitation robot
CN113274032A (en) Cerebral apoplexy rehabilitation training system and method based on SSVEP + MI brain-computer interface
CN112114662A (en) Reality-augmented self-adaptive dynamic multi-scene evoked brain control method
EP2455138A1 (en) Training system, mobile terminal and training method for a person
CN111584027B (en) Brain control rehabilitation system motor imagery recognition system fusing complex network and graph convolution
CN116700495A (en) Brain-computer interaction method and equipment based on steady-state visual evoked potential and motor imagery
CN106476281B (en) Based on blink identification and vision induced 3D printer control method
CN112057082B (en) Robot-assisted cerebral palsy rehabilitation expression training system based on brain-computer interface
CN111584033B (en) Brain-controlled intelligent rehabilitation system movement intention recognition system based on multilayer ordered network
Penny et al. Experiments with an EEG-based computer interface
CN111554376B (en) Paralyzed patient uses multi-functional compound rehabilitation system based on big data channel
CN111584028B (en) Novel brain-controlled intelligent rehabilitation system based on visual graph symbol network and width learning
CN114632274A (en) Ultrasonic beautifying, fat-reducing and slimming device and method
CN108904978B (en) Beauty device based on simulation biological micro-current
Wang et al. Optimization of machine learning method combined with brain-computer interface rehabilitation system

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