The present disclosure relates generally to systems, methods, and devices for closed loop deep brain stimulation. In particular, a neural signal is measured and provided to software. The software includes a feature generator and a brain network model that takes the neural signal and estimates other neural signals that are not directly measured, and operates as a model of the brain. The software determines a stimulation signal to be sent to stimulating electrodes. Estimated signals by the brain network model are continuously compared to actual signals from the brain. The closed loop feedback system advantageously allows for electrical stimulation levels and patterns to be continuously updated while delivered to a patient.