Parametric curve with boundary conditions and "stable" coefficients

49 Views Asked by At

I'm trying to build a 2D parametric curve. Let's say $(x(s),y(s))$ such that $$\left(\frac{dx}{ds}\right)^2+\left(\frac{dy}{ds}\right)^2=1$$ Then with known Dirichlet and Neumann boundary conditions on both ends: $$x(0)=x_0,y(0)=y_0$$ $$\frac{dx}{ds}(0)=\cos(\theta_0),\frac{dy}{ds}(0)=\sin(\theta_0)$$ At $s=L$ we have simplified values like: $$x(L)=0,y(L)=0$$ $$\frac{dx}{ds}(0)=1,\frac{dy}{ds}(0)=0$$

On top of that, let's suppose we started from another $s=l$ between $0$ and $L$, and call the new curve $(x_{new}(s),y_{new}(s))$ with boundary conditions at $s=l$ being:

$$x_{new}(l)=x(l),y_{new}(l)=y(l)$$ $$\frac{dx_{new}}{ds}(l)=\frac{dx}{ds}(l),\frac{dy_{new}}{ds}(l)=\frac{dy}{ds}(l)$$

I want to make sure that the curve stays the same for the remaining portion, i.e.: $$x_{new}(s)=x(s)$$ $$y_{new}(s)=y(s)$$ For $s\in[l,L]$

I want to create a "docking" control with constant speed and the only thing I can control is the steering $\theta$ and the things I know are my current position $x$, $y$ and my direction $\theta$. I want to dock to $(0,0)$ looking towards the x-axis in the positive direction ($\theta=0$).

I looked at third order polynomials but the speed norm is not always 1. So the coefficients change during travel. I was wondering if there are known functions of that sort that someone might know.

Thank you for your help.

2

There are 2 best solutions below

9
On

Saying that you have a unit speed is equivalent to parameterize your curve with curvilinear abscissa (our use of letter "s" shows that you are fully conscious of that).

If your objective is to have a numerical solution, you can work by solving a system of differential equations (I can give you an interesting example I have been working on), using a Runge Kutta solver (with Matlab for example), but...

Yes to your question: there exists "on the shelf" a family of curves called Cornu spirals or "clothoids" with hopefully the good degrees of freedom for your docking conditions in particular. They can be adapted to numerical computation. I advise you to download this article in order to understand a certain number of facts about these curves.

Remark: when you mention "third degree polynomials", are you thinking to Spline/Bezier curves ?

Waiting for your comments.

0
On

Natural /intrinsic equation of curves should be used.

There are many curves to choose from depending on how you wish to vary curvature with respect to arc length... to clear obstacles, to reverse etc.

Try some curves like hypo/epi- cycloids,trochoids, DeLaunay unduloids, clothoids etc., the latter were reported employed to steer/dock /park BMW automobiles into narrow parking lines using predictable paths...

As an exercise take the example of a of a cycloid whose intrinsic ODE

$$ \sin \phi= \sin \alpha -\frac{s}{4 a};\quad 4 a \cos \phi\dfrac{d \phi }{ds}= -1; $$

involves slope $\phi$ and $s$ the arc length, $\phi_i $ initial slope $a$ the rolling circle radius, and $\phi' $ the instantaneous curvature. At the cusp point automobile stops and reverses towards the opposite direction. The ODE can be integrated with usual RK4 method.

enter image description here

a=1;phi=1.57;xi=0.1a;yi=0. a;smax=7.9999a;
NDSolve[{PH'[s] Cos[PH[s]]==-1/(4a),X'[s]==Cos[PH[s]],Y'[s]==Sin[PH[s]],PH[0]==phi,X[0]==xi,Y[0]==yi},{PH,X,Y},{s,0,smax}];
{ph[u_],x[u_],y[u_]}={PH[u],X[u],Y[u]}/.First[%]; ParametricPlot[{x[s],y[s]},{s,0,smax},GridLines->Automatic]
ParametricPlot[{s,Sin[ph[s]] - Sin[phi]},{s,0,smax},GridLines->Automatic]

More than initial value formulations (IVP), boundary value constraints/conditions (BVP), shoot through techniques are useful I believe for your purpose.