I'm trying to get my dsp sea legs a bit, and am trying to complete a problem that asks for the mean delay and expected SNR boost for a given difference equation: y[n] = (x[n] + ... + x[n-N+1])/N

I'd love some general guidance on how to learn more about how to address this. Specifically,

  • I'd like to plot the filter function in octave/matlab, but am not sure how to get there from the difference equation. most of the examples I've come across assume that I have a frequency band to specify, but I'm not sure how I can derive that from just the difference equation.
  • I'm not sure how to calculate the expected SNR boost in the absence of any info about the noise source. Is it possible to calculate some concept of the amount of 'smoothing' the filter is expected to provide, and consider that to be the reduction in noise between the input and the output?

Thanks for any hints!


1 Answer 1


I'll give you some hints to help you solve the problem by yourself. Looking at the input-output relation, you can see that the output signal is computed only from a combination of delayed input signal values, and not from delayed output signal values. So your impulse response has a finite length and the filter can be implemented by a non-recursive structure (FIR filter). Using the impulse response, you can write the input-output relation as a finite convolution sum


Comparing (1) to your difference equation, you can easily see what the system's impulse response $h[n]$ is. Once you have the impulse response, you can compute the frequency response using an FFT. Plot its magnitude and phase to see how the filter behaves in the frequency domain.

The (group) delay is the negative derivative of the filter's phase response. You will find that the phase is a linear function, so the delay is a constant. You just need to determine the slope of the phase (either analytically or by inspection of the phase plot).

Without any further knowledge of your desired signal and the noise characteristics, you cannot say much about a possible SNR improvement.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.