No announcement yet.

Re: rolling average and frequency response

This topic is closed.
  • Filter
  • Time
  • Show
Clear All
new posts

  • Re: rolling average and frequency response

    Ton van den Bogert wrote:

    >It is not too hard to determine the transfer function in the

    >domain of such a filter.

    After sampling, the discrete-time moving average system (Example 2.2,
    p. 17 in Oppenhem, Schafer "Discrete-Time signal processing", Prentice
    Hall, 1989):


    where M1 and M2 are numbers of points around x[n]. M1 is the number of
    samples received after x[n] - noncausal processing, can be implemented
    only off-line, M2 is number of samples received before x[n]. If you
    apply moving average such that the 10th point y[10] is the weighted sum
    of x[10], x[9],...,x[1] then M1=0, M2=9. Anyway, it's the total number
    of averaged points that is important for determining the magnitude of
    the frequency response.

    Magnitude of frequency response of this discrete-time system (Example
    2.15, p. 44, ibid):

    H(Wdiscr)=abs( 1/(M1+M2+1)*sin(W discr*(M1+M2+1)/2)/sin(W discr/2)


    H(W discr)=abs ( 1/10*sin(5*Wdiscr)/sin(0.5*Wdiscr) ).

    >From a graph of H(Wdiscr) (quick look using Matlab for Wdiscr=0 to pi,
    step 0.01):

    H(wdiscr)=0.707 for wdiscr=0.28.

    A corresponding continuous-time system has equivalent (effective)
    frequency response for Wcont=Wdiscr/Tsamp, and

    If sampling at 100Hz:

    Tsamp=0.01s, W discr=0.28 => Wcont=28 rad/s, Fcutoff=4.46Hz,

    i.e., smoothing with 100ms window in this case is equivalent to
    low-pass filtering with 4.46Hz cutoff freq.

    Examples for different #points averaged, and for a couple of sample
    freqs are given below. After Wdiscr is found and Fcutoff/Window is
    calculated for one Fsamp the rest is found by multiplying/dividing by
    the ratio F'samp/Fsamp.

    #points Wdiscr Fcutoff Hz Fcutoff Hz Fcutoff Hz

    averaged window ms window ms window ms

    (Fsamp=100Hz) (Fsamp=500Hz) (Fsamp=1000Hz)

    3 0.976 15.5 HZ, 30 ms 77.5 Hz, 6 ms 155 Hz, 3 ms

    5 0.565 9 Hz, 50 ms 45 Hz, 10 ms 90 Hz, 5 ms

    10 0.28 4.5 Hz, 100ms 22.5 Hz, 20ms 45 Hz, 10 ms

    20 0.139 2.2 Hz , 200ms 11 Hz, 40ms 22 Hz, 20 ms

    Mark Shapiro


    Mark B. Shapiro, Ph.D

    School of Kinesiology (M/C 194)

    University of Illinois at Chicago

    901 West Roosevelt Road

    Chicago, Illinois 60608

    tel: (312) 942-5414


    fax (312) 355-2305


    To unsubscribe send SIGNOFF BIOMCH-L to
    For information and archives: