CGA FAQ: Choice of cut-off frequency

from BIOMCH-L 31/5/96
Here are all the replies I 've got concerning the cut-off frequency
calculated by the Winter (1990) or Jackson (1979) method.

If there are any further comments I think these should be distributed
in the biomch-l.

Thanks to all those who replied.


Original message
Date sent:       Tue, 14 May 1996 12:25:31 GMT
From:            "G.GIAKAS" 
Subject:         Cut-off frequency

Dear biomch-l recipients,

About 2 years ago there was a biomch-l discussion concerning the
selection of optimal cut-off frequency for low-pass digital
filtering. One of the techniques suggested was the one described by
Jackson (1979, IEEE Trans Biomed Eng, 26(2), 122-124), which is very
similar to the one described by Winter (1990, Biomechanics and motor
control of human movement, 41-43).

I am trying to implement Jacksons technique but as many of you
probably know one must define a "prescribed tolerance" in the second
derivative of the residuals. Additionaly, in order to turn this
technique automatic, I think there must be a type of normalisation in
the residuals Vs cut-off domain, however I have been unable to define
the denominator !

Are there any colleagues who have developed Jackson's or Winter's
techniques that could give me some help ?

Thank you very much for your time.

Yours sincerely,

Giannis Giakas

-----------------------  Replies   ----------------------------

Date sent:       Tue, 14 May 1996 14:58:37 -0500 (CDT)
From:            "D. Heiss" 
To:              "G.GIAKAS" 
Subject:         Re: Cut-off frequency

Hi There:
  I recently wrote a program using Professional QuickBasic to select
cutoff frequencies using the procedure outlined by Winter. I am not
familiar with Jackson's technique and I was not subscribed to Biomch-
l when the above discussion took place. My program is designed to read
in binary Optotrak files for my data on squat lifting (my

  My approach was as follows:
1. I copied my first and last frame 80 times and added it to the ends
of the data.
2. I filtered this data a 1 to 18 Hz using a 2 pass Butterworth filter
3. I calculated the residual for each marker and each coordinate at
each filtered frequency using the formula on p 42 of Winter.
4. I performed a linear regression analysis on the rediduals from the
10 to 18 Hz filtered data. The intercept was defined as the noise
5. The cutoff frequency was selected by a routine which went from the
residual at 18 Hz to the residual at 1 Hz. When the residual was
greater than the noise level, then the cut-off frequency was
calculated using a linear interpolation between the last residual
less than the noise level.

 For MC = 1 to LastMarker                       'MC means Marker count
     For LowPassFilter = 18 to 1 step -1
       If Residual(LPF, MC) > noise(MC) then
             slope = Residual(LPF + 1, MC) - Residual(LPF,MC)
             intercept = Residual(LPF,MC) - (LowPassFilter*slope)
             CutOff = (noise - intercept)/slope
       End If
Next MC

I have looked at the 1st and 2nd derivatives of my data and it seems
to do a good job in reflecting the behavior of the raw data
derivatives. My filter performs better than the one that comes with
the Optotrak system primarily because of the added frames to the
beginning and the end.

I would be willing to share my program with you, however I will warn
you that this is my first really big program and it reflects my
inexperience as a programmer. It's a big program and runs best with a
math co- processor.

Debby Givens Heiss
PhD Candidate Exercise Science
The University of Iowa
Iowa City, IA

From:            Rob Neal 
Date sent:       Wed, 15 May 1996 07:40:22 EST5EDT
Subject:         Re: Cut-off frequency
Priority:        normal

I have both a FORTRAN and a C version. Would you like me to send one
of them to you?



Robert Neal, PhD
Department of Human Movement Studies
The University of Queensland

ph  61 7 3365 6240
FAX 61 7 3365 6877

Date sent:       Wed, 15 May 1996 13:32:11 +0200
To:              "G. Giakas" 
From:            Laboratorio Biomeccanica 
Subject:         Cut-off frequency

Dear Giannis,

     we implemented a self-tuning filtering technique for noisy
kinematic data which is based on a bidirectional Butterworth digital
filter as the one described in Winter (1990). Our filter is able to
self-determine an optimal cut-off frequency relying on the assumption
that signals are affected by additive, zero-mean, gaussian white
noise. In this case we select as the best cut-off frequency the one
that yields maximally uncorrelated residuals.

     A concise overview of our filtering scheme is in:

- Angeloni et al.: Smoothing of motion data: a new self-tuning
algorithm with initial and final state optimization. Proc VIII ESB
Meeting, Rome, (1992) 277

- Angeloni et al.: New weighted least-squares and smoothing scheme for
kinematics analysis: application to instantaneous helical axis
determination. Proc II Int Symp 3D Analysis Hum Mov, Poitiers, (1993)

     A more detailed description is in:

- Cappello et al.: Optimization and smoothing techniques in movement

which has been accepted for publication by the Int J Bio-Medical

     The code we wrote is in Matlab. If you are interested in getting
it or should you need any further information, please contact me.

     Best regards

Francesco La Palombara

    Lab. Biomeccanica 
       via di Barbiano 1/10         fax: (+39).51.583 789
      I-40136 Bologna


Date sent:       Wed, 15 May 1996 21:56:09 -0700 (PDT)
To:              "G.GIAKAS" 
From:            "Jill L. McNitt-Gray" 
Subject:         Re: Cut-off frequency

Please summarize and post your responses.. thank you
Jill L. McNitt-Gray, Ph.D.
Biomechanics Research Laboratory, Director
3560 Watt Way
Dept. of Exercise Science
University of Southern California
Los Angeles, CA 90089-0652
FAX 213-740-7909

From:            Rob Neal 
To:              "G.GIAKAS" 
Date sent:       Thu, 16 May 1996 17:08:58 EST5EDT
Subject:         Re: Cut-off frequency
Priority:        normal


You wrote ...
> Thank you very much for your reply. Yes I would appreciated if you
> could send me the program. Is it possible to send them both to me
> since I am mainly a Turbo Pascal user and my knowledge in C and
> FORTRAN is limited...

God luck.



Here's the FORTRAN version

..      ********************************
..          The code is following !!!!
..      ********************************
..          in FORTRAN and C
..      ********************************

Robert Neal, PhD
Department of Human Movement Studies
The University of Queensland

ph  61 7 3365 6240
FAX 61 7 3365 6877

************** Another question !!!! **************************

Date sent:       Fri, 17 May 1996 14:40:31 -0500 (CDT)
From:            "D. Heiss" 
To:              "G.GIAKAS" 
Subject:         Re: Cut-off frequency program

  In response to your questions:

> Let's say you are sampling at 100Hz for 2 sec, i.e. you have 200
> points. In the residuals - frequency domain you plott the RMSE
> between the  reconstructed (filtered with Fourier ?) and the raw
> signal.

I use a two pass 2nd order Butterworth filter with correction for the
cutoff (TwoPassFactor = 1/.802).

> The maximum frequency is the Niquist frequency (100/2 = 50 Hz).
> Since you have 200 points then you will have 100 harmonics. The
> pattern of the 100 residuals will reconstruct approximately the
> abs(1/x), x=1..100 function.

Yes, but most of the power is in the lowest harmonics (see heel
marker on p 33 in Winter....over 99% of the power is contained in the
7 th harmonic. Since I filter up to 18 Hz, I am assuming that it is
just noise above this level. (The residuals consistently fall on the
flat part of the 1/x function at this level in my data.) The
important thing is to avoid the region below  6 to 8 Hz where the
residuals depart from the line i.e. looks like half a parabola.
 Remember, too, that I am investigating the squat lift which has low
frequency movements.  However, based on Winter's arguments this would
appear sufficient for most other human movements unless really high
impacts were in the data.

> Now the question is how many data from the end are you going to use
> in order to reconstruct the line ? Are you going to use the final
> 20, 30, 50 , ... ?

I use the RMS from the 10 to the 18 Hz results (see subroutine
ResidualAnalysis). For my data (and as depicted by Winter) this
appears to represent the noise. I did compare this to changing the
range from 6 to 18 Hz and from 8 to 18 Hz. Here is an example of the
results that I obtained from one of my "noisiest markers" (the 3rd
MC) and coordinate (z which is A-P motion):

            RMS (Intercept)      Slope      Selected Cutoff
Using 10 to 18 Hz         0.0416                 0.001911   7.739 Hz
Using 8 to 18         0.0534         0.002692   6.799
Using 6 to 18         0.0736         0.004884   5.719

The results for the less noisy markers was much less dramatic with
the selected cutoff lowered no more than 1 Hz between when using
either the 6 or the 10 Hz residual for the lowest point of the
regression line.

When I plotted the second derivatives using the results  from the
above analyses and cutoff frequencies relative to the second
derivatives of the raw data, the 10 to 18 Hz seemed to follow the
behavior of the raw derivatives while the others seemed to smooth the
data too much.

I decided to stick with the 10 to 18 Hz because, for my data, this
appeared to most accurately portray the noise.

I hope this answers your question. I make no claims that I am an
expert in filtering! I have been assisted in making these decisions
by one of my advisors, John Yack, who was one of Winter's grad
students years ago. So, you can say we're probably heavily influenced
by Winter's approach as outlined in his book!



Date sent:       Fri, 17 May 1996 17:28:11 -0500 (CDT)
From:            "D. Heiss" 
To:              "G.GIAKAS" 
Subject:         more on the fc

Hi Giannis:
  After discussing this further with our instrumentation "expert" in
our program, he advised me that my program was probably doing a
better job of eliminating the random noise in my signal but not the
systematic noise since the regression basically is based on the mean.
  To try to get a handle on the noise in my signal I will need to do
further analysis before I can determine the effects of systematic
versus randon noise on my Fc selection.

  Also, in rereading my earlier message I noticed a "typo" - I meant
to say that the majority (>99%) of the power is contained below the
7th harmonic (not at the 7th harmonic).



Date sent:       Fri, 17 May 1996 18:04:37 -0400 (EDT)
From:            Rick Hinrichs 
Subject:         Re: Cut-off frequency
To:              "G.GIAKAS" 
Copies to:
Priority:        NORMAL


I believe I was the first person to adapt the Jackson algorithm to
the Butterworth digital filter in my Ph.D. dissertation ("Upper
extremity function in running", Penn State University, 1982).  I
reported a value of 0.05 cm/Hz^2 as the optimum "threshold" for the
second derivative of the RMS error vs cutoff frequency curve.  This
value of 0.05 has been widely used out of context and has led to many
a misunderstanding of what I had proposed back then.  The value is
very much dependent on the units chosen (0.05 cm = 0.005 m for
example) and the noisiness of the data.  I never intended for anyone
else to use 0.05 blindly, but many people have.  Peak Performance
Technologies, however, does allow you to alter the threshold value in
their software.

My point is: the choice of threshold is a subjective one.  Once you
find one that seems to work well, it will produce different cutoff
frequencies for different arrays based on how much smoothing is
needed.  For example, in my dissertation (sampling rate 100 Hz), my
0.05 cm threshold produced cutoff frequencies ranging from 2-9 Hz
depending on the coordinate (x, y, or z) and the landmark on the
body.  For example, the horizontal (x, y) coordinates of the
suprasternale tended to require only 2 Hz for most subjects for
optimal smoothing whereas the vertical (z) coordinate of the wrist
and ankle tended to require 9 Hz because there was a lot more high
frequency content there.  Different cutoff frequencies were chosen
for each coordinate of each point for each subject.  What they all
had in common was the 0.05 cm threshold value.  But I repeat: I never
intended for anyone else to use 0.05 out of context.
You need to chose your own value based on your data and most
importantly on YOUR UNIT OF MEASURE.  Anyone who thinks the
process is completely objective is fooling themselves and risks over
or undersmoothing their data!

Let me know if I can be of further help.

Best wishes,


Richard N. Hinrichs, Ph.D.
Dept. of Exercise Science
Arizona State University


Date sent:       Mon, 20 May 1996 12:16:26 +0200
To:              "G.GIAKAS" 
From:            Laboratorio Biomeccanica 
Subject:         Re: Cut-off frequency

Dear Giannis,

     I must apologise as I was unable to find the Matlab code of our
filtering routine (by the way, I use it on my PC that is in a
DOS/WINDOWS environment, but being Matlab an interpreted language -
the latest version should be able to produce executable files but we
don't have it yet- the source code should run under UNIX as well). I'm
currently working on quite different subjects and my hard disk is
actually a bit of a mess. I promise however that I'll find the
program and forward it to you before the end of this week.

     As far as the articles are concerned, we've just sent back to the
editor the corrected proofs of "Optimization and smoothing techniques
in movement analysis". As soon as I get the reprints I'll send you
one, along with a copy of the other two papers, by overground mail.



    Lab. Biomeccanica 
       via di Barbiano 1/10         fax: (+39).51.583 789
      I-40136 Bologna

------------------  END  --------------------------------------

Once again thank you very much.

Giannis Giakas
Biomechanics Lab
Department of Exercise and Sport Science
The Manchester Metropolitan University
Alsager ST7 2HL

Tel + 44 161 247 5519
Fax + 44 161 247 6375

I have been analysing the signal from a rotary encoder which provides
displacement time data in an attempt to determine the optimal cut-off
frequency for filtering the data prior to differentiation to provide
velocity and acceleration data.  I have been smoothing the data using
a Butterworth 4th Order digital filter with cutoff frequencies ranging from
1 to 60Hz and subsequently calculating the residual as the mean square
difference between the filtered and raw data.  Having plotted the residual
against cutoff frequency I have been attempting to determine the optimal
cutoff frequency by projecting the linear part of the resulting curve to
the vertical axis and then back to the curve to determine the cutoff.  The
process is outlined on pages 41-43 of David Winter's book
"Biomechanics and Motor Control of Human Movement, 2nd Edition".

My problem is that the plot at the higher cutoff frequencies is not linear
but curvelinear and I an unable to determine over what range of cutoff
frequencies should I project my line from.  The calculated optimal cutoff
frequency is affected to a great extent by what range I define as the
linear part of the curve.

Can anyone provide advice on how I might determine my optimal
cutoff frequency?  Is there a source of a more detailed explanation of the
method for determining optimal cutoff frequency?

from BIOMCH-L 27/11/94 ========================================================== Date: Mon, 21 Nov 1994 15:38:51 -0600 (CST) X-Ph: V4.1@genesis From: To: Subject: RE: Optimal cutoff frequency for data smoothing Hi, Robert, When I was at Kansas State Univeristy, I did a study on determination of the optimum cutoff frequency for the digital filter data smoothing procedure. I used a set of theoretical data as standard data, and added random errors into this set of standard data to get different sets of "raw data". The raw data was smoothed using the digital filter you used at different cutoff frequencies. I calculated the accelerations from the smoothed raw data. When the calculated acceleration data had the maximum similarity with the theoretical acceleration data, the cutoff frequency was considered as the optimum. It was found that the optimum cutoff frequency and the sampling frequency were significantly correlated. The optimum cutoff frequency can be estimated using Fc = (1.4845 + 0.1523 Fs^1/2)^2 This equation explained over 75% of the total variation in the optimum cutoff frequency. This equation has been used in the last five years for different 2d and 3d coordinate data in different human body motions, and the results are satisfactory. The explanation for this relationship is that the higher the sampling frequency, the high the frequency of the random error (the further the random error components will go to the high frequency end of the frequency spectrum, see Dr. Winter's book, Biomechanics of human movement.). You may try this equation if you think it makes sense or its smoothing results make sense. I also have another equation for determination of optimum cutoff frequency, which requires FFT and freqeuncy analysis. It explained over 85% of the total variation of the optimum cutoff frequency. However, I found that sometimes this equation works pretty well, sometimes doesn't. If you are interested in, I can give you all the details. Several years ago, I tried to get the study published in Journal of Biomechanics as a technical note. One of the reviewer attacked me saying that this study had no contribution to the biomechanics. But the how to determine the optimum cutoff frequency has been frequently asked by many researchers in biomechanics in the last several years. It may be the time for me to re-consider publishing this study. Bing Yu, Ph.D. Orthopedic Biomechanics Laboratory Mayo Clinic Rochester, MN 55905 Date: Mon, 21 Nov 1994 16:19:15 -0600 X-Ph: V4.1@genesis From: Duane Knudson Subject: RE>Optimal cutoff frequency for data smoothing To: Robert Newton Greetings Robert! I bet you get a large number of responses to this post since data smoothing has been a persistent problem in our field. I have RMS residuals for many kinds of kinematic data and get curves very similar to Winter's 2.25 on page 43. The curves tend to bottom out at the measurement error for the situation. I do not suspect the mean square error would be any different. The problem is that even the "automated" smoothing programs essentially are still arbitrary selections (note that Winter p. 42 says " If we decide both ( signal distortion and noise passed) should be equal . . ." The other arbitrary "automated" method is the Jackson (1979) method that takes the second derivative of the linear interpolation of the residuals. It may be a chicken/egg situation where we cannot objectively separate the signal and noise of our kinematic data. Even fourier analysis, ultimately must be based on some guess (95% signal power?) as a good compromise of signal distortion and nois attenuation. We need more accelerometer studies and a common standard of what is acceptable signal to noise ratio, or what are appropriate frequencies for specific kinds of biomechanical data. Good luck in your quest. Jackson, K.M. (1979) Fitting of mathematical functions to biomechanical data. IEEE Trans Biomed Eng. 26:122-124. ====================================================== Robert: Just out of curiuosity, what is your sampling rate? Since you are smoothing up to 60 Hz, it almost sounds as if you are violating the Nyquist limit of the Butterworth digital filter (see J. Walton's dissertation). Once beyond (0.25 * SAMPLING_RATE), the Butterworth digital filter behaves strangely. Could this be the problem? If, for example, you are collecting at 100 Hz, try using your algorithm in the cutoff range of 1-25 and see if that eliminates the strange sections of the residual curve. Good luck -- let me know what happens. Peter Vint Arizona State University Exercise and Sport Research Institute VINT@ESPE1.LA.ASU.EDU (Note sampling frequency was 500 Hz - Robert Newton) ==================================================== Date: Tue, 22 Nov 94 11:24:08 EST X-Ph: V4.1@genesis From: Subject: optimal filtering To: Cc: Hi Rob You might try the Jackson 'knee' method: Jackson, KM (1979) Fitting of mathematical functions to biomechanical data. IEEE Trans. Biomed. Eng., vol ?:122-124. I haven't got Winter in front of me, and I can't remember the specifics of the method he suggests. It may even be the Jackson method, in which case I haven't helped you much ! The Jackson method is now used by the Peak system for optimal filtering by Butterworth, cubic spline, or fourier series. It seems to work well for kinematic data, but I haven't tried it for anything more complex. Good luck ! Cheers Tim X-Ph: V4.1@genesis To: From: "Alan Walmsley" Organization: School of Physical Education, Otago Date: Tue, 22 Nov 1994 15:03:17 GMT+1200 Subject: Re: Optimal cutoff frequency for data smoothing Priority: normal Dear Robert, Have you considered spectral analysis to obtain the major frequency components, and then choosing a cut-off frequency at least an octave above the major peak? Alan Walmsley School of Physical Education Division of Sciences University of Otago Dunedin, New Zealand. Ph (03) 4799122, Fax (03) 4798309 X-Ph: V4.1@genesis To: From: Rob Neal Date: Tue, 22 Nov 1994 12:41:11 EST5EDT Subject: Re: Optimal cutoff frequency for data smoothing Priority: normal I don't have the references but the problem seems very similar to the one exercise physiologists have for determining ventilatory threshold or anaerobic threshold. There are a few papers detailing various methods to solve this problem. I could try to find them from the guys at the QAS if you would like. Cheers, Rob Robert Neal, PhD Department of Human Movement Studies The University of Queensland QLD, AUSTRALIA ph 61 7 365 6240 FAX 61 7 365 6877 EMAIL NEAL@HMS01.HMS.UQ.OZ.AU ================================================ Date: Tue, 22 Nov 1994 09:33:26 -0500 (EST) X-Ph: V4.1@genesis From: stuart mcgill Subject: Re: Optimal cutoff frequency for data smoothing To: Robert Newton Hello Robert, "Residual analysis" as described in Winter assumes that the noise component is white- yours appears not to be. Perhaps you should attempt another method- you didn't describe the signal that must be smoothed- this would help in choosing another way to smooth. Good luck. Stu McGill ================================================ Date: Tue, 22 Nov 1994 12:45:32 MET-DST X-Ph: V4.1@genesis From: "Giovanni LEGNANI. Uni. of Brescia, Italy EC" Subject: Re: Optimal cutoff frequency for data smoothing To: X-Vms-To: IN%"run1@PSU.EDU" ----------------------- The frequency should be proportional to the frequency of the incoming pulses coming from the encoders. (you are forced to choose the maximum speed). then you have to choose a frequency that is lower than the half of the incoming signal of angle to avoid fenomena similar to aliasing. so if you have an encoder haning 1000 steps, you will have 4000 samples per turn. if your encoder rotates ad a speed of K turns per second you have a data frequency of 4000 Hz. I suggest you to filter chosing a low-pass filter having a bandwith lower than 2000 Hz. Better a little lower. take in mind that an encoder give an approximate value for the angle. the absolute error is 1 step. when the encoder rotates you have a noise having an amplitude of 1 step and a frequency proportional to the encoder speed and to the number of the encoder steps. bye giovanni legnani =============================================== X-Ph: V4.1@genesis From: "Tom Lundin" Date: Tue, 22 Nov 94 11:04:32 EDT Reply-To: X-Popmail-Charset: English To: Subject: cutoff frequencies Robert, I have recently encountered a similar problem with filtering motion data. The best algorithm I could come up with to select a cutoff was to differentiate the RMS error vs. cutoff frequency twice and search for where the ensuing curve approximated zero (point Z). I found the slope of the line described by Winter from the first derivative of the RMS curve at Z. Then using the equation of that line I found the cutoff frequency as I presume you already know how to do. If you have any questions or comments please feel free to write back. I hope this helps and I'll be interested to see the other responses you receive. Regards, Tom Lundin The Cleveland Clinic Foundation ==================================================== X-Ph: V4.1@genesis From: Paul Guy Subject: Re: Optimal cutoff frequency for data smoothing To: Date: Tue, 22 Nov 1994 12:30:55 -0500 (EST) Content-Length: 4111 Having worked with Dave Winter for many years in his lab, I'll give you an answer you might not want to hear. In short, there is no decent mathematical method that I've seen based on conventional or residual analysis that covers all the situations. If you are interested in say just the displacements, then a residual analysis of them will probably do, if you wanted to see what gave the best results in a power or kinetics situation, then you'd need to do residuals based on those variables. The best way to deal with it, is to have some previous knowledge of the system you are measuring, what its dynamic characteristics are, and what the behaviour is of the data once it arrives at your computer. Such things as whether you used interlaced video would be very important (large 30 hz noise components), or where the resonant frequencies were on your force plates, transducers etc. For filtering data from the human body, we will filter different segments at different frequencies, for example the trunk markers at 1-3 Hz, the foot at 8 to 15 Hz depending on the activity. Where the accelerations become very important, we find that it's often worthwhile to raise the sampling frequency, especially if you are doing stuff like FFT's (and you need long records too). The ratio of cutoff frequency to sampling frequency will affect whether you are really getting an analog equivalent. Filtering at 1/4 the sampling frequency will not give you the characteristics that you might expect. Another issue is filter TYPE.... are you using Butterworth, Bessel, IIR,FIR, 2-way pass etc. ? All these become an issue depending on what you're looking at, in what domain, and how your applications are going to react to the various 'corruptions'. For example, we use a so-called 4th order 2-way Butterworth (it's run through two 2nd order Butterworths, the second is filtered backwards in time, to reduce delay artifacts). Using this filter with force plates causes a force to appear on the plate before the foot contacts it. That's clearly silly data. Similiarly, the horizontal impulse the foot gives at heel contact can really mess up the determination of the body kinetics.....filtering it can spread what occurs in 10-50ms over a much longer time, rendering your analysis useless near heel contact. Don't buy all that theory stuff, sometimes a look at the big picture will help more. -Paul ----------------------------------------------------------------------------- Paul J Guy work phone:519-885-1211 ext 6371 home/FAX/:519-576-3090 64 Mt.Hope St.,Kitchener,Ontario,Canada

Want to know more? Email the CGA list! [n/a]

Back to Clinical Gait Analysis home page