This disclosure relates to an active medical device which includes a generator for producing multiphase nerve stimulation pulse trains, each pulse train including at least one stimulation pulse preceded by a precharge pulse and ending with a passive discharge pulse. The active medical device also includes a sensor configured to output a control signal representative of a physiological and/or physical parameter capable of being influenced by the output of nerve stimulation pulse trains. The active medical device also includes an automatic charge compensation control circuit configured to receive at the input the control signal output by the sensor, determine an amplitude and/or a precharge pulse time as a function of at least one predetermined criterion, and output to the generator a precharge pulse control signal to be produced at the output.