Time averaging denoising signal
Your approach will only denoise anything, if your signal is actual periodic. That's typically the case if you use a sine wave or periodic random noise or sweep as an excitation signal for a measurement. It can also work, if you vibration source is periodic (e.g. an engine running an constant rpm).
In this case $D$ should be chosen to represent EXACTLY one period. $N$ is simply determined by the length of your data set. The longer the better.
This works best if the excitation clock and acquisition clock are phase locked, i.e. derived from the same clock source. If that's not the case, it may be required to do some sort of clock recovery or clock tracking first.