DSP algorithm