PDA

View Full Version : rat walking



William L. Siler, Ph.d.
05-20-1997, 02:18 AM
I apologize for the delay in posting this summary of the responses to the following
posting:

> I am analyzing the walking patterns of rats before and after spinal cord
> injuries. I am employing standard 60 hz video technology and have run
> into some significant concerns. Visual inspection of the vertical
> coordinate data reveals a time series resembling a textbook illustration
> of aliasing error. The possibility of aliasing seems reinforced by the
> difficulty I am faving in selecting an appropriate filtering algorithm -
> nothing seems to work well and I have more confidence in the raw data
> than in the filtered data. Part of the smoothing difficulty may be
> attributable to the relatively small number of points in eac time series
> (14-17 points per stride). In any case, the problems all seem to point
> toward sampling rate and the frequency content of rat walking. Any
> information you could provide regarding the frequency content of rat
> walking, sampling rate, and appropriate filtering algorthims would be
> greatly appreciated.

I appreciated the responses I received but am somewhat disheartened by the
information offered. There were no revelations in the advice offered. More
importantly, some hard questions regarding the compromise between truth and
what is offered by the technology available remain. Specifically, I would like to
see a discussion regarding the balance between the need for precision and
accuracy and the use of the technology available. In light of the current financial
environment in higher education, many of us are unlikely to get 120 or 200 Hz
cameras in the near future. At what point does a low sampling rate become an
unacceptable sampling rate?

In any case, the main messages I have derived are as follows:

1) The sampling rate of the video system effectively prefilters coordinate data.

2) It may be possible to determine if aliasing has occurred by smoothing the data
with a high order filter a cut-off frequency of 30 Hz.

3) No amount of numerical processing can remedy an inadequate sampling rate.

The individual responses to my posting follow:

************************************************** **************

Dear William,

The following paper might be useful for your research but I am not sure if
it can help you with your specific questions.

Gruner, J.A, J. Altman, and N. Spivack. (1980). Effects of arrested
cerebellar development on locomotion in the rat. Exp. Brain Res 40,
361-373.

Best regards,

Mark Willems
Department of Physiology, West Virginia University
PO Box 9229, Morgantown, WV 26506-9229
USA

************************************************** **************

Bill,
Could you please tell me what kind of a filter you've been using? (moving
average, IIR, FIR, etc. and the type, such as Butterworth, Cheby, etc. (if
applicable)). One problem could be that your filter doesn't have a sharp
enough roll-off and that you aren't cutting out the higher frequencies that
you think are being cut out. This is common, for instance, in moving average
filters, which don't have a very sharp rolloff. I initially was using a
moving average and switched to an IIR filter that I designed in Matlab. It
has a very sharp rolloff and fewer coefficients than an FIR filter with the
same cutoff frequency (thus it's faster). By the way, I was doing this
offline, so I didn't need a causal filter.

Actually, I have a more basic question. When are you filtering? After
you've collected the data? In general, an antialiasing filter is used before
the data is sampled (sorry if I'm repeating things you already know). I've
never worked with videotaped data so I don't know how you'd implement that
any way. But with EMG for instance, you'd place the antialiasing filter at
the input to the amplifier, and then sample the signal that's been filtered.
If the filtered EMG has a bandwidth of 1000 Hz, then you'd want to sample at
probably >2500 Hz (since your antialiasing filter isn't ideal).

Not sure if I've helped. If you want to discuss this further, feel free to
write to me at my e-mail address.

Anne Hines

************************************************** **************

Dear Bill,

Since the sampling frequency is 60 Hz, and given the Nyquist Sampling
Theorem (sample twice as fast as the largest frequency you wish to
accurately reconstruct), realistically you should be able to reconstruct
all frequencies 30 Hz and under. So, I'd start by low-pass filtering
using a simple filter, but fairly high order (IIR or FIR, prefer the
digital personally) with a cut-off frequency of 30 Hz. Next run the same
analysis and see if the same type of artifact is showing up. If it
doesn't, you can apply splines or whatever the rest of the analysis
consists of. If it does show up then you probably should find a
EE-Signal Processer person to help you out on campus. I suspect that
even a twitch or voluntary movement should be easily captured within the
30 Hz range. I cannot recall where I heard this, but I was told once
that a rule of thumb was 10 Hz or so is typically enough resolution for
human volitional movement.

Good luck,

Dan Baker, Ph.D.
Research Scientist
University of Washington

************************************************** **************


Hi William,
we did Fourier-Analysis of trotting horses. The measurements were
taken with at least 120 Hz. The vertical movement of the head and
trunk were only the fundamental wave (frequency=1/(duration of
motion-cycle)) and the first harmonic wave. Therefore we had 60 to 80
data frames. You should consider the Shannon theorem,
saying that the sample frequency needs to be twice the frequency of
the observed signal. IN PRACTICAL CIRCUMSTANCES THE
FIVE- TO TENFOLD FREQUENCY IS ADVISABLE, because of the filtering.
The use of MATLAB with its signal processing toolbox is very helpful
to find a suitable filtermethod for your problem.
(Please refer to our article in the J. of Biomechanics 29/8, p.
1111-1114; Peham et al. "A method of signal processing in the
trotting horse".)

Good luck for your analysis

Christian Peham


************************************************** ******
* Christian Peham *
* email: Christian.Peham@vu-wien.ac.at *
* Clinic for Orthopaedics in Ungulates *
* Locomotion Research Group *
* Veterinary University Vienna *
* Phone: +43-1-250 77/5506; Fax: +43-1-250 77/5590 *
* Josef Baumanngasse 1; A-1210 Wien *
************************************************** ******

************************************************** **************

Dear Bill,

I saw your posting about the questions of what I call "visual aliasing" and
the questions it poses for your walking patterns with the rat. Mr. Dan
India, our VP of Biomechanics Sales, asked me to respond to your question.

The phenomenon of visual aliasing is not well understood by most people,
yet they have seen in the wagon wheel spokes of the old western movies.
When the spokes appear to stop, then appear to slowly go forward or
backward is a result of the frame rate of the movie catching the spokes as
they turn one (or more) angular spoke "notches". Electrical engineers (my
background) get a training in aliasing issues due to over sampling of
time-series data (like voice). The techniques they apply are to filter the
signal BEFORE it is sampled. That happens in telephone systems which are
sampled at 4.00 KHz and filtered (BEFORE it is sampled) at 3.8 KHz.

The problem with visual systems is that there is no convenient way to
filter the signal before it is sampled. I have imagined putting the people
(or rats) into thick Karo syrup--that would do the equivalent of filtering
the data before it was sampled. The "thick goop filter". The motion must
be slowed down prior to the sampling process for the anti-aliasing
filtering to work.

This question is rightly applied to video sampling systems as well. But
filtering the data after it is sampled to get rid of the aliasing does not
work. The wagon wheel spokes are already recorded as being "stopped" or
slowing moving. Filtering this does not improve your data. The only
solution I know of that does not involve changing the motion (thick goop)
is to sample at a high enough rate. Hence the need for higher speed video
systems that sample at a higher sample rate.

Also, be aware of the 60 Hz. interlacing problem. You mentioned the
"vertical coordinate data resembling the textbook illustration of aliasing
error". Normal (e.g. broadcast or RS170 or NTSC) video all use interlaced
scanning whereby the human eye is "tricked" into seeing a higher resolution
image. This interlacing system is a reasonable use of available bandwidth
when transmitting pictures, but it is TERRIBLE for motion measuring systems.

If you measure the apparent motion of a stationary point, it jumps up and
down at the 60 Hz. interlacing frequency. This too can be filtered (along
with the real data), but for motion measurement systems, your data at 60
Hz. is noisy at best. The cameras our company builds and the ones we
supply to our customers in our motion analysis systems are always
non-interlaced (also called sequential scanning). This has been a big
debate in the new High Definition TV (HDTV) specifications with the FCC--to
allow interlaced systems or not. The computer manufacturers have thrown
out interlaced monitors as being TERRIBLE to look at for much the same
reason that they are TERRIBLE for motion measurements. When you look at it
CLOSELY (as with a computer monitor) it jumps up and down and drives you
nuts. This jumping up and down is the problem in using interlacing cameras
for motion measurements.

So, there are lots of things to question and lots to know and I hope this
helps your question about the rat motion. Unfortunately, I cannot tell
you what sample rate you should use. If you look at the maximum speed of
the foot (the human foot swings at about 140 cm/sec during its swing
phase). At 60 Hz frame rate, that translates to 140/60 or 2.3 cm per
frame. Is inter-frame motion of 2.3 cm OK? The conclusion of the
biomechanists seems to be, yes, it is OK for walking, but for running, it
is not enough.

Good luck.

Sincerely,



John O.B. Greaves, VP Customer Support
Motion Analysis Corporation
3617 Westwind Blvd. Santa Rosa, CA 95403 USA
Phone: 707-559-6500 FAX: 707-526-0629
John.Greaves@MotionAnalysis.com
http://www.MotionAnalysis.com

************************************************** **************

Dear Bill,

I have met walking rats, but in our case the sampling frequency
was very low, 1/second, because we was interested in the long
term /1 week/ movement of rats in tubes.
You can find a paper about our work in the proceedings of the Joint Conference
1996 IEEE Instrumentation and Measurement technology Conference & IMEKO
Technical Commitee 7, IMTC/96, IMECO TC-7
1996 June 4-6 Brussels, Belgium.
IEEE Catalog No. 96CH35936

An the other way you should try the spline technic, I can suggest some
article, if you are intersted in. Or you can use the MATLAB spline toolbox...

Bye, Laci

dr. Laszlo Gyongy, senior lecturer
Technical University of Budapest, Hungary

************************************************** **************

Bill,

I read your posting on Biomch-L and am wondering about a few things:

>From your description, it sounds as if you're mostly concerned with
smoothing (interpolating) relatively sparse data? An aliased signal
contains false low-frequency components that have come about from
undersampling and/or not having a proper anti-alias filter in your system. A
good anti-alias filter will attenuate energy in your signal so that at the
Nyquist frequency (your sample rate / 2), there is very little energy
present - and this can be seen readily in the frequency domain, after
performing a FFT, for example. Any energy above the Nyquist frequency will
be subject to "spectral folding" and corrupt your frequency range of
interest with false low-frequency components. Anti-alias filtering must be
done before the signal is digitized (I am thinking of bringing a xducer
signal through an amplifier, filter, and A/D board, for example into a PC)
-- there is no recovering from aliased data once you've gotten past the A/D
board. In the case of 60 Hz video, you're stuck with a sample rate, your
Nyquist frequency is 30 Hz, and so I would think that you've just got to be
sure that the frequency content of rat walking is well below 30 Hz - or else
it's the classic "wagon wheel going backwards" phenomonon (or your vertical
coordinate data looking weird). Given that the signal has already been
digitized via your video system, and anti-alias protection must occur before
digitization, I just wonder how one employs anti-alias protection in a video
system?

I am working with a xducer, amplifier, filter, A/D board- type system, and
capturing impacts at relatively high sampling rates (5000 Hz) - so I've been
dealing with anti-aliasing too. I'm curious about what one does to prevent
aliasing in a video system. If it's just an interpolation problem, then
there are alot of nifty ways you could do that.

Sorry for replying to your question with another question -- thanks in
advance for a reply or posting a summary of replies.

Regards,

Gail Perusek
Mechanical Test Engineer
NASA Lewis Research Center
Cleveland, OH 44135