Algorithmic design of a noise-resistant and efficient closed-loop deep brain stimulation system: A computational approach