help-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-gsl] How to Fit an intracable formula


From: Alex Brussee
Subject: Re: [Help-gsl] How to Fit an intracable formula
Date: Tue, 13 Jul 2004 10:40:14 +0100

Hi Brian Gough,

Thank you for helping me out. A little time ago I sent a question like this, and you gave me the advice to look at gls_multimin_fdf, which i did. That worked for me, I now have a solution that seems to work.

For other people who are trying to find a gradient, this is my code for the derivative

void FDF(const gsl_vector *Vec, void *Param, gsl_vector *dVec)
{
        double *P = (double *)Param;

        gsl_multimin_function FMF ;// this part was very helpful, thx Brian !
        FMF.f = F;
        FMF.params = P;
        FMF.n = Vec->size;
        gsl_multimin_diff (&FMF, Vec, dVec);

}

By the way, my formula has to be calculated numerically, beceause the "simple" formula from my previous mail was the speed for the left and right wheel of my robot, and with these speeds a formula can be set up for differential driving. After this, the resulting robot position is intracable.
I mixed up x(t) with v(t):

vr(t)=Amp1*((1/(tau1-tau2))*exp(t/tau1)-(1/(tau1-tau2))*exp(t/tau2))
vl(t)=Amp2*((1/(tau3-tau4))*exp(t/tau3)-(1/(tau3-tau4))*exp(t/tau4))

Fill this in in:

x(t)=x0+b(vr+vl)/(vr-vl)*(sin((vr-vl)t/b+phi0)+sin(phi0))
y(t)=y0-b(vr+vl)/(vr-vl)*(cos((vr-vl)t/b+phi0)-cos(phi0))

And the resulting points X(t), Y(t) need to be fitted on a Minimal Jerk 5th Order Spline.

Sorry to bother you, and thx for the help !

Alex Brussee
:)

_________________________________________________________________
Talk with your online friends with MSN Messenger http://messenger.msn.nl/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]