WorksComputer Science
A Singularity Avoiding Track Model for Race Car Optimization
Abstract
A track fitting pipeline is presented that converts a measured racetrack point cloud into a closed, differentiable, three-dimensional surface model suitable for high-fidelity Modelica race-car optimization. The surface is a Monge patch, parametrised by a curvilinear arc-length coordinate measured along the minimum-curvature line (MCL) and a signed lateral offset, with a height polynomial of user-selectable degree capturing the cross-sectional elevation profile. The choice of MCL as the reference line is deliberate since anchoring the same surface on the geometric centre-line can cause adjacent normals to cross inside the drivable region on tight corners. The resulting non-injective parametrisation assigns multiple curvilinear addresses to the same three-dimensional point and returns invalid road geometry. The MCL is obtained from a quadratic program that minimises integrated curvature subject to track-boundary, periodicity, and jerk-regularisation constraints. By reducing total curvature while remaining within the track bounds, the MCL moves the region of parametrisation breakdown outside the drivable strip on all circuits studied, keeps the normal map injective across the full track width, and yields a more linear time-to-arc-length transformation for minimum lap-time problems. The fitted surface and the associated track widths are exported as periodic piecewise-quintic B-splines, solved as a nonlinear program.
Introduction
The track model is a crucial component of minimum lap-time simulations of high-performance vehicles. The contact-patch normal load, the gravitational projections in the body-fixed frame and the kinematic constraints that keep all four wheels on the road are all expressed in terms of the road surface and its first two derivatives [9, 8]. Inaccuracies in the track model therefore propagate directly into the predicted lap time, tyre forces, suspension loads and aerodynamic behaviour, degrading the fidelity of the entire simulation.
The community has converged on a curvilinear description for roads since the work of Cossalter et al. [3]; the recent survey by Limebeer and van de Merwe [9] summarises the line of development. Three-dimensional refinements followed: the Frenet–Serret ribbon of Perantoni and Limebeer (2015) parametrises the road by an arc-length spine plus an orthonormal moving frame and works well on typical racing layouts but assumes lateral flatness; Lovato et al. [10] and Limebeer, Bastin, et al. [8] remove that assumption by superimposing a Monge-patch elevation correction on top of a Frenet ribbon; and most recently Limebeer and van de Merwe [9] dispense with the ribbon altogether and obtain the surface as a free Monge-patch parametrisation identified through an optimal control problem on the lateral polynomial coefficients. The Monge patch removes the need for Euler angles and yields the first and second fundamental forms in closed form from the partials of , but it leaves open the choice of the reference line that anchors the frame.
The Frenet singularity
In every published instance of the curvilinear description, including [9], the reference line is taken as the geometric centre-line of the track, i.e. the average of the left and right boundary polylines. While this choice is intuitive and requires no optimisation, it has a structural defect that is fatal for a production track model, also noted by Fork [5]. Recall that the curvilinear description maps the planar parameters to a 3D point through
where is the reference polyline traced at arc length , is its unit tangent and its unit left normal.
The Frenet–Serret relations on the planar reference give and , with the signed curvature of the reference line. These follow directly from the tangent-angle parametrisation: writing with the heading of the reference tangent and , the left normal is , so that
Figure 1 illustrates this Monge-patch construction, contrasting the geometric centre-line with the minimum-curvature reference line introduced below. Differentiating (1) yields the in-surface tangent vectors

Figure 1. Three-dimensional schematic of the Monge-patch track model . The drivable corridor is delimited by the left/right track boundaries (grey); the geometric centre-line (dashed) runs midway between them, whereas the minimum-curvature reference line (black) is free to move laterally within the bounds. The reference-line frame is drawn at a station along the line. At the marked station the vertical cross-section plane is spanned by the lateral normal (the axis) and ; the road altitude along that section is the lateral polynomial (red) shows that the elevation of every surface point above the datum plane equals the value of that polynomial.
so that the first fundamental form of the Monge patch,
has Jacobian determinant
where the longitudinal slope is negligible compared with the lateral slope on racetrack surfaces, so that the vanishing of the Jacobian is controlled entirely by the factor . The map (1) is a local diffeomorphism only where , i.e. where . The critical value
is exactly the centre of curvature of at station .
On some racetracks the centre-line, taken as a planar polyline between two surveyed boundaries, has stretches where its local radius of curvature is smaller than the local half-width of the road, so that and the fold sits inside the drivable region. At every such station the lateral coordinate frame defined by is no longer injective on the full width: two stations produce laterals that intersect inside the road, as shown in Figure 2, and the Jacobian (7) vanishes at and changes sign beyond it. A vehicle dynamics model that queries the joint at such a point receives multi-valued geometry and a vanishing Jacobian, and the resulting tyre-load equations are ill-posed. We have observed this failure mode repeatedly on racing circuits that contain a hairpin or a tight slow-speed sequence, such as the Singapore circuit of the Formula 1 series that is used as the running example throughout this paper.

Figure 2. Geometric origin of the centre-line defect. Where the local radius of curvature of the reference line falls below the half-width of the road, neighbouring lateral vectors intersect inside the drivable region and the Frenet map ceases to be injective.
The same defect is particularly damaging for minimum lap-time formulations because they are usually solved in the spatial domain by doing an independent-variable transformation. Following the standard change of independent variable from time to arc length along the reference line, the dynamics of both the vehicle and the track model are scaled by the factor , with
where are the longitudinal and lateral velocities in the vehicle-fixed body frame and the heading relative to the reference tangent. The denominator is the same Jacobian factor as in (7): as the trajectory approaches the fold , and , collapsing the time transformation and producing a stiff, ill-conditioned NLP whose Hessian becomes singular at exactly the stations the optimiser is most interested in. The minimum-curvature line reduces the curvature peaks responsible for this fold and, on the processed tracks, keeps bounded away from zero on the full track strip. This yields a well-conditioned spatial-domain transcription. Moreover, because the minimum-curvature line typically lies near a track boundary in tight corners, the NLP bounds constrain the vehicle path to have no excursion into the singular region.
A secondary effect compounds the singularity in the same corners: when is measured from the centre-line, cambered slow corners place the largest gradients of at large on the side opposite the apex, and the degree- lateral polynomial expansion of must absorb that asymmetry with larger high-order coefficients, producing spurious wiggles in the partials and that ultimately drive the tyre normal load.
Proposed solution The primary contribution of this paper is a pipeline that fits a singularity-avoiding parameterisation of any track surface discretised by a point cloud, the only requirement being that the point cloud has unique and sorted indices along the longitudinal and lateral directions. The key component is the minimum-curvature reference line, computed via a quadratic program based on Heilmeier et al. [6]. Once the reference line is obtained, the pipeline fits the Monge patch in lateral polynomials of degree and exports an arc-length-parameterised, -continuous, periodic piecewise-quintic representation consumed by Modelica-based race-car optimisation problems.
Racing-line generation has its own large literature that the proposed pipeline draws on. Direct minimum-time optimal control (Perantoni and Limebeer 2015) provides the true optimum but is expensive and requires a vehicle model. Sequential or geometric approaches such as the minimum-curvature quadratic program of Braghin et al. [2] and the iterated, constraint-aware formulation of Heilmeier et al. [6] are within a fraction of a percent of the time-optimal solution while being orders of magnitude faster and vehicle-agnostic; the two-step decomposition of Kapania et al. [7] alternates path and velocity profile. The novel contribution of this paper is to repurpose the minimum-curvature line of Heilmeier et al. [6] and Braghin et al. [2] not as a driving target but as the curvilinear reference that anchors the Monge-patch surface parametrisation of Limebeer and van de Merwe [9], thereby certifying injectivity of the Frenet map on the full track strip.
The rest of the paper is organised as follows. Section 2 develops the fitting pipeline, from the minimum-curvature quadratic program to the piecewise-quintic export. Section 3 shows how the Modelica TrackJoint component uses those splines, and why the differential-algebraic equation it forms needs each property of the export format. Section 4 reports the effect on the conditioning of a full-circuit minimum lap-time problem.
Methodology
The end-to-end pipeline is organised in seven stages:
Parse the structured point cloud exported by the surveyor, where indexes the longitudinal station, the lateral sample at that station, is the measured 3D point and the associated unit surface normal;
Extract the median-lateral reference polyline and the left/right boundaries from the point-cloud lateral indexing;
Solve the minimum-curvature quadratic program on the boundary polylines, iterating on the local linearisation, with periodic -smoothing to suppress active-constraint chatter;
Build the Frenet frame on the resulting line and recover the lateral widths , by ray-polyline intersection with the boundaries;
Re-sample the point cloud onto a longitudinal–lateral grid that is orthonormal with respect to the minimum-curvature line, i.e. aligned with the new frame;
Fit, at each station, the Monge-patch elevation in the lateral coordinate;
Fit each longitudinal channel by a periodic piecewise quintic with continuity at the knots that is consumed by the Modelica-based vehicle and track model.
Surface model
The track is a smooth, regular, orientable two-dimensional manifold . We parametrise it by the Monge patch (1) of Limebeer and van de Merwe [9], with in a rectangular domain , the reference line at arc length , its unit left normal and the vertical unit vector. The elevation is taken in the algebraic-function class of Limebeer and van de Merwe [9],
truncated at a user-selectable degree . In practice we adopt the low order proposed by Limebeer and van de Merwe [9], which is sufficient to capture camber and crown on every circuit we have processed while keeping the lateral derivatives and well behaved.
For any these lateral derivatives exist, and provided each coefficient is a piecewise polynomial in they are also continuously differentiable in up to second order and beyond. Together with and , which are linearly independent everywhere by construction, this provides every quantity needed for the first and second fundamental forms and :
with the unit normal. Together, , and provide the gravity projections, the kinematic constraints involving the body-fixed angular velocities , and the closed-form normal acceleration of [9]. With positive camber defined by positive lateral slope in the direction, the local camber angle is .
Minimum curvature reference line
Here we replace the centre line by the minimum curvature line. The minimum curvature objective minimises the integral of over the closed loop subject to the bounds of the track. We also verify non-intersection of the recovered laterals after the line and widths are recomputed in the minimum-curvature frame. A further geometric benefit is that the line typically hugs the inside boundary through slow corners, so the admissible excursion is effectively one-sided and the relevant shrinks, improving the conditioning of both the lateral polynomial fit and the spatial-domain time transformation of (9).
Quadratic program
Following Braghin et al. [2] and the iterative constraint-aware refinement of Heilmeier et al. [6], candidate points along the line are written as
where is a reference point (initially the centre-line), is its unit left normal, the local left/right widths recovered by ray-polyline intersection against the boundary polygons, and the vehicle width. The objective is a weighted sum of squared discrete curvatures with curvature samples written as second-order finite differences. We retain the cross term in the discrete curvature expansion and omit explicit curvature constraints because the closed-loop containment check described below guarantees strict containment.
The objective is augmented with two regularisers. A length-cost discourages local stretching of the discretisation when the boundaries are noisy.
A jerk-cost removes residual two-sample chatter at stations where the bound constraints are exactly active. To reduce sensitivity to non-uniform sampling, the second- and third-difference rows are weighted by and , respectively. The resulting QP has the standard form subject to the margin-shrunk box constraints . Concretely, the three penalty groups are assembled into a single weighted least-squares residual . We introduce the periodic circulant difference operators with stencils , and , the diagonal weight matrices , and , and the normal-projection diagonals , . With the reference-point coordinate vectors, the residual is the block-sparse stack and , where the and component rows are stacked per penalty group. The Hessian and the linear term of the QP then follow as the Gauss–Newton products and , so that is symmetric positive semidefinite and banded by the four-point periodic stencil, and collects the curvature, length and jerk of the current frozen reference . The QP is solved with OSQP ([15]).
Figure 3 shows the same hairpin region as Figure 2, now anchored on the minimum-curvature line produced by the pipeline of § 2.2. It can be seen that the recovered laterals no longer cross inside the drivable region.
Figure 3. Result of the proposed reference-line construction on the same hairpin region as Fig. 2. The minimum-curvature line (MCL, red) stays strictly inside the track and the recovered laterals (grey) no longer intersect within the drivable region, restoring injectivity of the Frenet map.
Iteration, smoothing and containment
A single QP solve does not return the true minimum-curvature line, because the parameterisation in (13) is linear in only for a frozen reference , whereas the underlying minimum-curvature problem is nonlinear in the position of the line itself. Three coupled approximations are introduced when the reference is fixed:
Geometric linearisation of curvature. The discrete curvature operator is built as a second finite difference of projected onto the reference normals . This is a Gauss–Newton-style linearisation of about the current line; the true depends nonlinearly on the tangent rotation between adjacent samples, which itself changes once moves the line. A single solve therefore only yields a curvature-reducing step.
Stale arc-length and normals. The row weights and , the normals and the second-difference stencil are all computed on the previous reference. After the line shifts, and the local normal direction change, so the discrete operator no longer represents on the updated geometry until the reference is refreshed and the arc-length re-sampling is repeated.
Stale lateral bounds. The half-widths are obtained by ray-casting from the reference along to the boundary polygons. Once the line has moved laterally by , the ray footpoint and direction at the new station are different and the old bounds are merely an approximation; in particular, on tight corners the new line can land outside the polygon that the old bounds claimed to enclose it in (see the containment step below).
We therefore wrap the QP in a fixed-point iteration: followed by an arc-length re-sampling and recomputation of normals, and ray-cast widths before the next solve. In practice, 3–5 iterations suffice.
This outer loop is structurally an SQP step. It’s effectively a convex QP built on a linearisation of a nonlinear problem, iterated to a fixed point. We avoid a general-purpose SQP/NLP solver such as IPOPT (Wächter and Biegler [16]) because the dominant nonlinearities such as ray-polyline intersections for width computation, polygon containment of the MCL and arc-length resampling, are non-smooth operations in terms of . With these quantities frozen, each subproblem is a convex QP with banded Hessian , making OSQP a natural choice.
Because widths are computed at the previous reference, the new line can in pathological cases land slightly outside the boundary polygons. A boolean inside/outside test using contains_points flags such points after every solve. If any point is flagged, the iteration is rejected and the line reverts to the most recent iteration whose points were all strictly inside. If the bounds become active after the first QP solve, no previous iterate is available to fall back on, so we keep the solution and rely on the smoothing step below to remove bound-induced noise in the line and laterals. After each solve, the discrete is filtered with a short periodic centred moving average that suppresses the two-sample zig-zag arising at stations where the bound constraints are active.
Frenet frame and track widths
The closed minimum-curvature line is fitted with a periodic quintic B-spline in arc length. Tangents and unit left normals follow analytically:
Once the reference line is found using the logic of the previous section, the accurate lateral half-widths are computed by ray-polyline intersection of the local lateral against both boundaries in both signs, taking the smallest positive parameter.
Re-sampling and Monge-patch fit
A regular grid is generated on the minimum-curvature frame, so that the sample stations are orthonormal with respect to the reference line and lateral stations sweep , as shown in Figure 4. The elevation at every grid point is obtained from an internal tool that retains a high-density representation of the surveyed surface and queries it at the grid stations to provide elevation values at arbitrary locations beyond those of the original samples. The tool uses Delaunay triangulation of the surveyed points as the primary interpolant, falling back to a radial-basis-function (thin-plate-spline kernel, 50 nearest neighbours) interpolant for query points that lie outside the convex hull of the triangulation. At every longitudinal station the elevation samples are fitted by least squares with the degree- lateral polynomial of (10) as shown in Figure 5.

Figure 4. Regular () resampling of the surveyed point cloud on the minimum-curvature frame.
Figure 5. Lateral degree- polynomial fit of the elevation at each longitudinal station.
Export: C⁴ piecewise quintic
The Modelica model consumes a periodic piecewise-quintic description with shared knots: each of the channels is a polynomial of degree 5 on each segment with continuity at interior knots and strict periodicity of the function value and the first four derivatives at the wrap. Quintics are needed for two reasons: derivatives must be continuous through the expressions for and (§ 2.1), and the track FMU evaluates these in real time inside a Modelica DAE solver that is sensitive to discontinuities in slope.
The fit is formulated as a smoothness-regularised periodic nonlinear program in CasADi (Andersson et al. [1]) and solved by IPOPT (Wächter and Biegler [16]) with the HSL MA57 linear solver (Duff [4]). For a fixed number of segments and a polynomial degree , the variables are the local-basis coefficients :
The objective combines the per-sample least-squares mismatch and the integrals, evaluated by 3-point Gauss–Legendre quadrature, of the squared first to fourth derivatives:
Hard continuity is imposed at every interior knot and at the wrap. For the elevation channels we additionally apply a zero-phase FFT low-pass filter with cutoff wavelength equal to the segment length to prevent the quintic from being asked to represent longitudinal waves in vertical height whose wavelength is comparable to the spacing of its knots, which would otherwise appear as underresolved spline oscillations.
Modelica Implementation
This section describes the receiving end of the pipeline, the TrackJoint component. The companion paper (Sivaramakrishnan et al. [14]) gives the full derivation of the joint, its validation against the LiDAR terrain mesh and its use in time-domain simulation.
TrackJoint is a holonomic two-degree-of-freedom kinematic joint that realises the Monge patch (1) as a Modelica.Mechanics.MultiBody (Otter et al. [12]) component. Its joint coordinates are the same two curvilinear parameters used throughout this paper: the arc-length coordinate (sTrack) measured along the minimum-curvature line, and the signed lateral offset (wTrack). From these two coordinates and the exported channels the joint builds the surface position, the orientation triad and the angular velocity of a single frame_b connector, and closes the road constraint through d’Alembert’s principle.
Parameter record and spline storage
Of the exported channels the joint consumes only the geometry channels , where of (10); at the adopted order this is the six-channel set . The two width channels are not part of the kinematics and are consumed instead as the path constraint on the joint coordinate wTrack in the optimal-control problem.
All geometry enters the joint through a single parameter record. Each channel is stored as the matrix of local monomial coefficients of Section 2.4, of size with , together with one break vector shared by every channel:
Listing 1. Spline storage in the TrackJoint parameter record: one coefficient matrix per exported channel and a single shared break vector.
parameter Real sBreak[nSeg + 1];
parameter Real rxCoeff[nSeg, d + 1];
parameter Real ryCoeff[nSeg, d + 1];
parameter Real rzCoeff[nSeg, d + 1];
parameter Real z1Coeff[nSeg, d + 1];
parameter Real z2Coeff[nSeg, d + 1];
parameter Real z3Coeff[nSeg, d + 1];
Sharing one break vector across channels is why the export step of Section 2.4 solves all channels on a common knot sequence. The segment index is then found once per integration step and reused by every channel. The export also makes the value and the first four derivatives periodic at the wrap, so the joint needs no special case at the start/finish line and simply reduces the arc-length coordinate modulo the track length . The coefficient matrices are declared tunable, so one compiled FMU can be pointed at a different circuit at run time without recompiling.
Segment lookup and Horner evaluation
Because the exported breaks are uniform, the segment index at a query is obtained in constant time,
avoiding the branch-heavy interval search of a general B-spline evaluator. Every channel derivative is then the local monomial sum
evaluated in Horner form by one Modelica function that takes the derivative order as an argument. Both (17) and (18) are branch-free in the continuous variables, so the whole joint traces to a smooth expression graph when CasADi differentiates the FMU at each collocation point. This is also where the degree and continuity chosen in Section 2.4 come from. The joint needs and to form the parametric rotation rates, so reaches 3. The Modelica tool then differentiates the angular-velocity equation once more during index reduction, which takes the requirement to . A piecewise quintic with continuity at every interior knot and at the wrap is the lowest degree that keeps everything the DAE solver differentiates continuous across a knot. A cubic spline leaves jumping at each knot, which makes the integrator chatter at the segment boundaries.
Surface geometry and the d’Alembert constraint
Listing 2 reproduces the equation block that turns the evaluated channels into surface geometry. The height polynomial (10) and its partials are expanded in Horner form, the in-surface tangents and follow directly, and the triad is built analytically from them, so that no Euler angles or quaternions are integrated inside the joint.
Listing 2. Core surface block of the Modelica TrackJoint that consumes the exported channels : Horner height polynomial, surface position and partials, track-frame triad and d’Alembert constraint. The full component is given in [14].
// Height z(s,w) in Horner form and partial
// derivatives
z = rz + wTrack*(z1 + wTrack*(z2 + wTrack*
z3));
dzds = drzds + wTrack*(dz1ds + wTrack*(
dz2ds + wTrack*dz3ds));
dzdw = z1 + wTrack*(2*z2 + wTrack*(3*z3));
// Surface position: lateral offset along
// ground-plane normal
rTrack = {rx - wTrack*dryds, ry + wTrack*
drxds, z};
// First partial derivatives of surface
// position
drds = {drxds - wTrack*d2ryds2, dryds +
wTrack*d2rxds2, dzds};
drdw = {-dryds, drxds, dzdw};
// Track frame triad: tangent, surface
// normal, binormal
nxTrack = normalize(drds);
nzTrack = normalize(cross(drds, drdw));
nyTrack = cross(nzTrack, nxTrack);
// D’Alembert: virtual work in s and w
// directions must vanish
0 = fFrameB*drds + tFrameB*dphids;
0 = fFrameB*drdw + tFrameB*dphidw;
// Frame_b assignment: position and
// rotation matrix
frame_b.r_0 = rTrack;
frame_b.R.T = transpose([nxTrack, nyTrack,
nzTrack]);
The two constraint equations in the listing are the joint’s link back to the geometry of Section 2.1. Instead of introducing Lagrange multipliers for the directions orthogonal to , the body-frame wrench arriv… ing on frame_b is resolved to world orientation with resolve1 and the two generalised forces conjugate to are set to zero,
where are the parametric rotation-rate vectors of the triad. These two relations close the index-1 DAE in and are linear in the wrench components. Their Jacobian has rank two wherever the parametrisation is regular, and the Frenet fold (8) is the configuration in which it loses rank. So the minimum-curvature reference line of Section 2.2 does more than improve the conditioning of the NLP. It is what keeps the Modelica constraint solvable at all.
State selection and MultiBody assembly
The joint declares as StateSelect.always variables so that the tool keeps them as continuous states whatever the surrounding vehicle topology. Without this, state aliasing against a chassis that is otherwise free in makes the dynamic state selection fail. A Connections.root(frame_b.R) statement makes the joint the root of the orientation graph of the subtree it heads, following the pattern of the standard MultiBody joints.
In a vehicle assembly the joint never carries the chassis alone. Stacked on frame_b are a standard Modelica.Mechanics.MultiBody.Joints.Prismatic heave joint along the surface binormal and three revolute joints realising roll, pitch and yaw relative to the track triad. The chassis thus keeps all six degrees of freedom, but each one is expressed relative to the road rather than to the world frame.
FMI 3.0 export and use in FMIOPT
The joint and the host MultiBody vehicle model are compiled in Dymola and exported together as a single FMI 3.0 ([11]) model-exchange FMU. The joint contributes the four continuous states , and the stacked heave and attitude joints a further four position states and their derivatives. Two features of this FMU matter for the optimal-control application. First, is exported as the model variable vsTrack, which is the factor (9) through which the road geometry enters the time-to-space transformation. FMIOPT reads it from the FMI interface and rescales every other state derivative, with no rewriting of the model. Second, the chassis coordinates are track-relative, so a feasible initial guess for a full lap comes from setting every chassis coordinate and every velocity except to zero and prescribing as a linear ramp from 0 to . That puts the vehicle on the road surface with its axes aligned to the track triad at every collocation point, without any preliminary simulation.
Results
The geometric quality of the surface fit was characterised in the previous sections through the per-station residuals of the lateral polynomial expansion (§ 2.3) and the piecewise-quintic export (§ 2.4). We therefore focus here on the downstream consequence of that geometry: whether the resulting track model yields a well-conditioned minimum lap-time problem. The representative case reported below is the Formula 1 Singapore circuit processed by the pipeline.
The TrackJoint component (§ 3) is connected to the multi-body F1 vehicle model in Dymola, and the coupled system is exported as a single FMI 3.0 FMU. FMIOPT then wraps this FMU inside a CasADi (Andersson et al. [1]) direct-collocation NLP and hands the resulting problem to IPOPT (Wächter and Biegler [16]) configured with the MUMPS linear solver. The time-to-space transformation of (9) is supplied by TrackJoint itself. The arc-length coordinate (sTrack) is a continuous state of the joint and its time derivative (vsTrack) is used in the formulation of the joint. FMIOPT uses to recast the dynamics from the time domain into the spatial domain along the reference arc length , so the conditioning of the Jacobian factor directly governs the convergence behaviour of the resulting NLP.
The Singapore circuit contains corners whose radius is smaller than the local road width, and the same geometry has appeared on several other racing circuits processed by the pipeline. Because the centre-line parameterisation is not even well defined on these circuits, the previous version of the track parameterization had to introduce a geometric distortion of the reference by adding a small lateral offset to the centre-line at the offending stations, pushing the fold outside the track width. With the minimum-curvature line no such distortion is required as, by construction, .
This geometric difference appears directly in the lap-time solve. As shown in Figure 6, the centre-line joint in the ribbon-plus-Monge-patch form of Limebeer, Bastin, et al. [8] does not converge: the dual infeasibility oscillates by several orders of magnitude from one IPOPT iteration to the next, the primal residual stalls and IPOPT adds regularisation in later iterations. This is consistent with the numerical signature of an ill-conditioned KKT system in the same tight-corner region where the centre-line parameterisation is geometrically near its Frenet fold.

Figure 6. IPOPT convergence trace of the minimum lap-time NLP on a circuit containing a hairpin tighter than the road is wide. The non-converging case uses the centre-line-anchored track joint of Limebeer, Bastin, et al. [8]: the dual infeasibility jumps erratically across iterations and the problem fails to converge.
With the minimum-curvature joint, all other settings unchanged, the Frenet fold is moved outside the drivable strip. Both primal and dual residuals decrease monotonically to the IPOPT tolerances, and the NLP converges in a comparable number of iterations to problems solved on well-conditioned tracks. This makes several lap-time cases that were previously intractable solvable without modifying the vehicle model or solver settings.
The optimised solution is shown in Figure 7 and Figure 8. The racing line of Figure 7 traces the lateral offset of the vehicle within the drivable strip, while the corresponding speed profile of Figure 8 reports the optimal velocity along the arc length .
Figure 7. Optimal racing line of the minimum lap-time solution on the Singapore circuit, expressed as the lateral offset within the drivable strip.
Figure 8. Optimal speed profile of the minimum lap-time solution along the reference arc length .
Conclusions
A complete pipeline has been described that turns a measured racetrack point cloud into a closed, -continuous Monge-patch surface model for high-fidelity Modelica vehicle simulation. The main point is that the centre-line reference used in Limebeer and van de Merwe [9] and in earlier ribbon-based joints is unsafe in any corner tighter than the road is wide. Anchoring the Monge patch on the minimum-curvature line of Heilmeier et al. [6] and Braghin et al. [2] removes the Frenet singularity, improves the conditioning of the minimum lap-time problem and gives a curvature profile close to the one the vehicle actually experiences.
The TrackJoint Modelica component (Sivaramakrishnan et al. [14]) (§ 3) takes the exported piecewise-quintic splines and enforces the two-degree-of-freedom kinematic constraint via d’Alembert’s principle, and it is the plug-in track interface for the FMIOPT optimal-control toolchain. The export format consists of one knot sequence shared by all channels, quintic segments with continuity, and periodicity at the wrap. The Modelica component consumes this data to construct the track surface geometry and enforce the two-degree-of-freedom kinematic constraint. The pipeline runs in roughly 5 minutes per circuit and reproduces the surveyed elevations and bounds to an order of a few centimetres. Future work will look at replacing the rectangular grid with an adaptive mesh, and at using a dynamic racing line as the reference to make the time transformation more nearly linear.
Acknowledgements
We gratefully acknowledge Joel Andersson for the development of the FMIOPT toolchain that transcribes and solves the minimum lap-time problems on which the pipeline is exercised.
References
- [1]Andersson, J. A. E., J. Gillis, G. Horn, J. B. Rawlings, and M. Diehl (2019). “CasADi – a software framework for nonlinear optimization and optimal control”. In: Mathematical Programming Computation 11.1, pp. 1–36. DOI: 10.1007/s12532-018-0139-4.DOI
- [2]Braghin, F., F. Cheli, S. Melzi, and E. Sabbioni (2008). “Race driver model”. In: Computers & Structures 86.13–14, pp. 1503–1516. DOI: 10.1016/j.compstruc.2007.04.028.DOI
- [3]Cossalter, V., M. Da Lio, R. Lot, and L. Fabbri (1999). “A general method for the evaluation of vehicle manoeuvrability with special emphasis on motorcycles”. In: Vehicle System Dynamics 31.2, pp. 113–135. DOI: 10.1076/vesd.31.2.113.2094.DOI
- [4]Duff, I. S. (2004). “MA57—a code for the solution of sparse symmetric definite and indefinite systems”. In: ACM Transactions on Mathematical Software 30.2, pp. 118–144. DOI: 10.1145/992200.992202.DOI
- [5]Fork, Thomas (2024). “Non-Euclidean Vehicle Motion Model”. UC Berkeley Electronic Theses and Dissertations. Ph.D. dissertation. University of California, Berkeley.
- [6]Heilmeier, Alexander, Alexander Wischnewski, Leonhard Hermansdorfer, Johannes Betz, Markus Lienkamp, and Boris Lohmann (2020). “Minimum curvature trajectory planning and control for an autonomous race car”. In: Vehicle System Dynamics 58.10, pp. 1497–1527. DOI: 10.1080/00423114.2019.1631455.DOI
- [7]Kapania, N. R., J. Subosits, and J. C. Gerdes (2016). “A sequential two-step algorithm for fast generation of vehicle racing trajectories”. In: Journal of Dynamic Systems, Measurement, and Control 138.9, p. 091005. DOI: 10.1115/1.4033311.DOI
- [8]Limebeer, D. J. N., M. Bastin, E. Warren, and H. G. Fensham (2023). “Optimal control of a NASCAR specification race car”. In: Vehicle System Dynamics 61.5, pp. 1210–1235. DOI: 10.1080/00423114.2022.2067573.DOI
- [9]Limebeer, D. J. N. and C. V. van de Merwe (2025). “Another look at 3D road surface modelling”. In: Vehicle System Dynamics. Published online 7 July 2025. DOI: 10.1080/00423114.2025.2525240.DOI
- [10]Lovato, S., M. Massaro, and D. J. N. Limebeer (2021). “Curved-ribbon-based track modelling for minimum lap-time optimisation”. In: Meccanica 56.8, pp. 2139–2152. DOI: 10.1007/s11012-021-01387-3.DOI
- [11]Modelica Association (2023). Functional Mock-up Interface Specification, version 3.0. https://fmi-standard.org.
- [12]Otter, M., H. Elmqvist, and S. E. Mattsson (2003). “The New Modelica MultiBody Library”. In: Proceedings of the 3rd International Modelica Conference. Linköping, Sweden, pp. 311–330.
- [14]Sivaramakrishnan, S., B. Danaei, A. Verulkar, and R. Trinter (2026). “A 2-DOF Multibody Track Joint for Race Car Optimization”. In: Proceedings of the North American Modelica and FMI Conference. Atlanta, GA, USA.arxiv.org/abs/2610.36407
- [15]Stellato, B., G. Banjac, P. Goulart, A. Bemporad, and S. Boyd (2020). “OSQP: an operator splitting solver for quadratic programs”. In: Mathematical Programming Computation 12.4, pp. 637–672. DOI: 10.1007/s12532-020-00179-2.DOI
- [16]Wächter, A. and L. T. Biegler (2006). “On the implementation of an interior-point filter line-search algorithm for large-scale nonlinear programming”. In: Mathematical Programming 106.1, pp. 25–57. DOI: 10.1007/s10107-004-0559-y.DOI



