Methods,
system, and computer-implementable algorithms are disclosed for determining time-varying pulses for a patient having an implantable stimulator device (ISD). At least one time-invariant tonic stimulation
pulse parameter (e.g., amplitude, pulse width, or frequency) is modified by a
modulation function to produce time-varying pulses (TVPs), and one or more measurements are taken to determine the effectiveness of the TVP. The measurements may be objective and taken from the patient, and / or subjective and determined based on feedback from the patient. In one example, objective measurements may comprise one or more features determined from an electrospinogram (ESG)
signal detected by the ISD, which may include evoked compound action potentials. The one or more measurements are used to determine a
score for the TVP, which is useful in selecting a best TVP for use with the patient, or for adjusting the
modulation function applied to the tonic stimulation parameters.