Deep Brain Stimulation (DBS) is an established therapy that is predominantly utilized in treating the symptoms of neurodegenerative diseases such as Parkinson's Disease and Essential Tremor, crippling diseases like Chronic Pain and Epilepsy, and psychiatric diseases such as Schizophrenia and Depression. Due to its invasive nature, DBS is considered as a last resort therapy.DBS is performed by transmitting electric pulses through an electrode implanted in the brain of the patient. The stimulation is driven by a battery-powered Implanted Pulse Generator. The brain is a very delicate and complex organ and, therefore, accurate positioning the electrode is vital. To achieve a satisfactory therapeutical result, the stimulation targets a certain predefined brain structure that depends on the disease. The effect of DBS depends on the individual, the chosen stimulating contact(s), and the pulse parameters, i.e. amplitude, frequency, width, and shape. Tuning these parameters to the best effect is currently done by a lengthy trial-and-error process. Insufficient stimulation does not properly alleviate the symptoms of the disease, while overstimulation or stimulation off target is prone to side effects. This work envisions assisting physicians in DBS therapy by utilizing model-based estimation and optimization, maximizing stimulation of the target and minimizing stimulation in potentially problematic areas of the brain. This work focuses on amplitude and contact selection. Because of inter-patient differences, individualized models based on clinical imaging have to be created. Alternatively, semi-individualized models can be designed using atlases that save time but potentially introduce inaccuracies. Other optimization applications to DBS are proposed in the thesis, e.g. fault alleviation and electrode design. Electrical properties of the brain can change over time and alter the stimulation spread. A system identification approach has been proposed to quantify these changes. The main aim of DBS is to alleviate the symptoms of the disease and quantifying symptoms is important. The ultimate vision of this work is to design a closed-loop system that can deliver optimal stimulation to the brain while automatically adapting to changes in the brain and the severity of symptoms.