# Peak at zero in one device and not the other

I was wondering if anyone could shed some light on this problem. I have placed two accelerometers on an animal one sampling at 50 Hz the other at 100 Hz. They were placed in the same position. I then computed the FFT on my results and found that the spectra from the device sampling at 100 Hz had a large peak at zero whilst the other device didn't display this large zero peak. Any ideas why this might be? I thought that it may be because of the increased sampling rate thus displaying more points that were the same or 'stationary'.

While aliasing is a real concern for anything where sampling is involved1, it is really unlikely for this to cause a big zero-peak in frequency space, for an accelerometer on an animal (where it's unlikely that there's an oscillation precisely in sync with the sampling clock). Of course it's possible that a lot of the measured signal had nothing to do with acceleration at all, but with some interference from e.g. mains hum; wouldn't be too unlikely for 50 Hz.

However, when considering interference, an even more likely culprit would be a DC bias somewhere in the circuit. Possibly the accelerometer just isn't calibrated correctly and outputs some constant value in an inertial frame (or, in fact, measures the gravitational acceleration!). This kind of constant offset always causes a Dirac peak at zero frequency, so this is the most likely cause for what you got there.

If you're only interested in studying the animal's movement, it is legit to just ignore the zero peak. Of course don't forget to mention it in your pubication, though!

1Though any well-designed sampling device should include filters, oversampling and similar tricks to minimise aliasing artifacts, but in doubt better don't trust these to work reliable.

Without knowing more about the specific situation, the first likely culprit is aliasing. This occurs when you are sampling at a frequency $\nu_s$ that is too low compared to the largest frequency that is sizeably present in your timeseries.

More specifically, Nyquist's theorem guarantees you that if the highest frequency present is $\nu_M$, then a sampling frequency of (at least) twice that, $\nu_s=2\nu_M$, is enough to guarantee an appropriate spectrum. However, if you're below this limit, then the frequencies around $\nu_M$ will be 'folded back' into the rest of the spectrum, and will appear instead around $\nu_M'=\tfrac12\nu_s-\nu_M$ because of incomplete sampling. This is the 'alias' frequency.

In your case, however, because your two detectors are at commensurate, there must be something else going on. At a sampling rate of 100Hz, a signal of 100Hz would alias as a DC signal, but if you sample that same signal at 50Hz then you'll need to fold it three times (about 25Hz to give -50Hz, then about 0Hz to give 50Hz, then about 25Hz) to get, again, a DC signal. In principle, then, even with aliasing, they should give similar results.

On the other hand, unless you're actively locking your samplers, there's nothing to guarantee that they are collecting at the exact same times, so the 100Hz could be sampling all the peaks, of a 100Hz signal, and the 50z might be getting all the nodes:

The best way to avoid aliasing is simply to sample the hell out of your timeseries. If this is not possible, then the next-best is to use a bandpass filter before your sampler - in your case, some sort of shock absorber.

It is fairly easy to test for, though: you can simply emulate two different 50Hz samplers by splitting your 100Hz data in two, all the evens on one side and all the odds on the other. What does that give you?