Abstract
Electroencephalography (EEG)-triggered temporal interference (TI) systems require acquisition, decision making, stimulus control, and post-stimulation recovery. We developed a standalone battery-powered platform with an eight-channel acquisition front end, embedded spectral processing, dual-carrier generation, and constant-current outputs. A three-stage digital procedure controls return to monitoring. The input-referred root-mean-square (RMS) noise was 0.20 V; the profiled eight-channel feature routine occupied 47.1% of a 2 ms sampling interval. Across 100 hardware-in-the-loop trials, the state-to-trigger latency was s, whereas the mean command-to-carrier latency was below 0.5 ms. Ten paired saline trials showed 41.3% lower early residual RMS than 10 ms blanking. In 24 prescribed digital-input cases, the condition-mean first-window root-mean-square error was reduced by 88.6% and 73.2% relative to 10 ms blanking for exponential tails with 20 and 80 ms time constants, respectively. Additional mean window-completion delays were approximately 52 and 105 ms. No consistent distortion advantage occurred without a transient. A 445 s recovery-enabled run using a controlled digital input signal and a single feature-processing channel completed 33 commands without recorded recovery timeouts or acquisition errors; protocol timing was recorded by the firmware. Three alpha-blocking trials in one participant produced EEG-driven triggers without stimulation. These tests demonstrate embedded state-triggered operation and characterize the distortion and delay associated with post-stimulation recovery.
1. Introduction
Temporal interference (TI) stimulation uses two or more high-frequency electric fields with a small frequency difference to produce a low-frequency amplitude modulation pattern in tissue [1,2,3]. Experimental, computational, and human studies have examined the ability of transcranial TI stimulation to affect neural activity while reducing direct low-frequency stimulation at superficial locations [4,5,6,7]. The achievable field distribution and physiological response remain active research questions [8,9], and the presence of an electrical envelope alone does not establish the selective modulation of a deep target.
Most TI stimulation experiments use predetermined stimulation parameters and laboratory signal sources. A closed-loop implementation requires neural sensing, biomarker extraction, decision logic, and stimulus control to operate as one timed process. Closed-loop stimulation based on electroencephalography (EEG) has been studied with transcranial magnetic stimulation, transcranial electrical stimulation, and other neuromodulation modalities [10,11,12]. Portable and wearable platforms have also demonstrated that neural acquisition, online detection, and stimulus control can be integrated outside a conventional laboratory workstation [13,14,15]. In systems that retain a host computer or external processor in the real-time path, communication, buffering, and operating-system scheduling can contribute to timing variation [16,17].
Brain-state-dependent stimulation links stimulus timing to ongoing neural activity [18]. Closed-loop frameworks distinguish brain-state dynamics from task-related interaction with the environment [19]. The open-source Brain Electrophysiological recording & STimulation (BEST) toolbox supports MATLAB-based protocol design and control [20]. Here, we examine a state-triggered architecture in which feature extraction and stimulus decisions run locally on an embedded controller.
Moving the control loop to an embedded processor introduces a different set of constraints. Continuous multichannel sampling must coexist with filtering, spectral estimation, state evaluation, display, storage, and waveform control. Processing must finish within the sampling schedule without blocking data acquisition. A full-spectrum transform is often unnecessary when the control variable is confined to a small frequency band. Direct calculation at selected frequencies can reduce the required computation, but the full data path must still be checked under the intended channel count [21,22].
Stimulation also contaminates the recording path. Electrical stimulation can exceed the recorded neural signal by several orders of magnitude, and front-end saturation, electrode polarization, and filter transients may persist after the stimulus has ended [23,24]. Hardware blanking and artifact-tolerant front ends can protect the acquisition path, but blanking discards samples, and a long interval delays monitoring [25,26]. Adaptive filtering, template cancellation, and decomposition methods can recover information in some settings, although their assumptions and computational requirements may be unsuitable for a small embedded controller [27,28,29,30]. A state-triggered system that does not analyze EEG during active stimulation has a narrower requirement: a controlled return from stimulation to post-stimulation monitoring.
Recent TI hardware has also addressed concurrent EEG recording. Yan et al. used hardware filtering and synchronized triggering to support EEG acquisition during TI stimulation [31]. That recording-compatibility problem differs from the post-offset re-entry problem studied here: our decision path is disabled during stimulation and resumes only after recovery.
The platform integrates eight-channel acquisition, selected-frequency processing, state-based decisions, dual-carrier generation, and constant-current output. Direct memory access (DMA) and ping-pong buffers separate acquisition from processing. A three-stage procedure combines blanking, accelerated baseline restoration, transition smoothing, and amplitude gating to control the return to monitoring after stimulation.
Evaluation comprised front-end measurements, eight-channel feature-path profiling, hardware-in-the-loop (HIL) timing, physical-output characterization, and paired saline trials. State-to-trigger and command-to-carrier latencies were measured separately. Two controlled-digital-input tests assessed recovery-enabled repeated operation and distortion against a clean reference. A single-participant alpha-blocking experiment demonstrated the EEG-to-trigger path without electrical stimulation. Together, these tests address system integration, timing, and post-stimulation signal handling.
2. System Design and Implementation
2.1. System Architecture
Figure 1 summarizes the signal and control paths. The system contains an EEG acquisition layer, an embedded control layer, and a stimulation-output layer. The acquisition and control board receives differential EEG inputs, converts them with an ADS1299 analog front end (AFE; Texas Instruments, Dallas, TX, USA), and transfers sample frames to an STM32F407 microcontroller (MCU; STMicroelectronics, Geneva, Switzerland). The stimulation board uses an AD9959 direct digital synthesis (DDS) stage (Analog Devices, Wilmington, MA, USA) to generate two high-frequency carriers and converts the voltage outputs to controlled-current outputs. Local visualization and removable storage are outside the trigger-critical path. An RN42 module (Microchip Technology, Chandler, AZ, USA) provides optional Bluetooth Classic 2.1 with enhanced data rate (EDR) telemetry through a universal asynchronous receiver–transmitter (UART) interface; wireless communication is not required for closed-loop operation.
Figure 1.
System architecture. The ADS1299 acquisition path, STM32F407 processing and control path, and AD9959-based TI output path operate locally. The host computer is used only for optional telemetry and is not part of the trigger loop. Arrows indicate the directions of signal transfer, feedback, or control flow. EEG, electroencephalography; AFE, analog front end; MCU, microcontroller unit; DDS, direct digital synthesis; SPI, serial peripheral interface; DMA, direct memory access; DC, direct current; IIR, infinite impulse response; DFT, discrete Fourier transform; FSM, finite-state machine; RMS, root-mean-square; UART, universal asynchronous receiver–transmitter; EDR, enhanced data rate; USB, Universal Serial Bus. Additional labels: TI, temporal interference; ADC, analog-to-digital converter; PGA, programmable-gain amplifier; LPF, low-pass filter; PC, personal computer; TFT LCD, thin-film-transistor liquid-crystal display; DRDY, data ready; TX/RX, transmit/receive; RTS/CTS, request to send/clear to send; CH, channel; STIM, stimulation. BIAS and BIASOUT identify the ADS1299 common-mode feedback connection and its output; IN/OUT denote input/output.
The prototype consists of two printed-circuit boards (Figure 2). The acquisition and control board measures 11.3 cm × 8.7 cm and contains the ADS1299, MCU, EEG interface, micro Secure Digital (microSD) card slot, Universal Serial Bus Type-C (USB-C) interface, and RN42 module. The stimulation board measures 10 cm × 10 cm and contains the DDS stage and an eight-channel Howland current-pump array. Two physical outputs were used for the experiments reported here. The system was battery-powered at a nominal 12 V during the saline and EEG tests.
Figure 2.
Hardware prototype. (a) Acquisition and control board. (b) Stimulation board with the DDS stage, current-pump array, and output connectors. EEG, electroencephalography; AFE, analog front end; MCU, microcontroller unit; DDS, direct digital synthesis; USB, Universal Serial Bus.
2.2. EEG Acquisition Path
The ADS1299 was configured for eight-channel synchronous differential acquisition at 500 samples/s with a programmable-gain setting of 24. Its integrated analog-to-digital converters (ADCs) provided 24-bit conversion, and each sample period was 2 ms. A second-order external low-pass stage limited high-frequency interference before conversion. The ADS1299 BIAS drive circuitry estimated the common-mode component from the selected channel inputs and applied feedback through a separate BIAS electrode. The term BIAS is used throughout this paper to match the ADS1299 implementation.
The data-ready falling edge initiated a serial peripheral interface (SPI) transfer. DMA moved each sample frame into a ping-pong buffer so that one buffer could be processed while the other received new data. Frame-integrity counters were maintained to identify incomplete transfers or buffer errors. Filtering and feature extraction were performed outside the time-critical data-ready interrupt.
2.3. Embedded Feature Extraction and Decision Logic
The final processing path used a first-order direct-current (DC)-removal filter followed by a 50 Hz infinite-impulse-response (IIR) notch filter and selective spectral estimation. During normal monitoring, DC removal was implemented as . No broad digital band-pass filter was applied in the final control path; frequency selectivity for the decision variable was provided by the selected-frequency calculation described below. Samples were collected in non-overlapping 256-point blocks, giving a 512 ms decision epoch at 500 samples/s. For a block of length N, the coefficient at a selected frequency was calculated as
where is the sample after DC removal and notch filtering, is a Hann window, and Hz [32]. Sine and cosine terms were stored in lookup tables. With Hann-window coherent gain , the one-sided power estimate was
Alpha power was the sum of at 8, 9, 10, 11, and 12 Hz and was expressed in decibels relative to 1 V2 as . This is a blockwise direct selective discrete Fourier transform (DFT) rather than a recursive sliding DFT, so its state is reset with each 256-sample block and does not accumulate recursive numerical error across successive windows.
Let and denote the DC-removal and notch outputs. The firmware implemented with single-precision coefficients , , , and . A transposed direct-form-II section retained two state values per channel.
Non-overlapping windows avoid repeated analysis of the same samples, but decision updates remain 512 ms apart, and onset timing depends on the input transition’s position within a window. Overlap could provide more frequent updates at greater computational cost and with correlated successive estimates; it was not tested here. The selected 1 Hz spaced frequencies are not orthogonal transform bins for a 256-sample window at 500 samples/s. Off-grid peaks therefore redistribute energy among the evaluated frequencies despite coherent-gain correction, and the summed feature should not be interpreted as an exact spectral integral. The 10.5 Hz digital-input condition tests one such offset rather than general spectral accuracy.
Band-power estimates were passed to a finite-state machine (FSM). The first ten decision epochs were averaged to obtain an individual alpha baseline, corresponding to approximately 5.12 s of data. An epoch was classified as an alpha-drop state when its alpha power was at least 3 dB below this baseline. A trigger was issued only when this condition was met for three consecutive decision epochs. If denotes the binary alpha-drop result, the trigger command was
The confirmation rule reduces sensitivity to isolated threshold crossings but increases state-to-trigger latency. This latency is reported separately from the delay between an issued command and the appearance of the physical carrier output.
In Equation (3), the index denotes decision epochs rather than individual ADC samples. With stimulation enabled, a confirmed detection starts a finite 2 s protocol rather than a continuously asserted output. Decision evaluation is suspended during stimulation and recovery. The consecutive-detection history is cleared at protocol end, and a 5 s cooldown is measured from that end. During cooldown, evaluated epochs do not accumulate confirmations. A later command requires three newly qualifying decision epochs after cooldown. Feature-window history is also cleared at the transition into recovery and when the recovery gate rejects retained prefill, so a new decision cannot reuse a pre-stimulation feature window.
2.4. TI Stimulation Output
An AD9959-based DDS stage generated the two carrier signals used in this study. For equal carrier amplitudes , frequencies and , center frequency , and difference frequency , their ideal superposition can be written as
The magnitude envelope repeats at [1]. The experiments used 2000 Hz and 2010 Hz carrier setpoints, corresponding to an approximately 10 Hz envelope. The DDS voltage outputs were conditioned and converted to current by Howland current-pump stages. The output characterization in Section 4.3 was performed with resistive loads and should not be interpreted as a measurement of current delivered in the human EEG experiment, in which no electrical stimulation was applied. Table 1 summarizes the hardware and firmware settings used in the reported tests.
Table 1.
Main hardware and firmware configuration. EEG, electroencephalography; AFE, analog front end; MCU, microcontroller unit; SPI, serial peripheral interface; DMA, direct memory access; DC, direct current; DFT, discrete Fourier transform; DDS, direct digital synthesis; TI, temporal interference; EDR, enhanced data rate; UART, universal asynchronous receiver–transmitter. BIAS identifies the ADS1299 common-mode feedback output.
3. Three-Stage Post-Stimulation Recovery
For intermittent stimulation followed by EEG monitoring, the recovery procedure reduces the post-offset transition and controls sample admission to the feature pipeline.
Stage 1 applies deterministic blanking for an interval B. Samples are excluded from feature extraction, the centered output is set to zero, and the DC-removal and notch states are reset using the current input.
Stage 2 accelerates recovery of the digital DC-removal state over an interval R. The coefficient increases from 0.20 toward its normal value of 0.995 across Stages 2 and 3; output remains zero throughout Stage 2.
The third stage applies transition smoothing over an interval S. The output gain increases from zero to one while the DC-removal coefficient continues to approach 0.995. The amplitude gate is evaluated on the unsmoothed recovered output of the recording channel, using V for ten consecutive samples. The stability counter was reset at the end of blanking and continued across Stages 2 and 3. In the ten formal saline trials, four qualified Stage-2 samples were followed by five Stage-3 prefill samples acquired from 18 to 26 ms; the sample at 28 ms completed the ten-sample run and returned the FSM to monitoring. During Stage 3, a sample that satisfies the gate may be retained as a prefill sample for the next feature window. An out-of-range, saturated, or numerically invalid sample clears the retained prefill and restarts the stability count. Decision evaluation remains disabled throughout recovery. The gate permits qualified transition samples to contribute to the next window without treating them as normal monitoring samples.
The final configuration was ms, ms, and ms. A 1000 ms maximum recovery interval was implemented as a fault timeout rather than a successful recovery condition. The 28 ms re-entry time was an observation in the formal saline dataset rather than a fixed recovery duration for arbitrary inputs. Recovery continues if the required consecutive stability run has not been reached, and an unstable Stage-3 sample restarts the transition ramp as well as clearing prefill. The same parameter values can therefore produce longer recovery times under a different residual waveform. Parameter selection used preliminary saline traces. The final ten trials were acquired separately and were not used to select the reported configuration.
The discrete schedule used five blanked samples and a recovery-ramp index j initialized to zero for the first Stage-2 sample. The DC recurrence retained the normal form with coefficient . Stage 2 processed indices 0–3 with zero exposed output; Stage 3 started at index 4 with gain . Thus, its first four gains were 0, , , and 1 with unity gain thereafter. During stimulation and blanking, the previous DC input was set to the current input, the previous DC output was set to zero, and both notch states were cleared. A rejected Stage-3 sample cleared prefill and the stability count; the next sample restarted at ramp index 4 rather than at the beginning of Stage 2.
Two comparison conditions were defined. The 10 ms control used the same initial blanking interval but returned directly to monitoring without accelerated restoration or transition smoothing. The 28 ms fixed-blanking condition withheld all samples until the proposed method’s measured control-state re-entry time in the formal saline trials and did not prefill the feature window. These conditions separate two questions: whether the proposed transition reduces early residual amplitude relative to short blanking and whether qualified Stage-3 samples shorten feature-window completion relative to withholding all samples until the same control-state re-entry time.
4. Experimental Methods
4.1. Acquisition-Front-End Characterization
Input-referred noise was measured with the differential input shorted under the same 500-sample/s and gain-24 configuration used for EEG acquisition. Three 60 s recordings were obtained. DC offset was removed before calculation of the root-mean-square (RMS) value.
Amplitude linearity was assessed by applying sinusoidal inputs from a SIGLENT SDG1022X function/arbitrary waveform generator (SIGLENT Technologies, Shenzhen, China) over the programmed range shown in Figure 3. The measured peak-to-peak amplitude was regressed against the source setting. Frequency response was measured relative to the response at 10 Hz. The reported dB frequency was obtained from the measured response rather than from a nominal filter value.
Figure 3.
Acquisition-front-end characterization. (a) Input-referred noise with the mean RMS after DC-offset removal calculated from three 60 s recordings. (b) Measured amplitude versus programmed source amplitude and linear regression. (c) Gain relative to 10 Hz and the measured dB frequency. AC, alternating current; DC, direct current; RMS, root mean square.
The embedded processing time was measured for one to eight active EEG channels and compared with the 2 ms sample interval. The resulting percentage represents the duration of the tested preprocessing and selected-frequency feature calculation. It is not whole-system processor utilization, a worst-case execution-time bound, or a direct measurement of energy consumption. Display refresh, storage, telemetry, and worst-case interrupt contention were not included.
4.2. Hardware-in-the-Loop Latency
The HIL test exercised the same acquisition, feature, decision, and output path used by the firmware. An external bench generator first provided a 10 Hz alpha-present state for the initial ten-epoch baseline calibration and then generated repeated transitions to an alpha-absent state. The falling edge of the generator’s HIL-state reference at each alpha-present-to-alpha-absent transition defined . Baseline calibration was performed once after firmware initialization and retained across the 100 repeated trials; it was not recalculated for each transition. The generator provided the input and timing reference only and did not perform feature extraction, decision making, or stimulus control.
A dedicated PB1 output pin on the MCU was asserted when the three-epoch alpha-drop decision was confirmed. The HIL-state reference, PB1 trigger marker, and two physical carrier outputs were observed on a SIGLENT SDS824X HD oscilloscope (SIGLENT Technologies, Shenzhen, China). State-to-trigger latency was measured from the HIL-state falling edge to the PB1 rising edge in 100 trials. The output duration was checked from the recorded carrier activity. In this dedicated repeat-test build, the normal three-stage recovery was bypassed after each 2 s carrier-output interval, and the firmware returned directly to monitoring with a fresh feature window. This bypass enabled repeated latency trials and did not alter the measured pre-trigger acquisition and decision path.
State-to-trigger latency includes the analysis-window state, threshold confirmation, and FSM policy and represents control-strategy latency. Command-to-carrier latency was measured separately and describes the hardware response after the MCU issued the output command.
4.3. Stimulation-Output Characterization
Carrier frequency and waveform shape were measured at physical outputs 2 and 3. A short time interval containing approximately three carrier periods was used for visual comparison. To display the low-frequency modulation, the two measured carrier voltages were superposed offline, and their upper and lower amplitude envelopes were calculated using the magnitude of the analytic signal. This panel describes the envelope of the measured carrier superposition; it is not a separate 10 Hz voltage output from the stimulator.
For load characterization, the two carrier outputs were operated continuously at DDS setpoints of 2000 and 2010 Hz with both amplitude codes fixed at 100 throughout the load sweep. Each output was measured with four resistors whose resistance values, measured with a Fluke 15B MAX digital multimeter (Fluke Corporation, Everett, WA, USA), were 495, 996, 2375, and 5540 . Each active output had its own load, and the resistors were exchanged between outputs to cover all four values on both channels. The board was powered by a lithium battery pack rated at 12 V and 31.08 Wh. A multimeter check of the internal current-source rails gave approximately and V relative to board ground.
Voltages were recorded on a SIGLENT SDS804X HD oscilloscope (SIGLENT Technologies, Shenzhen, China) using DC coupling, 1 M inputs, and a configured probe attenuation of 10×. Each output–load condition comprised 100 separate acquisitions of 0.2 s at 5 MSa/s; measurements were transferred to a computer through the local area network (LAN) interface. These acquisitions quantify short-term repeatability within each load condition. The mean RMS voltage at each load was fitted against measured resistance by ordinary least squares with a free intercept; the fitted slope gives the RMS current for this dedicated output setting. These measurements were separate from the 100 A saline-recovery setting.
Command-to-carrier latency was measured from the rising edge of the MCU trigger marker to the first detected carrier edge in 100 repetitions per physical output.
4.4. Saline-Phantom Recovery Validation
The recovery experiment used a rectangular acrylic container filled with 0.9% saline (Hubei Nuozhongsheng Pharmaceutical Co., Ltd., Yicheng, China). Four stainless-steel stimulation plates (ES-316-1010, ELESCI), each 10 mm × 10 mm × 0.1 mm, were mounted at fixed positions and assigned to the two carrier pairs. Two gold-cup recording electrodes were placed in the central measurement region and connected to IN1P and IN1N. The recording leads carried the iiitech brand. A separate electrode connected to the ADS1299 BIAS output provided common-mode feedback. All electrodes were held by external clamps to avoid movement between trials.
The active carrier setpoints were 2000 and 2010 Hz with 100 A programmed for each active output. Ten formal trials were recorded with ms, ms, and ms. Raw samples and the online proposed-method output were exported for analysis. The 10 ms control and 28 ms fixed-blanking conditions were then generated by deterministic replay of each trial’s raw trace. This within-trace design holds electrode position, saline condition, and the stimulus realization constant while comparing processing rules. It is a replay-based paired comparison rather than three independently randomized online conditions. Replay output was checked against firmware output; the maximum control replay error was below 0.01 V.
Quality-control checks required a complete 501-sample post-offset trace, no trace overflow, no recovery or post-window timeout, no ADC near-saturation event, no DMA or buffer error, no replay numerical fault, and no Stage-3 prefill reset. Trials failing any criterion were to be excluded before calculation of the paired endpoints.
The primary early-recovery interval was 10–28 ms after stimulus offset. RMS and mean absolute amplitude were calculated over this interval. Peak and peak-to-peak values were retained as secondary descriptive measures but were not used as the primary basis for the conclusion. The first feature window contained 256 samples. For the 10 ms control, the window began at 10 ms. For the proposed method, it began with the first retained Stage-3 prefill sample at 18 ms. For 28 ms fixed blanking, it began at 28 ms. Window-completion time, RMS, and alpha-band power were compared among the three conditions.
4.5. Human EEG Trigger-Path Experiment
One healthy adult participant completed three repeated alpha-blocking trials. The active recording electrode was placed at O1, the differential reference was attached to the earlobe, and the BIAS electrode was placed on the forehead. Each 60 s trial contained 30 s of eyes-closed rest followed by 30 s of eyes-open rest. The expected reduction in alpha power after eye opening is well established in resting EEG measurements [33]. EEG was sampled at 500 samples/s and processed on the MCU in non-overlapping 256-sample epochs. The first ten eyes-closed epochs established the alpha baseline. An alpha-drop decision was positive when the current alpha power was at least 3 dB below that baseline, and three consecutive positive epochs were required to assert the trigger flag.
The endpoint was the eyes-open alpha-power decrease and the embedded decision flag . No stimulation electrode was attached and no electrical stimulation was delivered. The plotted ON/OFF transitions represent successive window-level decisions.
The protocol and informed-consent materials were reviewed by the Biomedical Ethics Committee of Hebei University of Technology under approval code HEBUThMEC2026054. Written informed consent was obtained from the participant.
4.6. Repeated Operation with Recovery Enabled
ADC-derived values were replaced before the original preprocessing stage. SPI-DMA, one feature-processing channel, the decision module, two protocol outputs, the output timer, and recovery remained enabled; display refresh, serial plotting, Bluetooth transmission, Secure Digital (SD) storage writing, and runtime printing were disabled. The output setting was DDS code 100 rather than a calibrated current in microamperes. Recovery retained ms, ms, ms, the 40 V gate, and ten consecutive stable samples. The input did not depend on measured output current or saline voltage.
The continuous input combined a 10 Hz component (peak amplitude 18 V in high alpha and 7.2 V in low alpha, zero initial phase), a 20 Hz component (5 V, 0.3-radian initial phase), and a 6 Hz component (3 V, 0.2-radian initial phase). A 500-V digital plateau during protocol execution was followed by a 500 V exponential tail with a 20 ms time constant, which was timed by frame index. The schedule comprised 10 s high alpha, 30 repetitions of 10 s high and 3 s low alpha, 10 s high alpha, 25 s sustained low alpha, and 10 s high alpha. Baseline calibration occurred once using the first ten epochs.
Logs identified input transitions, command starts, observed protocol ends, recovery exits, and first-window completion. Each scheduled matching interval ran from input decrease through one 256-sample window after low-alpha offset; another command in that interval counted as extra. Sustained low alpha permitted later commands after cooldown and renewed confirmation. Every feature epoch was checked online; a prespecified subset from warmup, the first two scheduled blocks, and the sustained-input and final blocks was retained for diagnosis. Continuous waveforms were not stored. Per-command records included cooldown, confirmation reset, timeout, and acquisition-error counters. Export occurred after the run; timing records did not independently measure current.
4.7. Known-Input Signal-Fidelity Validation
A separate firmware build tested 24 prescribed cases: two clean signals, three transient conditions, and four initial alpha phases (0, 90, 180, and 270 degrees). The first signal combined an 18 V peak 10 Hz component with the same 20 Hz and 6 Hz components defined above. The second used a 10.5 Hz alpha component with 20% sinusoidal amplitude modulation at 1 Hz. Each case contained 10 s of warmup, a 2 s logical exposure, and 5 s of post-exposure evaluation. Alpha amplitude was multiplied by 0.4 from 1.5 to 3.5 s after exposure end. Transient conditions were no added artifact or a 500 V exposure plateau followed by a 500 V exponential tail with a 20- or 80 ms time constant. Signals were injected before preprocessing; physical stimulation was disabled and AFE clipping was not simulated.
The proposed path retained its original recovery settings. A parallel 10 ms control used normal filtering after the common blanking and reset. The gain-ramp comparator multiplied that control output by a linear gain from zero at 10 ms to unity at 28 ms with the same sample-admission schedule as the control. A separate continuous clean-signal filter used the normal DC-removal coefficient and notch coefficients without exposure-related resets. This reference was never available to the recovery algorithm.
A supplemental offline analysis changed one recovery parameter at a time by 2 ms: ms, ms, or ms, with the other two held at 10/8/8 ms. The gate threshold and ten-sample criterion were unchanged. Before evaluating alternatives, single-precision replay reproduced all 24 default first-window sample-index ranges and processed outputs within 0.001 V; recovery timestamps differed by at most 1 ms because logging and gate evaluation occur at different points in a packet. Seven configurations were evaluated on the same 24 captured input/reference traces over their first post-exposure second. Supplemental timing is nominal sample-index time rather than a new hardware-latency measurement.
The root-mean-square error (RMSE) was evaluated over the common sample-index interval [100, 1000) ms, counting zero placeholders as errors rather than excluding withheld output. Each method’s first admitted 256-sample window was also compared with the clean reference at identical sample positions. Endpoints were RMSE, signed uncentered RMS error (100 times the output-to-reference RMS ratio minus one), signed selective alpha-power error, and wall-clock window-completion time after logical exposure end. Thus, first-window comparisons include both processing and admission-time effects. Nine feature windows per method were recorded. A common three-epoch threshold observer was applied to processed and matched-reference features; it was not a complete stimulation FSM, and only the proposed path also logged the actual decision-module output. Case 12 was selected for waveform display by the 80 ms tail proposed-method first-window RMSE closest to its group median with lower case identifier breaking a tie.
4.8. Statistical Analysis
MATLAB-based offline analysis and figure preparation used MATLAB R2026a (The MathWorks, Inc., Natick, MA, USA).
Saline outcomes are reported as mean ± standard deviation. Ten paired trials were compared using two-sided exact Wilcoxon signed-rank tests with as the decision threshold. Positive matched-pairs rank-biserial correlation () indicates lower residual amplitude with the proposed method. Mean paired differences were accompanied by percentile 95% intervals from 100,000 paired trial-level bootstrap resamples. First-window differences are defined as proposed minus comparator and treated as secondary, unstandardized effect-size estimates. No equivalence margin was prespecified or equivalence test performed.
An exploratory post hoc sensitivity analysis repeated the calculations without trials 5 and 10, which had high first-window RMS values. All ten remained in the primary analysis. Supplemental intervals and p values were not adjusted for multiple comparisons.
Approximate minimum detectable paired mean differences were calculated for ten pairs, two-sided , and 80% power using a noncentral paired-t model, normal paired differences, and their observed standard deviation. These variance-based sensitivity estimates are distinct from observed power, equivalence bounds, and exact signed-rank power. Completion-time offsets follow deterministic sample-admission rules.
The single repeated-operation run and three human trials from one participant were summarized descriptively. Scheduled and sustained-input commands were reported separately. The 24 known-input cases formed a fixed matrix with eight cases per transient condition; plot whiskers denote minimum and maximum. Percentage reductions use ratios of condition means, and additional delay is their difference before rounding. No inferential tests were applied to these datasets.
5. Results
5.1. Acquisition Performance and Embedded Processing
Figure 3a shows a representative input-referred noise segment. Across three 60 s recordings, the mean RMS noise after DC-offset removal was 0.20 V. The amplitude test produced the fitted relation
with , where x and y denote the programmed and measured peak-to-peak amplitudes in millivolts, respectively (Figure 3b). The gain remained close to the 10 Hz reference across the main EEG range, and the measured response crossed dB at approximately 129 Hz (Figure 3c). This measurement characterizes the implemented signal path; it does not by itself establish the complete rejection of all frequency components above the Nyquist frequency.
Single-channel feature processing required 119 s, corresponding to 6.0% of the 2 ms sampling interval. Eight-channel processing required 941 s, or 47.1% of the interval. The profiled routine therefore left approximately 1.1 ms before the next sample boundary under the tested condition. This interval is not claimed as a whole-system worst-case scheduling margin because display, storage, telemetry, and interrupt contention were not profiled concurrently. The measurement applies only to the implemented eight-channel feature path; the human experiment used one EEG channel (Table S2).
The measured input power was approximately 5.1 W during combined acquisition, processing, and output operation in a separate bench-supply characterization. Because this value was obtained from the supply display and not from time-resolved subsystem instrumentation, it is reported as a system-level operating measurement. No precise battery-runtime claim is inferred from this value.
5.2. State-to-Trigger HIL Latency
Figure 4a shows one HIL trial. The alpha-present-to-alpha-absent state transition was followed by the PB1 trigger marker and the activation of physical outputs 2 and 3; the measured output duration was approximately 2.0 s. Across 100 trials, the mean state-to-trigger latency was 1.59 s, the standard deviation was 0.15 s, the median was 1.59 s, and the observed range was 1.34–1.84 s (Figure 4b). The distribution reflects the current 512 ms feature windows and three-epoch confirmation policy rather than the switching speed of the DDS hardware.
Figure 4.
Hardware-in-the-loop latency. (a) Example alpha-present-to-alpha-absent HIL-state transition, PB1 trigger marker, and activation of the two physical outputs. Time zero is the falling edge of the HIL-state reference. The grey dashed line marks the input-state transition, and the magenta dashed line marks trigger issuance. (b) Distribution of state-to-trigger latency over 100 trials following one initial baseline calibration. HIL, hardware in the loop; AC, alternating current; RMS, root mean square; SD, standard deviation. PB1 identifies the microcontroller trigger-marker pin.
5.3. Stimulation-Output Performance
The measured carrier frequencies were approximately 2.01 kHz at output 2 and 2.00 kHz at output 3 (Figure 5a). The superposition of the measured carriers produced an amplitude envelope of approximately 10.0 Hz (Figure 5b), which is consistent with the measured carrier-frequency difference.
Figure 5.
Stimulation-output characterization. (a) Measured carrier voltages at approximately 2.01 and 2.00 kHz. (b) Superposition of the measured carriers and the corresponding approximately 10.0 Hz analytic-signal envelope. The grey region represents the densely plotted high-frequency carrier superposition, and the teal curves show its upper and lower amplitude envelopes. (c) Mean RMS output voltage versus measured load resistance at fixed DDS amplitude codes of 100; error bars denote standard deviation over 100 acquisitions per output–load condition, and lines show ordinary least-squares fits. (d) Command-to-carrier latency for the two physical outputs; markers and thick bars denote mean and standard deviation, and thin bars denote the observed range. Blue and green identify Output 2 and Output 3, respectively; both channel colors are illustrated in the statistical legend. RMS, root mean square; DDS, direct digital synthesis; SD, standard deviation.
The RMS voltage increased approximately linearly with load resistance (Figure 5c). The fitted slopes corresponded to RMS currents of 0.647 and 0.657 mA for the 2000 and 2010 Hz outputs, respectively, with for both fits. Across the four load conditions, mean RMS currents calculated as voltage divided by resistance ranged from 0.637 to 0.660 mA across the two outputs. These measurements indicate approximately constant current over the tested 495–5540 resistive-load range at the fixed DDS setting.
Command-to-carrier latency was s for output 2 and s for output 3 ( per output); the observed ranges were 345–667 and 343–671 s, respectively.
5.4. Post-Stimulation Recovery in Saline
Figure 6a shows the fixed saline setup. In the proposed method, qualified feature-window prefill began at 18 ms, and normal monitoring and decision evaluation resumed at 28 ms after stimulus offset (Figure 6b). In the representative trial, the processed 10 ms control trace contained a larger residual transition than the trace produced by the proposed restoration and smoothing stages (Figure 6c). The 28 ms fixed-blanking condition withheld the transition and contributed no prefill samples before 28 ms.
Figure 6.
Saline-phantom validation of post-stimulation recovery. (a) Experimental setup and electrode arrangement. A and B denote the two carrier-output electrode pairs, with + and - identifying their respective stimulation terminals. (b) Timing of the proposed recovery, 10 ms control, and 28 ms fixed-blanking conditions; the proposed method starts qualified feature-window prefill at 18 ms and resumes normal monitoring and decision evaluation at 28 ms. (c) Representative processed outputs. Grey, orange, and blue shading indicate blanking (0–10 ms), accelerated restoration (10–18 ms), and the Stage-3 prefill/gated re-entry interval (18–28 ms), respectively, in this representative trial. (d) Paired early-interval RMS. (e) Paired early-interval mean absolute amplitude. (f) RMS of the first complete 256-sample feature window. Black diamonds and error bars show mean and standard deviation. Statistical comparisons used two-sided exact Wilcoxon signed-rank tests (). RMS, root mean square. BIAS identifies the ADS1299 common-mode feedback connection; IN1P and IN1N identify its positive and negative channel-1 inputs.
All ten formal trials passed the quality-control criteria and were retained for analysis. No recovery timeout, ADC near-saturation event, DMA or buffer error, numerical replay fault, or Stage-3 prefill reset was observed in these trials (Figure S1 and Table S1).
Across ten paired trials, the early-interval RMS was V for the 10 ms control and V for the proposed method. The mean reduction was 41.3%; the mean paired difference was 3.74 V (95% bootstrap confidence interval, 1.65–6.01 V; ; ; Figure 6d). The mean absolute amplitude decreased from V to V, which is a reduction of 58.9%. The mean paired difference was 4.42 V (95% bootstrap confidence interval, 2.58–6.41 V; ; ; Figure 6e).
First-window completion occurred at 520, 528, and 538 ms for 10 ms control, proposed recovery, and fixed blanking, respectively. Retaining five qualified Stage-3 samples at 18–26 ms advanced the proposed window by 10 ms relative to fixed blanking. First-window RMS comparisons gave versus 10 ms control and versus fixed blanking (Figure 6f); the corresponding alpha-power values were and .
The mean paired first-window RMS differences were 1.12 V versus 10 ms control (95% bootstrap interval, to 3.01 V) and 0.55 V versus fixed blanking ( to 2.82 V). Alpha-power intervals are given in Table S5. Trials 5 and 10 passed the original quality checks and had first-window RMS values of approximately 46 and 40 V; their alpha powers were 4.6 and 26.8 dB.
In the eight-pair sensitivity analysis, the early RMS and mean absolute amplitude remained lower by 44.3% and 60.0% (unadjusted exact and ). Secondary first-window comparisons remained nonsignificant (Table S5).
The approximate 80%-power detectable differences were 3.1 and 3.7 V for first-window RMS versus Control-10 and Fixed-28, respectively, and 0.82 and 1.02 dB for alpha power (Table S5). Changes below these scales are not ruled out by the present sample size.
5.5. Human EEG Trigger-Path Verification
Figure 7a shows one 60 s trial. Occipital alpha power was higher during the eyes-closed interval and decreased after eye opening. The trigger remained inactive during the initial eyes-closed state and was asserted after the required consecutive detections in the eyes-open state.
Figure 7.
Single-participant EEG trigger-path experiment. (a) Representative EEG, alpha-band power, and the window-level decision flag during 30 s eyes closed followed by 30 s eyes open. The red dashed line marks the instructed eye-opening transition at 30 s. Successive ON/OFF transitions indicate changes in the decision output and do not represent repeated stimulation. (b) Eyes-open and eyes-closed alpha power in three repeated trials. No electrical stimulation was delivered. EEG, electroencephalography.
Across the three trials, eyes-open alpha power decreased by 4.6, 4.4, and 4.1 dB with a mean reduction of 4.4 dB (Figure 7b). The participant’s EEG produced the expected embedded trigger decisions.
5.6. Recovery-Enabled Repeated Operation
The 445 s run completed all 222,500 scheduled frames, matched each of 30 scheduled input decreases to one command, and generated three allowed sustained-input commands. All 33 commands completed recovery and a subsequent feature window without recorded missed or unmatched commands, recovery timeouts, DMA errors, DMA-busy drops, or overflows. The maximum packet gap was 4 ms (Table 2; per-command records in Table S3).
Table 2.
Repeated control-loop execution under controlled digital input. DMA, direct memory access; Q1 and Q3, first and third quartiles. SD writing refers to Secure Digital storage.
Figure 8a shows the first scheduled event. Across 30 scheduled events, the input-to-command delay was s with a median of 1.55 s, quartiles of 1.45 and 1.65 s, and range 1.33–1.75 s. Its recurring pattern is consistent with feature-window phase and confirmation timing rather than carrier-actuation jitter (Figure 8b). Recovery duration was ms (58–86 ms); the first two values were 86 and 76 ms, which were followed by 58–60 ms (Figure 8c). The log does not uniquely identify the initial difference, and no warmup or adaptation benefit is inferred. First-window completion after the observed protocol end was ms (553–581 ms). All 737 evaluated epochs were checked online with 137 prespecified diagnostic records retained.
Figure 8.
Recovery-enabled operation in one controlled-digital-input run. (a) First scheduled event; the diamond marks first-window completion. (b) Input-to-command delay and (c) end-to-monitor delay for 30 scheduled events. Dashed lines are means; connecting lines indicate order. The vertical axis in (c) starts at 50 ms. (d) Sustained-input protocol activations and configured cooldowns; brackets measure protocol end to next start. Vertical dotted lines mark input decrease rather than a recovery threshold. Input state is prescribed, cooldown bars use logged end times plus the configured duration, and protocol state is not measured current.
During sustained low alpha, protocol-end-to-next-start intervals were 6.21 and 6.20 s, exceeding the 5 s cooldown (Figure 8d). Every start had an expired cooldown counter and every protocol end cleared the confirmation count. Sustained-input recovery durations were 80, 74, and 92 ms. All software-observed active intervals were 2001 ms rather than independently measured current durations. No retained feature decision occurred in a frame strictly between command start and recovery exit.
5.7. Distortion Under Known Digital Inputs
All 24 cases passed integrity, numerical, and acquisition-counter checks without recovery timeouts. The recorded and independently recomputed first-window metrics agreed within 0.001 V for RMS and RMSE and 0.001 dB for alpha error. Under the 20 ms tail, the mean first-window RMSE was 22.6 V for the proposed method, 199.1 V for 10 ms control, and 198.3 V for gain ramp. Under the 80 ms tail, the corresponding values were 65.2, 242.7, and 242.6 V (Figure 9c). Relative to 10 ms control, reductions in condition means were 88.6% and 73.2% with additional mean completion delays of approximately 52 and 105 ms. The common-interval RMSE decreased by 87.6% and 71.8%, respectively (Figure 9b).
Figure 9.
Known-input digital recovery validation. (a) Prespecified representative case: injected input, processed outputs, and continuous clean-filter reference; intentionally withheld outputs are shown as gaps. (b) RMSE over the common sample-index interval [100,1000) ms, including zero placeholders. (c–e) RMSE, signed uncentered RMS error, and signed alpha-power error in each method’s first admitted 256-sample window against a reference at identical sample positions. (f) Window-completion time after logical exposure end; the vertical axis starts at 500 ms. Points denote means and whiskers denote minimum–maximum over eight fixed cases per condition rather than confidence intervals. Conditions indicate no transient or a 20-/80 ms exponential time constant. No physical stimulation or human EEG was used. RMSE, root-mean-square error; RMS, root mean square; EEG, electroencephalography.
Without an added transient, the mean first-window RMSE was 7.3 V for the proposed method and approximately 7.5 V for either comparator with an additional 8 ms completion delay. The proposed method had lower first-window RMSE in only four of eight cases: there was no consistent distortion advantage. Under the two tail conditions, its mean uncentered RMS error remained approximately 99% and 378% despite improvement over the comparators (Figure 9d). Thus, the procedure did not restore the entire waveform to the clean reference. The largest absolute proposed-method first-window alpha error was approximately 0.03 dB compared with approximately 0.13 dB for either comparator (Figure 9e).
Across all 648 records (24 cases, three methods, nine windows), each method’s three-epoch observer agreed with its matched clean-reference observer, including during the later alpha decrease. Figure 9a shows representative case 12; Table S4 provides condition means.
Across the seven local parameter settings, all replayed cases reached the stability gate and completed a first window within the captured second. Under the 20 ms tail, the condition-mean first-window RMSE ranged from 22.3 to 23.7 V with nominal completion means from 569 to 579 ms; under the 80 ms tail, the ranges were 65.2–82.7 V and 608–627 ms (Table S6). Earlier admission could increase error under the longer tail. These fixed-input replays do not establish parameter optimality or robustness across physical electrode impedances.
Table 3 summarizes the validation datasets, primary results, and the intended interpretation of each test.
Table 3.
Summary of experimental validation. RMS, root mean square; DC, direct current; HIL, hardware in the loop; EEG, electroencephalography; RMSE, root-mean-square error.
6. Discussion
The platform performed acquisition and spectral processing locally at 500 samples/s. Its 0.20 V front-end RMS noise and feature routine occupying less than half the sampling interval support local execution of the profiled eight-channel path.
The 1.59 s mean HIL state-to-trigger latency reflects 512 ms windows and three-epoch confirmation; the mean carrier actuation was below 0.5 ms. The clean generator reference omitted uncertain physiological boundaries, noise, and rapid reversals, so these bench-specific results may underestimate latency and jitter against real EEG. Target-state persistence until carrier onset was not quantified for the 100 events. Window alignment and confirmation quantization contribute to the histogram’s spread; mean and standard deviation do not imply Gaussian hardware jitter.
The policy addresses sustained band-power states with intermittent stimulation rather than brief phase-specific targets; a state can revert before a 1.6 s decision. At 128 samples per window, three complete epochs would span 0.768 s, but alignment, mixed-state windows, spectral estimation, and false-trigger rates would require validation. Subsecond detection is not established. The firmware does not estimate instantaneous phase or demonstrate neural-state regulation. Phase-estimation accuracy also depends on oscillatory amplitude and signal-to-noise ratio [34].
The recovery-enabled run connected state detection, finite commands, recovery, and rearming across scheduled and sustained input decreases. It established repeated embedded sequencing with one feature channel and auxiliary workloads disabled. Because both digital-input tests replaced AFE values, analog saturation and stimulation-induced physiological feedback remain to be evaluated.
The saline results indicate lower early residual amplitude and earlier window completion rather than fixed blanking to the same observed re-entry time. First-window intervals nevertheless allow changes in either direction and do not establish equivalence. The gate controls entry into monitoring; it cannot certify all later samples as artifact-free. The source of the later excursions in trials 5 and 10 remains unresolved.
The known-input tests clarify the distortion–delay tradeoff. Accelerated recovery and later sample admission reduced error under the two exponential tails, including over the common interval with withheld samples counted as errors. Without a transient, filter resetting introduced distortion and gave no consistent advantage. Residual waveform error remained substantial despite small alpha-power errors. All three threshold observers agreed with their clean references, so these cases demonstrate neither complete waveform restoration nor a trigger-accuracy advantage. Blanked samples and active-stimulation EEG are not reconstructed; phase preservation remains untested.
The reported reduction percentages characterize digital-pipeline output in saline. The phantom lacks layered head impedance, realistic skin–electrode polarization, frequency-dependent dielectric behavior, and neural responses. Resetting digital filter memory does not cancel physical polarization, which may persist longer. The paired replay design isolates processing within each recorded electrical realization; randomized online policies would additionally test interactions with acquisition and electrode state. These measurements therefore do not predict in vivo recovery intervals.
Table 4 places the platform alongside EEG-dependent workflows with different control goals. These include transcranial direct-current stimulation (tDCS) and TI systems [6,35,36], transcranial magnetic stimulation (TMS) timed to ongoing phase [11], orientation optimization using evoked EEG [12], and configurable host protocols in BEST [20]. Timing endpoints and replication resources provide the basis for comparison.
Table 4.
Comparison of EEG-dependent workflows, reported timing endpoints, and replication resources. EEG, electroencephalography; TMS, transcranial magnetic stimulation; TI, temporal interference; BEST, Brain Electrophysiological recording and STimulation.
Yan et al.’s concurrent-recording system and the present intermittent-monitoring platform address different operating modes [31]. Here, the contribution is the locally timed connection between feature extraction, confirmation, finite commands, and gated rearming. Neural effects require additional evidence: primate recordings showed altered spike timing without a corresponding firing-rate change under the tested TI conditions [38].
The human test provides a single-case engineering demonstration of acquisition-to-trigger operation without stimulation; it cannot establish population performance. Baseline amplitude, peak frequency, eye-opening reactivity, electrode placement, and artifacts vary across people and sessions, motivating state-specific calibration [11,18]. Multi-participant testing should quantify sensitivity, precision, and latency using prespecified endpoints. Within-session drift was not measured with the fixed ten-epoch baseline. Adaptive updates could follow slow drift but also absorb the state change being detected.
Sleep and pathological transients require different validation. Spindles typically last 0.5–2 s and occupy approximately 12–15 Hz [37]; the present 8–12 Hz feature and three-window policy are not a validated spindle detector. Hassan et al. reported approximately 83% sensitivity, 78% precision, and 81% F1 against offline detectors with a 5–15 ms implementation loop delay; that delay is not a spindle-onset detection latency [37]. Spindle-phase-dependent corticospinal effects further motivate separate phase validation [39]. Legitimate K-complexes or epileptic sharp transients could exceed the 40 V gate and delay or reject useful samples: amplitude alone cannot identify their origin. Scored-sleep and pathological-event replay should therefore test frequency selection, window duration, dynamic range, and recovery gating before such applications are claimed.
The two prescribed tails and local parameter replays cover a limited numerical test set. Broader input conditions, electrode impedances, and concurrent display, storage, and wireless workloads should be evaluated to extend the timing and recovery characterization.
The dB frequency does not quantify attenuation near the 250 Hz Nyquist frequency or standardized common-mode and mains rejection. Output characterization covered two physical channels and resistive loads rather than frequency-dependent electrode interfaces. DC offset, charge balance, electrode-interface impedance, output-stage temperature, and compliance under electrode-like loads remain uncharacterized. Supply-level power was not resolved into synchronized subsystem measurements. Dedicated measurements are still needed to characterize output safety and battery runtime.
The firmware, schematics, bill of materials, and complete test rig are not deposited in a public versioned repository; this limits independent replication. Integration with a standardized framework such as BEST also remains untested [20]. A future host workflow could orchestrate trials and archive configurations, data-quality readouts, and MCU event logs while leaving the trigger decision local. Data-format conversion, event-marker alignment, and the behavior under communication failure would need validation before claiming interoperability. Any human TI study requires separate ethics review; the present approval covered EEG recording only.
7. Conclusions
The standalone platform integrates eight-channel EEG acquisition, local spectral processing, state-based control, TI carrier generation, and gated recovery. The input-referred RMS noise was 0.20 V, and the profiled feature routine completed within the 2 ms sampling interval. HIL tests distinguished approximately 1.6 s state detection and confirmation from submillisecond carrier actuation.
Ten paired saline trials showed 41.3% lower early residual RMS and 58.9% lower mean absolute amplitude than 10 ms blanking. Qualified Stage-3 prefill advanced first-window completion by 10 ms relative to fixed blanking to the observed 28 ms re-entry time. Known-input tests quantified the accompanying distortion–delay tradeoff. A 445 s recovery-enabled run using a controlled digital input signal and a single feature-processing channel completed 30 scheduled and three sustained-input commands without recorded recovery timeouts or acquisition errors; protocol timing was recorded by the firmware. A single-participant test demonstrated EEG-driven triggering. These results support further engineering research on embedded state-triggered TI. The output safety for human stimulation remains uncharacterized; no human TI was delivered.
Supplementary Materials
The following supporting information can be downloaded at https://www.mdpi.com/article/10.3390/s26237703/s1, Figure S1. Additional saline-phantom spectral, baseline, and quality-control results; Table S1. Trial-level saline-recovery outcomes and quality-control results. Early-interval quantities were calculated from 10 to 28 ms after stimulus offset; Table S2. Embedded feature-processing time as a function of the number of active EEG channels; Table S3. Per-command records from one continuous run; Table S4. Descriptive results for the fixed known-input cases; Table S5. Saline first-window uncertainty and exploratory sensitivity analysis; Table S6. Local recovery-parameter sensitivity on fixed digital inputs.
Author Contributions
Conceptualization, H.J. and G.X.; methodology, H.J.; software, H.J.; validation, H.J.; formal analysis, H.J.; investigation, H.J., T.W., W.Z., C.S. and X.J.; resources, G.X.; data curation, H.J.; writing—original draft preparation, H.J.; writing—review and editing, H.J. and G.X.; visualization, H.J.; supervision, G.X.; project administration, G.X.; funding acquisition, G.X. All authors have read and agreed to the published version of the manuscript.
Funding
This research was funded by the National Natural Science Foundation of China, grant number 52320105008.
Institutional Review Board Statement
The human EEG protocol and informed-consent materials were reviewed and approved by the Biomedical Ethics Committee of Hebei University of Technology (approval code HEBUThMEC2026054; approved on 4 March 2026).
Informed Consent Statement
Written informed consent was obtained from the participant involved in the study.
Data Availability Statement
The non-identifiable bench, saline, and controlled-digital-input data and the analysis scripts are available from the corresponding author on reasonable request. Raw human EEG data are not publicly available because the consent and ethics documentation did not include unrestricted public release.
Conflicts of Interest
The authors declare no conflicts of interest.
Abbreviations
The following abbreviations are used in this manuscript:
| ADC | Analog-to-digital converter |
| AFE | Analog front end |
| DDS | Direct digital synthesis |
| DFT | Discrete Fourier transform |
| DMA | Direct memory access |
| EEG | Electroencephalography |
| FSM | Finite-state machine |
| HIL | Hardware in the loop |
| IIR | Infinite impulse response |
| MCU | Microcontroller unit |
| RMS | Root mean square |
| RMSE | Root-mean-square error |
| TI | Temporal interference |
References
- Grossman, N.; Bono, D.; Dedic, N.; Kodandaramaiah, S.B.; Rudenko, A.; Suk, H.J.; Cassara, A.M.; Neufeld, E.; Kuster, N.; Tsai, L.H.; et al. Noninvasive Deep Brain Stimulation via Temporally Interfering Electric Fields. Cell 2017, 169, 1029–1041.e16. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Rampersad, S.; Roig-Solvas, B.; Yarossi, M.; Kulkarni, P.P.; Santarnecchi, E.; Dorval, A.D.; Brooks, D.H. Prospects for Transcranial Temporal Interference Stimulation in Humans: A Computational Study. NeuroImage 2019, 202, 116124. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Song, X.; Zhao, X.; Li, X.; Liu, S.; Ming, D. Multi-Channel Transcranial Temporally Interfering Stimulation (tTIS): Application to Living Mice Brain. J. Neural Eng. 2021, 18, 036003. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Esmaeilpour, Z.; Kronberg, G.; Reato, D.; Parra, L.C.; Bikson, M. Temporal Interference Stimulation Targets Deep Brain Regions by Modulating Neural Oscillations. Brain Stimul. 2021, 14, 55–65. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Violante, I.R.; Alania, K.; Cassarà, A.M.; Neufeld, E.; Acerbo, E.; Carron, R.; Williamson, A.; Kurtin, D.L.; Rhodes, E.; Hampshire, A.; et al. Non-invasive temporal interference electrical stimulation of the human hippocampus. Nat. Neurosci. 2023, 26, 1994–2004, Correction in Nat. Neurosci. 2023, 26, 2252. https://doi.org/10.1038/s41593-023-01517-y. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Wessel, M.J.; Beanato, E.; Popa, T.; Windel, F.; Vassiliadis, P.; Menoud, P.; Beliaeva, V.; Violante, I.R.; Abderrahmane, H.; Dzialecka, P.; et al. Noninvasive theta-burst stimulation of the human striatum enhances striatal activity and motor skill learning. Nat. Neurosci. 2023, 26, 2005–2016. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Thiele, C.; Rufener, K.S.; Repplinger, S.; Zaehle, T.; Ruhnau, P. Transcranial Temporal Interference Stimulation (tTIS) Influences Event-Related Alpha Activity during Mental Rotation. Psychophysiology 2024, 61, e14651. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Mirzakhalili, E.; Barra, B.; Capogrosso, M.; Lempka, S.F. Biophysics of Temporal Interference Stimulation. Cell Syst. 2020, 11, 557–572.e5. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- von Conta, J.; Kasten, F.H.; Ćurčić-Blake, B.; Aleman, A.; Thielscher, A.; Herrmann, C.S. Interindividual Variability of Electric Fields during Transcranial Temporal Interference Stimulation (tTIS). Sci. Rep. 2021, 11, 20357. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Zrenner, C.; Tünnerhoff, J.; Zipser, C.; Müller-Dahlhaus, F.; Ziemann, U. Brain-state dependent non-invasive brain-stimulation with real-time closed-loop simultaneous EEG/TMS. Clin. Neurophysiol. 2016, 127, e41. [Google Scholar] [CrossRef] [Scilit]
- Zrenner, C.; Desideri, D.; Belardinelli, P.; Ziemann, U. Real-time EEG-defined excitability states determine efficacy of TMS-induced plasticity in human motor cortex. Brain Stimul. 2018, 11, 374–389. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Tervo, A.E.; Nieminen, J.O.; Lioumis, P.; Metsomaa, J.; Souza, V.H.; Sinisalo, H.; Stenroos, M.; Sarvas, J.; Ilmoniemi, R.J. Closed-loop optimization of transcranial magnetic stimulation with electroencephalography feedback. Brain Stimul. 2022, 15, 523–531. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Topalovic, U.; Barclay, S.; Ling, C.; Alzuhair, A.; Yu, W.; Hokhikyan, V.; Chandrakumar, H.; Rozgic, D.; Jiang, W.; Basir-Kazeruni, S.; et al. A wearable platform for closed-loop stimulation and recording of single-neuron and local field potential activity in freely moving humans. Nat. Neurosci. 2023, 26, 517–527. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Valenchon, N.; Bouteiller, Y.; Jourde, H.R.; L’Heureux, X.; Sobral, M.; Coffey, E.B.J.; Beltrame, G. The Portiloop: A Deep Learning-Based Open Science Tool for Closed-Loop Brain Stimulation. PLoS ONE 2022, 17, e0270696. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Bressler, S.; Neely, R.; Yost, R.M.; Wang, D.; Read, H.L. A wearable EEG system for closed-loop neuromodulation of sleep-related oscillations. J. Neural Eng. 2023, 20, 056030. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Chang, Y.C.; Chao, P.H.; Kuan, Y.M.; Huang, C.J.; Chen, L.F.; Mao, W.C.; Su, T.P.; Chen, S.H.; Wei, C.S. Delay Analysis in Closed-Loop EEG Phase-Triggered Transcranial Magnetic Stimulation. In Proceedings of the 2023 45th Annual International Conference of the IEEE Engineering in Medicine & Biology Society (EMBC), Sydney, Australia, 24–27 July 2023; pp. 1–4. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Zelmann, R.; Paulk, A.C.; Basu, I.; Sarma, A.; Yousefi, A.; Crocker, B.; Eskandar, E.; Williams, Z.; Cosgrove, G.R.; Weisholtz, D.S.; et al. CLoSES: A platform for closed-loop intracranial stimulation in humans. NeuroImage 2020, 223, 117314. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Bergmann, T.O. Brain State-Dependent Brain Stimulation. Front. Psychol. 2018, 9, 2108. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Zrenner, C.; Belardinelli, P.; Müller-Dahlhaus, F.; Ziemann, U. Closed-Loop Neuroscience and Non-Invasive Brain Stimulation: A Tale of Two Loops. Front. Cell. Neurosci. 2016, 10, 92. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Hassan, U.; Pillen, S.; Zrenner, C.; Bergmann, T.O. The Brain Electrophysiological recording & STimulation (BEST) toolbox. Brain Stimul. 2022, 15, 109–115. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Wyse-Sookoo, K.; Arginteanu, T.; Norena Acosta, N.; Udvardy, M.; Ljulj, H.; Mills, K.; Anderson, W.S.; Salimpour, Y. Development of a Small, Low-Power, Real-Time Phase-Dependent Neuromodulation System. IEEE Trans. Neural Syst. Rehabil. Eng. 2025, 33, 4444–4453. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Liu, W.; Chang, S.; Wang, J.; Liu, C. A Real-Time Hardware Experiment Platform for Closed-Loop Electrophysiology. IEEE Trans. Neural Syst. Rehabil. Eng. 2022, 30, 380–389. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Petkos, K.; Guiho, T.; Degenaar, P.; Jackson, A.; Brown, P.; Denison, T.; Drakakis, E.M. A High-Performance 4 nV/Hz Analog Front-End Architecture for Artefact Suppression in Local Field Potential Recordings during Deep Brain Stimulation. J. Neural Eng. 2019, 16, 066003. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Holzmann, R.; Koppehele-Gossel, J.; Voss, U.; Klimke, A. Investigating Nuisance Effects Induced in EEG during tACS Application. Front. Hum. Neurosci. 2021, 15, 637080. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Huang, C.W.; Lai, C.K.; Hung, C.C.; Wu, C.Y.; Ker, M.D. A CMOS Synchronized Sample-and-Hold Artifact Blanking Analog Front-End Local Field Potential Acquisition Unit With ±3.6-V Stimulation Artifact Tolerance and Monopolar Electrode-Tissue Impedance Measurement Circuit for Closed-Loop Deep Brain Stimulation SoCs. IEEE Trans. Circuits Syst. I Regul. Pap. 2023, 70, 2257–2270. [Google Scholar] [CrossRef] [Scilit]
- Wu, C.Y.; Huang, C.W.; Chen, Y.W.; Lai, C.K.; Hung, C.C.; Ker, M.D. Design of CMOS Analog Front-End Local-Field Potential Chopper Amplifier With Stimulation Artifact Tolerance for Real-Time Closed-Loop Deep Brain Stimulation SoC Applications. IEEE Trans. Biomed. Circuits Syst. 2024, 18, 539–551. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Qian, X.; Chen, Y.; Feng, Y.; Ma, B.; Hao, H.; Li, L. A Method for Removal of Deep Brain Stimulation Artifact From Local Field Potentials. IEEE Trans. Neural Syst. Rehabil. Eng. 2017, 25, 2217–2226. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Culaclii, S.; Kim, B.; Lo, Y.K.; Li, L.; Liu, W. Online Artifact-Cancellation in Same-Electrode Neural Stimulation and Recording Using a Combined Hardware and Software Architecture. IEEE Trans. Biomed. Circuits Syst. 2018, 12, 601–613. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Kohli, S.; Casson, A.J. Removal of Gross Artifacts of Transcranial Alternating Current Stimulation in Simultaneous EEG Monitoring. Sensors 2019, 19, 190. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Chen, L.; Ren, Z.; Wang, J. An SVD-based method for DBS artifact removal: High-fidelity restoration of local field potential. Biomed. Signal Process. Control 2025, 108, 107908. [Google Scholar] [CrossRef] [Scilit]
- Yan, Z.; Zhang, J.; Kang, A.; Ouyang, J.; Luo, Q.; Zhao, Y.; Zhou, Y.; Xie, Q.; Liu, R.; Zhao, J.; et al. Development of a High-Precision Temporal Interference Stimulation System With Multi-Device Synchronization and Concurrent EEG. IEEE Trans. Neural Syst. Rehabil. Eng. 2026, 34, 2859–2869. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Harris, F.J. On the Use of Windows for Harmonic Analysis with the Discrete Fourier Transform. Proc. IEEE 1978, 66, 51–83. [Google Scholar] [CrossRef] [Scilit]
- Barry, R.J.; Clarke, A.R.; Johnstone, S.J.; Magee, C.A.; Rushby, J.A. EEG Differences between Eyes-Closed and Eyes-Open Resting Conditions. Clin. Neurophysiol. 2007, 118, 2765–2773. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Zrenner, C.; Galevska, D.; Nieminen, J.O.; Baur, D.; Stefanou, M.I.; Ziemann, U. The shaky ground truth of real-time phase estimation. NeuroImage 2020, 214, 116761. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Leite, J.; Morales-Quezada, L.; Carvalho, S.; Thibaut, A.; Doruk, D.; Chen, C.F.; Schachter, S.C.; Rotenberg, A.; Fregni, F. Surface EEG-Transcranial Direct Current Stimulation (tDCS) Closed-Loop System. Int. J. Neural Syst. 2017, 27, 1750026. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Zhang, Z.; Lin, B.S.; Wu, C.W.G.; Hsieh, T.H.; Liou, J.C.; Li, Y.T.; Peng, C.W. Designing and Pilot Testing a Novel Transcranial Temporal Interference Stimulation Device for Neuromodulation. IEEE Trans. Neural Syst. Rehabil. Eng. 2022, 30, 1483–1493. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Hassan, U.; Feld, G.B.; Bergmann, T.O. Automated real-time EEG sleep spindle detection for brain-state-dependent brain stimulation. J. Sleep Res. 2022, 31, e13733. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Vieira, P.G.; Krause, M.R.; Pack, C.C. Temporal interference stimulation disrupts spike timing in the primate brain. Nat. Commun. 2024, 15, 4558. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Hassan, U.; Okyere, P.; Amini Masouleh, M.; Zrenner, C.; Ziemann, U.; Bergmann, T.O. Pulsed inhibition of corticospinal excitability by the thalamocortical sleep spindle. Brain Stimul. 2025, 18, 265–275. [Google Scholar] [CrossRef] [Scilit] [PubMed]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.








