Skip to main content
Open Access Publications from the University of California

UC Davis

UC Davis Previously Published Works bannerUC Davis

A user-friendly algorithm for adaptive closed-loop phase-locked stimulation

Published Web Location
No data is associated with this publication.


Closed-loop phase-locked stimulation experiments are rare due to the unavailability of user-friendly algorithms and devices. Our goal is to provide an algorithm for the detection of oscillatory activity in local field potentials (LFPs) and phase prediction, which is user-friendly and robust to non-stationarities in LFPs of behaving animals.

New method

We propose an algorithm that only requires specification of the frequency range within which oscillatory episodes are tracked. Frequency-specific detection thresholds and filter parameters are adjusted automatically based on the short-time LFP power spectrum. Estimates of instantaneous frequency and instantaneous phase are used for phase extrapolation, taking advantage of Bayesian estimation. We used real LFP signals, recorded from a variety of different species and different brain areas, as well as artificial LFP signals with known properties to assess the detection and prediction performance of our algorithm and three previously published reference algorithms under various conditions.

Results and comparison with existing methods

Our algorithm, while significantly more user-friendly than previous approaches, provides a solid detection and prediction performance over a wide range of realistic conditions and, in many cases, has a longer prediction horizon than the reference algorithms. Due to its ability to adjust to changes in the signal, the algorithm is well-prepared to deal with non-stationarities in oscillation frequency, even in the presence of multiple oscillation components.


We have created a universal algorithm for oscillation detection and phase prediction, which performs well and is user-friendly at the same time, making closed-loop phase-locked stimulation experiments easier to accomplish.

Many UC-authored scholarly publications are freely available on this site because of the UC's open access policies. Let us know how this access is important for you.

Item not freely available? Link broken?
Report a problem accessing this item