Skip to main content
. 2021 Jan 11;11(1):38. doi: 10.3390/jpm11010038

Figure 1.

Figure 1

A schematic diagram of the real-time closed-loop system. (a) shows an implementation of a closed-loop brain state-dependent visual stimulation setup comprising electroencephalography (EEG), real-time signal processing, and triggered visual stimulation. The visual stimulation is locked to the instantaneous phase of the recorded EEG signal in the alpha band either at the peak or the trough. (b) shows sequential steps for time-series forward prediction implemented through MATLAB experimental control scripts PC via four distinct Simulink real-time models (Yule–Walker (YW) peak, YW trough, least mean square (LMS) peak, LMS trough). Raw EEG data were downsampled first, followed by finite impulse response (FIR) bandpass filtering. Coefficients of the autoregressive (AR) models were calculated, and the EEG signal was forward predicted. After time-series forward prediction based on YW/LMS methods, the instantaneous phase (at time-zero”) was estimated using Hilbert transform. The visual stimulation was then triggered when a pre-set phase (peak or trough) condition was met.