Weighted spline for calculating trajectory with lowest possible lateral acceleration
Afficher commentaires plus anciens
Hi,
I have the following five vectors of equal length for a road user travelling on a specific path:
t: time point (s)
(x,y): position (m)
v: speed (m/s)
e: estimation, boolean. If 0, the values in the data point (t,x,y,v) are more accurate
I want to create a trajectory for the positions and with an overall small lateral acceleration (a = v^2 / r).
The estimated points should have a lower weight than the other points.
Is there a function available in Matlab for this task?
Thans in advance,
/Sava
3 commentaires
Bjorn Gustavsson
le 22 Fév 2019
If you have access to the curve fitting toolbox there are spap2 that is for least-square fitting of a spline to data. That should allow you to fit a curve to your data, you would have to come up with some better weights than 0/1, weights should typically be 1/sigma^2, but how you will convert your e variable to suitable weights you'll have to play around with.
HTH
Sava Iancovici
le 25 Fév 2019
Bjorn Gustavsson
le 25 Fév 2019
Well if you have completely missing data-points, then I think you should simply remove them from both x and y, since they should have no influence on the fitting curve at all. The weights W should be the standard deviation (or standard deviation squared, or the inverse of that, I don't have the csapsGVC function).
HTH
Réponses (2)
Greg Dionne
le 25 Fév 2019
0 votes
I'm not certain if I understood your question correctly, but you could try adapting the approach in the drivingScenario trajectory method if you have the Automated Driving Toolbox.
That uses a clothoid curve interpolant, which I think may be what you are after.
Sava Iancovici
le 26 Fév 2019
0 votes
Catégories
En savoir plus sur Splines dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
