Announcement

Collapse
No announcement yet.

cubic vs quintic spline

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

  • cubic vs quintic spline

    Dear Biomch-Lers:

    I have been trying to come up with a final "take-home message" from
    the information contained in the responses to Neil Glossop on the use of
    cubic spline. Here is where I got to:


    The most frequent use of splines in Biomechanics is to smooth
    location versus time data. They provide smooth location, velocity and
    acceleration versus time values. Cubic and quintic spline are the most
    used.

    My own experience with cubic spline is with subroutine ICSSCU from
    the IMSL package. I used this subroutine regularly about 15-20 years ago,
    when I was a graduate student. With quintic spline, my experience is with
    Les Jennings' program. It is what I have been using during the past 10-15
    years. I made the switch to from cubic to quintic spline after seeing the
    terrible 2nd derivative data produced by the ICSSCU cubic spline program in
    an example of a known motion (vertical path of a dropped ball) --experiment
    made by Kit Vaughan.

    The ICSSCU version of cubic spline forces the 2nd derivative to be
    zero at the endpoints, and that is the reason why the entire acceleration
    curve gets messed up. Vaughan did not report his velocity-time and
    location-time curves, but based on his acceleration-time curve, I am sure
    that the velocity-time curve cannot have been very good. (The vertical
    velocity-time graph of a dropping ball is supposed to be a straight line
    with a constant negative slope of -9.8 m/s2. ICSSCU forces that graph to be
    flat --zero acceleration-- at the beginning and at the end of the data set.
    Vaughan's acceleration-time curve shows that with ICSSCU the slope of the
    velocity-time curve had already shallowed to -5 m/s2 about 5 points prior to
    the last point, so it is clear that the velocity-time pattern must have been
    visibly affected in that part of the curve.) It is possible that the
    **location**-time curve may have been acceptable: A zero 2nd derivative
    implies a constant velocity, and therefore an (instantaneously) straight
    location-time graph at the beginning and at the end of the data set; this
    may allow the location-time curve pattern to look quite acceptable. But the
    velocity pattern is probably not good, and the acceleration pattern is
    certainly bad.

    So the ICSSCU version of cubic spline may handle OK the location
    data, but is very questionable for velocities, and completely unacceptable
    for accelerations (especially near the end of the data set). The question
    is, are there other cubic spline methods that can take care of this endpoint
    problem? Several people have sent responses to Neil Glossop saying that
    indeed there are ways to handle the endpoints with cubic spline other than
    to assume that the second derivative is zero at the beginning and at the end
    of the data set (as ICSSCU does).

    I confess that some of the explanations given in the responses to
    Neil Glossop were way over my head, and some were too "telegraphic" for me
    to fully understand, and I am still left with the question of whether there
    exists a good way to handle the endpoint question with cubic spline. It is
    clear that forcing the second derivative to be zero (as ICSSCU does) is
    obviously no good. But some of the solutions proposed in the responses to
    Neil Glossop are also no good from a practical standpoint: In general, in
    Biomechanics we can't go about setting the second derivative (nor any other
    derivative) to a known value, because those values are generally unknown
    (except in some isolated cases such as Kit Vaughn's dropping ball
    experiment). Maybe if I plow through the references given by some of the
    respondents, I would find a perfect answer to my question, but just in case
    somebody out there has the "in a nutshell" answer, here is my question:

    "Is there any version of cubic spline that will take location-versus-time
    data, and produce good smoothed zeroeth, first and second derivative data,
    including the endpoints, if we don't know "a priori" the value that any
    derivative is supposed to have at the endpoints?"


    This is the case that we are normally faced with in Biomechanics, and
    therefore the one that we need to deal with! As I said above, maybe one or
    more of the respondents to Neil Glossop has answered the question perfectly
    already, but (dur!) it escaped me.

    (One version of quintic spline that I think I may have "kind-of"
    understood, and which may work, is a version of cubic spline that makes the
    second derivative be constant in the interval between the last two
    endpoints. If I understood correctly, in order to achieve this a **second**
    degree polynomial --a parabola-- is fitted to the last interval --and to the
    first one also. It seems that it does not force the second derivative to
    any pre-specified value; it just makes it have the same (free) value in the
    last two points. If this does not imply a biasing of the data, I think it
    may be acceptable in most cases, although forcing the second derivative to
    stay constant in the interval between the last two points makes it less
    clean than quintic spline, which simply puts another 5th degree polynomial
    in the last interval, like in any other interval.)

    Apart from a saving in computer time (which van den Bogert pointed
    out), I see little reason to use cubic instead of quintic, since all you
    seem to get with cubic are extra problems and complications which may or may
    not be solvable. When the original PC first came out, the speed of the
    computer was an important factor in deciding what smoothing method should be
    used. But with the speed of today's computers, I feel that I'd rather pay
    the price of a few extra seconds in computation time rather than having to
    deal with all the problems and questions associated with cubic spline.

    An interesting point brought up by Glossop and van den Bogert (and a
    possible fly in the above ointment) is that high order splines tend to
    produce excessive oscillation when interpolated data are sought. I did not
    know that. This could be a reason for using cubic instead of quintic in
    some situations, but only IF quintic is of high enough order to produce this
    problem. I personally have not noticed whether there is a difference
    between cubic and quintic in this respect, but I have not gone out to
    interpolate data both ways (with cubic and quintic) to check if there are
    differences.

    ***I think that something that is very clear from all these
    discussions about cubic spline is that nobody should take a cubic spline
    program at face value and use it. It is crucial first to understand how
    that particilar version of cubic spline handles the endpoint problem.***

    Jesus Dapena
    ---
    Jesus Dapena
    Department of Kinesiology
    Indiana University
    Bloomington, IN 47405, USA
    1-812-855-8407 (office phone)
    dapena@valeri.hper.indiana.edu (email)
Working...
X