Accurate identification of evoked potentials by waveform decomposition using discrete cosine transform modeling