Knowledge Vault 3/13 - G.TEC BCI & Neurotechnology Spring School 2024 - Day 1
Closed-loop experiments with EEG and functional electrical stimulation and TMS
Alexander Lechner, g.tec medical engineering GmbH (AT)
<Resume Image >

Concept Graph & Resume using Claude 3 Opus | Chat GPT4 | Llama 3:

graph LR classDef experiments fill:#f9d4d4, font-weight:bold, font-size:14px; classDef devices fill:#d4f9d4, font-weight:bold, font-size:14px; classDef eeg fill:#d4d4f9, font-weight:bold, font-size:14px; classDef fes fill:#f9f9d4, font-weight:bold, font-size:14px; classDef tms fill:#f9d4f9, font-weight:bold, font-size:14px; classDef closedLoop fill:#d4f9f9, font-weight:bold, font-size:14px; A[Alexander Lechner] --> B[closed-loop
experiments design. 1] A --> C[GE StimFES: adjustable
muscle stimulation. 2] C --> D[FES: certified, battery-operated,
programmable stimulation. 3] A --> E[16 EEG electrodes: motor
cortex activity. 4] E --> F[gHIamp amplifier: 256Hz
EEG recording. 5] D --> G[FES electrodes: wrist flexor
muscle contraction. 6] A --> H[MATLAB/Simulink: EEG processing,
classification model. 7] E --> I[40 trials: imagined left/right
hand movement. 8] E --> J[Offline analysis: spatial patterns,
classification script. 9] J --> K[88% accuracy achieved,
some artifacts rejected. 10] H --> L[Optimized classifier imported,
real-time FES control. 11] L --> M[Feedback mode: correct imagined
movement FES-triggered. 12] L --> N[Visual feedback: sustained imagined
movement required. 13] L --> O[>80% accuracy effective,
lower accuracy frustrating. 14] A --> P[EEG triggers TMS for
brain stimulation. 15] P --> Q[TMS Simulink model:
EEG band power trigger. 16] Q --> R[4800Hz EEG, frontal/occipital
alpha detection. 17] R --> S[Alpha power threshold
triggers TMS pulse. 18] Q --> T[gStimbox sends trigger
to TMS machine. 19] P --> U[Stimulation artifacts:
20ms delay post-TMS. 20] P --> V[Alpha power threshold: classifier-free
closed-loop stimulation. 21] D --> W[FES safety: current limit,
impedance check. 22] D --> X[Avoid painful stimulation,
minimal skin effects. 23] D --> Y[30-40min FES sessions,
sensory feedback benefits. 24] A --> Z[EEG+fNIRS multimodal approach,
slower fNIRS response. 25] B --> AA[5000+ registrants: significant
brain-computer interface interest. 26] A --> AB[Stimulation feedback reinforces
desirable brain activity. 27] E --> AC[EEG-decoded imagined movement
controls muscle stimulation. 28] A --> AD[Closed-loop brain stimulation
modulates neural activity. 29] A --> AE[MATLAB/Simulink: flexible EEG
processing, hardware control. 30] class A,AA,AB,AC,AD,AE closedLoop; class B experiments; class C,D,W,X,Y fes; class E,F,I,J,K,Z eeg; class G,H,L,M,N,O devices; class P,Q,R,S,T,U,V tms;


1.-Alex Lechner from GTEC explains how to design closed-loop experiments by recording EEG and using electrical stimulation and TMS for feedback.

2.-The GE StimFES device is used to stimulate muscles, with adjustable parameters like current, phase duration, and pulse train characteristics.

3.-The FES device is medically certified and battery-operated. It provides warnings for high impedance and allows programming custom stimulation patterns.

4.-16 active EEG electrodes are placed over the motor cortex to record brain activity while the subject imagines left/right hand movements.

5.-The gHIamp amplifier is used to record EEG at 256 Hz with a reference electrode and optional filters for visualization.

6.-FES electrodes are placed over wrist flexor muscles. Current is gradually increased until a visible muscle contraction is elicited.

7.-A MATLAB/Simulink model is used to process the EEG data, calculate spatial filters and features, and apply a classifier.

8.-The subject performs 40 trials of imagined left/right hand movement for 4 seconds each while the EEG is recorded.

9.-The recorded data is analyzed offline using a common spatial patterns and classification script to evaluate the subject's performance.

10.-Classification accuracy of 88% is achieved, with some trials rejected due to artifacts. One class may perform better than the other.

11.-The optimized classifier is imported into the Simulink model. It outputs a signal to control the FES device in real-time.

12.-In feedback mode, FES is only triggered when the EEG classifier detects the subject is imagining the correct hand movement.

13.-Visual feedback shows the classifier output in real-time. Subject must sustain the imagined movement to activate the FES.

14.-Effective control is achieved with classification accuracy over 80%. Lower accuracy may be frustrating for the subject.

15.-EEG can also be used to trigger other devices like transcranial magnetic stimulation (TMS) to directly stimulate the brain.

16.-A different Simulink model is used for the TMS closed-loop experiment. It calculates EEG band power to trigger stimulation.

17.-The model uses a higher EEG sampling rate of 4800 Hz and additional frontal/occipital channels to detect alpha activity.

18.-Alpha band power from an electrode over the visual cortex is compared to an adjustable threshold to trigger the TMS pulse.

19.-Whenever the alpha power exceeds the threshold, a trigger is sent from the gStimbox device to the TMS machine.

20.-Stimulation artifacts appear in the EEG signal immediately after each TMS pulse with a delay of about 20 ms.

21.-This setup allows closed-loop brain stimulation without needing to train an EEG classifier, by using the alpha power threshold.

22.-The FES device has safety features to avoid over-stimulation, like limiting the maximum current and checking electrode impedance.

23.-Painful stimulation should be avoided. Some redness may appear under the electrodes but the skin is not harmed.

24.-FES is typically used in 30-40 minute sessions for rehabilitation. Sensory feedback from FES can help improve balance and gait.

25.-EEG can be combined with other signals like fNIRS for a multi-modal approach, but fNIRS has a slower response time.

26.-Over 5000 people registered for this online workshop demonstrating significant interest in this approach and brain-computer interface applications.

27.-Stimulation can be used to provide real-time feedback to "close the loop" and reinforce desirable brain activity patterns.

28.-Imagined movement can be decoded from EEG and used to control muscle stimulation to restore lost motor functions.

29.-Direct brain stimulation can modulate neural oscillations and activity in a targeted region. Closed-loop allows adaptive, responsive stimulation.

30.-MATLAB/Simulink provides a flexible platform to implement online EEG processing and control external hardware for closed-loop experiments.

Knowledge Vault built byDavid Vivancos 2024