Timestamps for 800Hz Sampling

edited July 2017 in General
This discussion was created from comments split from: MetaHub Timestamps.


  • Hi Eric,

    I am using the MetaWear CPro. I am trying both of the available apps to log my data on an iPad.

    I have a query related to sampling frequency, which seems to be a common issue. I set the required sampling
    frequency (e.g. 800 Hz) in the app, log and then download the data. However,
    when I check the time spacing in excel, it does not match the frequency which I
    set in the app. In addition, it is often inconsistent changing with time.

    I am trying to use the sensor to obtain the frequency of an oscillated object, such as a pendulum. To do this I load the acceleration data into Matlab and run an fast Fourier transform to obtain the frequency. When I do this I am using a constant sample rate, as set in the app. However, I am concerned that this might not be correct, based on the time stamp I am getting.

    Please can you clarify.


  • edited July 2017
    An 800Hz data sample produces data faster than the time granularity of the logger.  You should instead divide the total number of samples received by the elapsed time and see if that matches your selected sampling frequency.
  • Thanks Eric,

    I have just tried this and I still don't think it is correct. When I tried sampling at 400 Hz the frequency appeared to be jumping between 341 and 680 Hz (when I sample at 800 Hz it tends to come out as 680 Hz). I tried the method you stated above the frequency came out as 425 Hz, I don't know if this is a rounding error in excel. Are you able to clarify? Is there an issue with my sensor, or is this a common issue with these sensors.  

    Also, based on what you have said above. Will the acceleration readings be spaced at the correct frequency, or will they just be spaced randomly, but at the correct frequency on average. I need the acceleration readings at the correct frequency. 



  • Metawear CPro boards do not have that much flash memory; if sampling at 800Hz, you can only log data for ~5s.  If you want to record for longer periods at 800Hz, you will need to use a MetaMotion board.

    Most acceleration data will be correctly spaced however there will be samples that are off by +/-1%.  This is expected behavior as the IMU itself cannot always produce data at the exact data rate.
  • Thanks Eric,

    I am only planning on sampling for a short time period. I have ordered some MetaMotionC Logging Sensors. Should I expect these to perform better in terms of sampling at 800 Hz? Are you able to briefly explain why?


  • How long is "a short time period"?  Given that you said that you had issues with 400Hz sampling, it would appear that your expected sampling time is longer than the actual time a CPro board can record at those frequencies.  The increased flash memory of the MetaMotion boards will give you more recording time.

    Out of curiosity, how fast is this object you are measuring oscillating.  
  • Thanks Eric,

    We are trying to obtain the natural frequency of a tennis racket. We hang it from a thread and tap it with a ball. We only need a short signal i.e. a few oscillations to do this. The recording time is more down to how quickly we can start and stop the sensor either side of the test. This should be less than 5 seconds. The natural frequency of the racket is ~150 Hz, but it could be over 200 Hz, hence why we may need to record at 800 Hz.

    We will try the MetaMotion board and let you know how we get on.


This discussion has been closed.