No announcement yet.

Raw gait data filtering

  • Filter
  • Time
  • Show
Clear All
new posts

  • Raw gait data filtering

    Hi all,

    I have a very basic question about stride frequency. For cadence of 120 steps/min, stride frequency turns out to be 1 Hz. If this is the walking frequency then what do the higher harmonics (2Hz..3Hz upto 6Hz cut off frequency) of this frequency represent? Physical significance?
    Another question is how do we decide order of Fourier fit for raw data smoothing (to remove noise)? Is it that, if 6 Hz is cut off frequency for my data, Fourier series upto 6 harmonics should be fit to filter the data?
    Thanks in advance for your answers!

  • #2
    Re: Raw gait data filtering


    The physical significance of higher harmonics is that the waveform is never exactly a sine wave, but it is periodic (because gait is periodic). All periodic waveforms can be made from a sine wave at the stride frequency, plus sine waves at the higher harmonic frequencies.

    It may seem logical to just remove all harmonics above 6 Hz. That would indeed be a good filter if the waveform did not contain any higher harmonics. Generally, there can be an infinite number of harmonics, up to infinite frequency. The amplitudes get smaller as the frequency increases, but they are there, in principle.

    Now, if you cut off everything above 6 Hz, the signal can get distorted through the so-called Gibbs phenomenon, or "filter ringing". This can be nicely illustrated by filtering a square wave this way (

    Gait does not contain square waves, but it has some sudden changes, such as heelstrike.

    It is generally considered better to use a filter with a more gradual drop off, such as a second order Butterworth filter. Then you will not introduce oscillations.

    Ton van den Bogert


    • #3
      Re: Raw gait data filtering

      Thanks a lot Ton van den Bogert!

      Actually, I am using raw marker data to calculate segment angle data (thigh, shank and foot segment) and then, I am using Fourier fitting to smoothen this data. 7th or 8th order Fourier fit gives me least r-square value/ RMS error. So, this process also provides same results as filtering. Just another way to do than using low pass filter! Let me know/ correct, if I am missing something important or Any other better way to do it?


      • #4
        Re: Raw gait data filtering

        Consider this: a 9th order Fourier fit gives an even better r-square and RMS error. And 10th even better. So how do you decide which is best?

        You are trying to optimally separate the signal from the noise, that this usually requires a filter that has a gradual drop off of the frequency response. A fourier fit has a sudden drop off in the frequency response.

        There is a very good article by Hatze who filtered in the frequency domain and determined the optimal frequency response ( This is closely related to the Wiener filter. This method is not used anymore, but the article is useful to help understand filtering in the frequency domain.

        In practice, this may not matter much and you can find a good filter by trial and error and subjective judgement. If you compare a 6-th order fourier fit with a 6 Hz butterworth filter, the results may be almost the same.

        These days, motion capture data has very high resolution and noise is not much of a problem. For fast throwing movements, I been able to get reliable accelerations without any filtering. You can go quite a bit higher than 6 Hz if your raw data is not very noisy and the signal is large enough.

        Ton van den Bogert


        • #5
          Re: Raw gait data filtering

          I recall Hatze showing me some data back in 1996. It was a mess, full of noise. I asked him what his cutoff frequency was, whereupon he declared "Optimal, of course!". I have stayed with my 2nd order Butterworth ever since.
          Last edited by Chris Kirtley; October 24, 2016, 08:50 PM.