The disclosure relates to systems and methods for cardiac rhythm management. In some cases, a system may include a pulse generator for generating pacing pulses for stimulating a heart of a patient a memory and a sensor configured to sense a response to an unwanted stimulation and to produce a corresponding sensor signal. A processing circuit may receive the sensor signal for a time after one or more pacing pulses, and may derive a time-frequency representation of the sensor signal based on the received sensor signal. The processing circuit may use the time-frequency representation of the sensor signal to help identify unwanted stimulation. Once unwanted stimulation is detected, the processing circuit may change the pacing pulses to help reduce or eliminate the unwanted stimulation.