Skip to content

Reference Line

Fem(Finite Element Method)pos Smooth

The optimization variables are points(x, y) position. The object function can be wrriten as:

Costall=Costsmooth+Costlength+Costdeviation

Smooth Cost

img

As we can see,

v2=v0+v1

and the shorter |v2| is, the smoother p0p1p2 become. In vector format:

v0=P0P1 v1=P2P1 v2=v0+v1 So,

Costsmooth=k=1n2||2PkPk1+Pk+1||22

This cost can also be descriped as: img

As θ decreases, cosθ decreases too. So,

Costsmooth=k=1n2v0v1|v0||v1|

As we can see, if we use θ for smooth, the cost will not be a qp problem, we should solve it with a nonlinear solver.

Length Cost

Costlength=k=0n2||Pk+1Pk||22

Deviation Cost

Costdeviation=k=0n1||PkPkref||22

Curve Rate Constraints

img

Assumption:

  • |P0P1||P1P2|, each piece of segment has almost the same length;
  • θ is small, so sinθcosθ;
  • dsarcP1P2 , distance between two points is approximately equal to the arc of them.

As we can see in above figure, |P0P1|=|P1P2|, |P0A|=|P0P1| :

Lds=dsR
L=|P0P1+P1P2|=|P1P2|2R