1. A method of dynamically controlling an implanted medical device located within a patient's body in the presence of an external interference, the method comprising: creating a model of an implantable lead and of body tissue within the body; detecting the presence of an external interference within the body; measuring the response of an excitation voltage or current applied to the lead in the presence of the external interference; comparing the measured response obtained in the presence of the external interference with a predicted response outputted by the model; and dynamically modifying a voltage or current applied to the lead based at least in part on the predicted response outputted by the model.