A method for adjusting timing of stimulation provided to a subject during a sleep session with a determination system, the system comprising one or more stimulators, one or more sensors, and one or more hardware processors, the method comprising:
- providing, with the one or more stimulators, stimulation to the subject;
- generating, with the one or more sensors, output signals conveying information related to brain activity of the subject during the sleep session, the brain activity comprising slow wave activity in the subject during the sleep session;
- receiving, with the one or more processors, a raw signal from the one or more sensors;
- buffering, with the one or more processors, a portion of the raw signal, the buffered portion having one or more buffered portion characteristics;
- determining, with the one or more processors, a timing of slow wave events in the buffered portion of the raw signal, the timing of the slow wave events determined based on the one or more buffered portion characteristics of the buffered portion of the raw signal;
- filtering, with the one or more processors, the raw signal to reduce noise artifacts and distortions in the raw signal, the filtered raw signal having one or more filtered raw signal characteristics;
- determining, with the one or more processors, a timing of slow wave events in the filtered raw signal based on the one or more filtered raw signal characteristics of the filtered raw signal, the slow wave events in the filtered raw signal corresponding to the slow wave events in the buffered portion of the raw signal;
- comparing, with the one or more hardware processors, the timing of the slow wave events in the buffered portion of the raw signal to the timing of the slow wave events in the filtered raw signal;
- based on the comparison, determining, with the one or more hardware processors, a first correction factor associated with reducing slow wave activity in the subject and/or a second correction factor associated with enhancing slow wave activity in the subject;
- and
- controlling, with the one or more hardware processors, the one or more stimulators to adjust a timing of the stimulation provided to the subject during the sleep session based on the first correction factor to reduce slow wave sleep in the subject, and/or based on the second correction factor to enhance slow wave sleep in the subject.