Manuscript Offprint
arXiv:2610.36407A 2-DOF MultiBody Track Joint for Race Car Optimization
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Abstract
TrackJoint is a Modelica MultiBody component that turns a three-dimensional road surface into a joint with two degrees of freedom. The two joint coordinates are the distance travelled along a reference line and the sideways offset from that line. Together they give the position, orientation and angular velocity of a single frame_b connector. All road geometry reaches the joint as a small set of periodic piecewise-quintic splines, so one component can represent any circuit whose splines have been fitted beforehand. The road constraint is closed with d'Alembert's principle. The two generalized forces that belong to the joint coordinates are set to zero, so no Lagrange multipliers are needed. The joint is connected to a multibody race car in Dymola and the pair is exported as one FMI 3.0 FMU. The same FMU is then used for time-domain simulation and for CasADi/IPOPT minimum lap-time optimization, with no change to the model in between. This works because the joint keeps the arc-length coordinate as a real state and publishes its time derivative, which is the quantity that lets the problem be rewritten with distance We report results for minimum lap time simulations on the Singapore Formula 1 circuit.
Keywords: Modelica, MultiBody, Functional Mockup Unit, race car simulation, minimum lap time, track model, Monge patch, kinematic joint, d'Alembert principle, optimal control, optimization, CasADi, FMIOPT
1 Introduction
Race-car simulation in Modelica relies on a road model that generates accurate surface geometry in terms of position, orientation and angular velocity for each tire contact patch. Inside a generic MultiBody vehicle simulation this is naturally expressed by a Modelica joint that constrains the chassis of the vehicle to lie on the road surface while leaving the in-plane road coordinates free. For ideal flat surfaces this role is filled by Modelica.Mechanics.MultiBody.Joints.Planar. Although analytically defined ribbons have been used in earlier race-car work (Perantoni and Limebeer 2015; Lovato et al. 2021), they are typically hand-coded inside a surrogate optimization model rather than packaged as a reusable MultiBody component. The idea of a reusable path-following joint that constrains motion to a spline-parametrized curve has been formulated symbolically in a graph-theoretic multibody setting by Hall et al. (2014). This method is used to reduce complex automotive suspension linkages into a single degree-of-freedom joint for computational efficiency. A more closely related precedent is the Claytex.Mechanics.MultiBody.Joints.Rail joint of the commercial Claytex library (Briant 2021), which constrains a frame_b to follow a one-dimensional B-spline rail parametrized by arc length s and resolves the wrench through the spline-derivative projection that we also adopt below. The Claytex component is, however, restricted to a curve: it leaves a single translational degree of freedom and exposes the orientation either as a heading frame slaved to the rail tangent or as three independent angle splines.
This paper presents TrackJoint, a Modelica Multi-Body joint that takes the Claytex Rail idea as its starting point and extends it from a 1-DOF rail to a 2-DOF Monge-patch racetrack surface. The body is now free to move both along a planar reference line (s) and laterally across it (w); the orientation triad is constructed analytically from the surface partials rather than from a separate angle table; and the wrench is closed by two d'Alembert relations rather than one. The underlying surface model is the Monge patch (Limebeer and van de Merwe 2025; do Carmo 1976)
where is the world-frame position of the track point identified by , is the planar reference line, its ground-plane left normal and
the lateral cubic in w proposed by Limebeer and van de Merwe (2025) for elevation. The six channel splines are obtained from a separate fitting pipeline that processes a measured racetrack point cloud and exports them as periodic piecewise-quintic ( at the knots) B-splines anchored on the minimum-curvature line of the circuit (Verulkar et al. 2026; Heilmeier et al. 2020; Braghin et al. 2008). Here denotes the fixed world Cartesian basis. The present paper takes those splines as given and concentrates on the Modelica joint that consumes them.
The contribution of this paper is a Modelica implementation of a track joint that exposes the road surface as a single reusable MultiBody component suitable for both time-domain simulation and optimization. For efficiency the per-step evaluation is implemented with Horner expansion of the Monge cubic, constant-time segment lookup on the uniform break vector and a shared spline evaluator, so that the same component is cheap to evaluate at every collocation point of a CasADi/IPOPT (Andersson et al. 2019; Wächter and Biegler 2006) minimum lap-time problem. The model also ensures sufficient accuracy to the LiDAR measurements of the track and can be used in time-domain simulation of a multibody race car driven around a closed circuit.
The remainder of the paper is organized as follows. Section 2 recalls the Monge-patch surface formulation and fixes the notation used by the joint. Section 3 derives the joint equations from (1)–(2). Section 4 discusses the Modelica implementation and the FMI export. Section 5 reports the two downstream use cases.
Differentiating the surface position once gives the in-surface tangent vectors
in which the lateral derivatives and follow from the cubic (2),
The surface unit normal is
and a right-handed surface triad is , identical to that adopted in (Limebeer and van de Merwe 2025).
The constraint that keeps the attached body on M leaves two degrees of freedom, namely the parameters s and w. The Modelica joint carries and their first time derivatives as states, and works everything else out from the splines at the current s.
2.1 Regularity of the parametrization
The joint only works where the patch (1) is locally invertible. That puts a condition on the reference line. Let be the signed planar curvature of . The cross product of the in-surface tangents (3)–(4) then has magnitude
so the patch breaks down on the fold
which is the centre of curvature of the reference line. Suppose the reference line is the geometric centre-line. In any corner whose radius of curvature drops below the local half-width of the road we get , so the fold sits inside the drivable strip. There the map stops being one-to-one, and the joint hands back two different points for the same along with a Jacobian that goes to zero. This happens in the slow corners, which are the ones that decide lap time. Anchoring the splines on the minimum-curvature line lowers the curvature peaks and moves the fold outside the strip. The joint therefore needs its input data to satisfy
which we check for every circuit used in this paper in Section 5.3.
2.2 Continuity required of the splines
The joint needs high derivatives of its inputs. The rotation rates in Section 3.2 use the third s-derivative of the planar channels and . The Modelica tool then differentiates the angular-velocity equation once more while it reduces the DAE index, which takes the requirement up to a fourth derivative. A piecewise quintic with continuity at the interior knots and at the wrap is the lowest degree that keeps all of these continuous across a knot. A cubic spline leaves jumping at every knot, which makes the integrator chatter at the segment boundaries. That is why the fitting pipeline (Verulkar et al. 2026) exports quintics even though cubics would be enough for the surface on its own.
3 Joint formulation
Figure 1 illustrates the overall working principle of the joint. The body frame_b is pinned to the road surface M and retains exactly the two in-plane degrees of freedom . From these coordinates the joint reconstructs the full pose and angular velocity of the connector and projects the constraint forces onto the surface, as detailed in the subsections below.
3.1 States and frame outputs
The joint has two free coordinates with derivatives . Their values at any instant determine the position, orientation and angular velocity of the frame_b connector. The position is given directly by (1) as , while orientation and angular velocity follow
where are the parametric rotation-rate vectors of the surface triad with respect to and , and is

Figure 1. Schematic of the TrackJoint. The body frame_b is constrained to the Monge-patch surface M and is free to move along the reference line (s) and laterally across it (w). At the current (s, w) the joint evaluates the six channel splines to build the surface position and the right-handed surface triad , whose tangent follows the reference line and whose normal is the surface normal. The reaction wrench is resolved onto the two free directions through the d'Alembert projection.
the rotation matrix associated with that frame; and is its world-frame angular velocity. Equation (12) expresses the world-frame angular velocity as a linear combination of two parametric angular velocities, exactly as in the standard MultiBody treatment of any two-parameter rigid kinematic chain.
3.2 Parametric rotation rates
The rotation-rate vectors are obtained in closed form from the surface partials. Let denote either parameter. Since the triad is orthonormal for every , its parametric derivative is skew-symmetric, so there exists a unique vector with
and may be recovered from any two columns by . Building it from the two pieces that the surface partials already give is cheaper and better conditioned, and is implemented in this code.
Write for the un-normalized binormal, so that . Differentiating this quotient gives
the component of tangent to the surface. Compare (14) with (13) for and use . This identifies the two in-plane components of as . That term turns the triad about axes lying in the surface, so it is the roll and pitch part. It says nothing about the component along , because turning about does not move .
That remaining component is fixed by the tangent column. From and (13) for ,
where the normalization factor drops out because only the part of orthogonal to survives the projection onto . This is the turn about the surface normal, so it is the yaw part. Adding the two contributions and setting to s and then to w gives
The required derivatives of c follow from the product rule,
which combined with (3)–(4) only require the spline values up to the third s-derivative , the second s-derivative of the height channels and the lateral derivatives of up to second order for ).
3.3 Time-to-space transformation for minimum lap-time problems
A minimum lap-time problem is naturally posed with the arc-length coordinate rather than physical time as the independent variable, so that the integration domain is fixed and the lap time becomes the cost ( is the track length). The change of variable rests on the single scalar relation
where are the chassis velocity components in the track triad, the chassis yaw relative to the reference-line tangent, and the planar curvature of the reference line. Every other state derivative in the vehicle model is then rescaled as before being handed to the collocation transcription. The factor s is therefore the single quantity through which the road geometry enters the time-to-space transformation.
The present joint exports s as the state variable vsTrack = der(sTrack), declared with StateSelect.always so that any Modelica tool retains it as a continuous output of the FMU into which the host vehicle model and the joint are exported together. The FMIOPT transcription reads this variable directly from the exported FMI 3.0 interface and uses it to rescale every other state derivative without any further model modification. It supplies the one quantity the time-to-space transformation needs, which makes it a prerequisite for the minimum lap-time application reported in Section 5.
3.4 D'Alembert constraint
Rather than introducing two Lagrange multipliers for the orthogonal directions to , we close the kinematic chain by setting the two generalized forces conjugate to to zero. Resolving the body-frame wrench on the frame_b connector to the world orientation, , , the principle of virtual work gives
Equations (21)–(22) provide the two algebraic equations needed to close the index-1 DAE in once the vehicle dynamics couple the wrench to the states. They are linear in the six wrench components and can be written as with the matrix
The DAE is solvable when , and that depends only on the surface geometry.
Proposition 1. rank A = 2 if and only if and are linearly independent, i.e. if and only if .
Proof. The first three columns of A are . If these two vectors are independent that block already has rank two, so . Conversely, suppose for some . Then , the triad is undefined, and by (16)–(17) the rate vectors degenerate to as well, so the second row of A is times the first and .
By (8) the condition in Proposition 1 fails exactly on the fold (9). So the Frenet fold reported in (Verulkar et al. 2026) is more than an awkward piece of geometry. It is the configuration in which the joint's constraint Jacobian loses rank and the DAE can no longer be solved. Condition (10) on the input splines is what keeps A at full rank across the whole drivable strip.
3.5 Compact form of the implementation
Listing 1 reproduces the equation block of the Modelica component. It evaluates the spline channels at the current s, expands the Monge cubic in Horner form, assembles the surface partials (3)–(4) and their parametric derivatives, builds the triad and the parametric angular velocity vectors (16)–(17), and asserts the constraints (21)–(22).
Listing 1. Equation block of TrackJoint. The reference line and height channels are evaluated by a piecewise spline function bound to the current segment index ix. The Monge cubic and its partial derivatives are computed in Horner form. The surface triad and the parametric rotation-rate vectors follow directly, and the d'Alembert relations close the 2-DOF DAE without Lagrange multipliers.
// Height z(s,w) in Horner form and partial derivatives z = rz + wTrack*(z1 + wTrack*(z2 + wTrack z3)); dzds = drzds + wTrack(dz1ds + wTrack*(dz2ds + wTrackdz3ds)); dzdw = z1 + wTrack(2z2 + wTrack(3z3)); d2zds2 = d2rzds2 + wTrack(d2z1ds2 + wTrack*(d2z2ds2 + wTrackd2z3ds2)); d2zdsdw = dz1ds + wTrack(2dz2ds + wTrack(3dz3ds)); d2zdw2 = 2z2 + wTrack*(6*z3);
// Surface position and partial derivatives rTrack = {rx - wTrackdryds, ry + wTrackdrxds, z}; drds = {drxds - wTrackd2ryds2, dryds + wTrackd2rxds2, dzds}; drdw = {-dryds, drxds, dzdw}; d2rds2 = {d2rxds2 - wTrackd3ryds3, d2ryds2 + wTrackd3rxds3, d2zds2}; d2rdsdw = {-d2ryds2, d2rxds2, d2zdsdw}; d2rdw2 = {0, 0, d2zdw2};
// Track triad: tangent, normal, binormal nxTrack = normalize(drds); nzTrack = normalize(cross(drds, drdw)); nyTrack = cross(nzTrack, nxTrack);
// Parametric angular-rate vectors ( compact triad transport) cTrack = cross(drds, drdw); dcTrackds = cross(d2rds2, drdw) + cross(drds, d2rdsdw); dcTrackdw = cross(d2rdsdw, drdw) + cross(drds, d2rdw2); dphids = cross(nzTrack, dcTrackds)/length(cTrack) + ((d2rds2 *nyTrack)/length(drds))nzTrack; dphidw = cross(nzTrack, dcTrackdw)/length(cTrack) + ((d2rdsdwnyTrack)/length(drds))*nzTrack;
// Frame_b angular velocity from parametric rates derPhiTrack = dphidsvsTrack + dphidwvwTrack;
// D'Alembert: virtual work in s and w directions 0 = fFrameBdrds + tFrameBdphids; 0 = fFrameBdrdw + tFrameBdphidw;
// Frame_b: position, rotation matrix, angular velocity frame_b.r_0 = rTrack; frame_b.R.T = transpose([nxTrack, nyTrack, nzTrack]); frame_b.R.w = frame_b.R.T*derPhiTrack;
Several design choices in the listing are worth noting.
• Ground-plane lateral direction. The lateral offset direction is the ground-plane normal to the reference-line tangent, so the orientation of frame_b is determined entirely by the spline first and second s-derivatives. No additional yaw spline is needed and there is no quaternion or Euler-angle integration in the joint.
• Horner evaluation. The Monge cubic and its s- and w-partials are evaluated in Horner form. Horner's method is the backward-stable way to evaluate a polynomial, so it keeps the relative error small in the high-order derivatives that feed the surface triad and the acceleration-level constraint. It is not the cheapest form here, though. The Modelica tool expands integer powers and then shares common subexpressions across the local coordinate that all channels have in common, so an explicitly expanded polynomial compiles to faster code. Section 5.3 measures both effects. We keep Horner form for the conditioning of the derivative chain, not for speed.
• D'Alembert constraint. The two generalized forces in the directions are set to zero by projecting the resolved body-frame wrench onto the virtual displacements and . This is equivalent to the principle of virtual work and closes the 2-DOF DAE in the form expected by a Modelica DAE solver without introducing auxiliary multiplier variables.
• continuity requirement. The DAE solver differentiates the angular-velocity equation to form the acceleration-level constraint, which requires the second s-derivatives of every spline channel and the first mixed sw-derivatives. These exist because the export step of the companion fitting pipeline (Verulkar et al. 2026) enforces continuity at every interior knot and at the periodic wrap.
4 Implementation and FMI export
4.1 Parameter record and spline storage
All road geometry enters TrackJoint through a single parameter record. Each of the six channels is stored as a coefficient matrix of size with , plus a single break vector shared by all channels. The break vector is uniform in in the present implementation, which lets the break segment index ix lookup at a query be done in constant time using a custom Modelica function. For nonuniform breaks, the same lookup can be replaced by a binary search without any change to the rest of the joint equations. Once ix is known, every spline evaluation is
performed in Horner form through a custom Modelica function, with the requested derivative order passed as an argument. The function is declared locally with the common segment index ix, s, the polynomial degree and the break vector partially applied, so each per-channel evaluation call only selects its coefficient matrix and its derivative order.
4.2 State selection and initialization
The joint declares the four state variables with StateSelect.always so that a Modelica compiler chooses them as continuous states regardless of the surrounding vehicle topology, eliminating state-aliasing failures observed when the chassis floor was otherwise free in . Initial values are exposed as parameters and propagated to the start attribute of the corresponding states. A boolean override is provided to relax the state selection in cases where the user prefers the tool to choose.
4.3 MultiBody integration
The joint exposes a single MultiBody Frame_b connector (from Modelica.Mechanics.MultiBody.Interfaces). A Connections.root(frame_b.R) statement establishes the joint as the root of the orientation graph of the kinematic subtree it heads, mirroring the pattern used by the standard MultiBody joints. The body-frame wrench arriving on the connector is rotated to world orientation by the inverse of the triad,
fFrameB = resolvel(frame_b.R, frame_b.f); tFrameB = resolvel(frame_b.R, frame_b.t);
and used in the d'Alembert relations (21)–(22).
In a complete vehicle assembly the joint never carries the chassis on its own. The frame_b of TrackJoint is followed by a standard Modelica.Mechanics.MultiBody.Joints.Prismatic heave joint oriented along the surface binormal , and by three revolute joints that realize roll, pitch and yaw of the chassis relative to the track triad rather than relative to the world frame. Note that is the vertical, out-of-plane direction of the patch. It is not the in-surface lateral normal , along which the joint coordinate w is already measured. The chassis therefore retains its full six degrees of freedom, but each one is naturally aligned with the road: the heave coordinate is the vertical ride height above the patch along , and the three angles are the chassis attitude as a driver would describe it. This decomposition is what enables the initialization strategy discussed in Section 5.
4.4 FMI 3.0 export
In use, the joint is connected inside Dymola to a Modelica MultiBody vehicle model and the closed system is exported as a single FMI 3.0 model exchange FMU. The joint contributes the four continuous states to the exported state vector; the heave prismatic along the surface binormal (vertical, out-of-plane) and the three track-relative roll/pitch/yaw revolute joints stacked on top of frame_b contribute a further four position states and their derivatives, so that the chassis exposes its six degrees of freedom relative to the road surface. The remaining states, inputs and outputs of the FMU are those of the host vehicle model. The spline coefficient matrices of the joint appear as tunable parameters of the combined FMU so that a single FMU binary can be re-targeted to a new circuit at run-time without re-compilation. This is the form consumed by the FMIOPT direct-collocation transcription described in Section 5.
5 Results
We illustrate the use of TrackJoint in two settings.
5.1 Time-domain simulation
A Modelica experiment is constructed as shown in Figure 2 in order to validate the track surface produced by TrackJoint. In this experiment, a point-mass is driven around the Singapore Grand Prix Circuit along the minimum curvature line from the companion pipeline (Verulkar et al. 2026) with the joint as the only constraint. The resultant road surface is compared against the meshed terrain from the LiDAR point cloud of the Singapore Grand Prix Circuit using rFPro Terrain Server.
Figures 3 and 4 show the simulation results from Dymola 2026x Refresh 1, which compare the reconstructed track surface geometry produced by the joint with the 3D mesh road geometry from the LiDAR point cloud. The reconstructed surface at closely tracks the 3D mesh road geometry in absolute height, grade and bank angles across the lap, which confirms that the joint faithfully reproduces the measured road surface in time-domain simulation.
5.2 Minimum lap-time direct collocation
The multibody vehicle-plus-track-joint FMU described in Section 4.4 is then handed to the FMIOPT toolchain, which wraps it inside a CasADi direct-collocation NLP (Andersson et al. 2019) solved by IPOPT (Wächter and Biegler 2006) with the MUMPS linear solver. Because the joint exposes the parametric Jacobian factor through , the standard time-to-space transformation (20) is built directly from the splines without any further model modification. On every circuit on which

Figure 2. Modelica validation experiment of a point mass driven around the track using TrackJoint.
the splines are anchored on the minimum-curvature line of (Verulkar et al. 2026), the denominator of (20) stays bounded away from zero on the full track strip and the NLP converges to the IPOPT tolerances; on circuits on which the splines are anchored on the geometric centerline, the same NLP exhibits the convergence failure documented in the companion paper. This is what Proposition 1 means in practice. The denominator of (20) is the same factor that sets the rank of the constraint Jacobian (23), so a reference line that breaks (10) hurts the transcription and the joint at the same time. Section 5.3 gives the margin for all 23 circuits and the solve statistics for Singapore.
A second, equally important role of TrackJoint in the direct-collocation pipeline is the initialization of the NLP. Because the chassis degrees of freedom are expressed relative to the track triad through the heave prismatic and the three track-relative revolute joints stacked on top of frame_b, a feasible initial guess for an entire lap is produced by setting every chassis coordinate (heave, roll, pitch, yaw, lateral offset w) and every velocity except s to zero, and prescribing as a linear ramp from 0 to L over the normalized time horizon . This guess is trivial to generate, requires no preliminary simulation and no knowledge of the circuit beyond its length, yet it places the vehicle exactly on the road surface with its body axes aligned to the track triad at every collocation point. For Singapore the guess is 324 copies of the same zero vector for every chassis coordinate together with a linear ramp , and from that IPOPT reaches Optimal Solution Found in 264 iterations (Table 2). It works because the track-relative decomposition makes the guess satisfy the road constraint by construction. With all chassis coordinates at zero the vehicle sits on with equal to the surface triad, so the two d'Alembert relations already hold at the first iterate and only the vehicle dynamics are left to resolve. In our experience this is what al-

Figure 3. Validation of the TrackJoint surface output against the measured track geometry of the Singapore Grand Prix Circuit from LiDAR point cloud.

Figure 4. Path of the point mass driven through the TrackJoint and the error in absolute height against the 3D mesh track surface of the Singapore Grand Prix Circuit constructed from LiDAR point cloud.
lows IPOPT to take its first steps without running into the orientation-singular regions that plague world-frame chassis parametrizations, and it is the practical reason why the same NLP converges on every circuit fitted by the companion pipeline.
Figures 5 and 6 show the result of a minimum lap-time optimization problem of a full-detail multibody vehicle model driven around the Singapore Grand Prix Circuit through TrackJoint. Figure 6 plots the optimized racing line on the track strip generated by the joint splines, and Figure 5 the corresponding optimized velocity profile along the lap. Both quantities are produced in a single converged solve of the FMIOPT direct-collocation NLP, illustrating that the TrackJoint component yields a well-conditioned NLP suitable for full-circuit minimum lap-time optimization of a detailed multibody vehicle.

Figure 5. Optimized velocity profile of a multibody vehicle model driven around the Singapore Grand Prix Circuit using TrackJoint in a FMIOPT minimum lap-time problem.

Figure 6. Optimized racing line of a multibody vehicle model driven around the Singapore Grand Prix Circuit using TrackJoint in a FMIOPT minimum lap-time problem.
5.3 Quantitative benchmarks
All measurements below were taken on one desktop workstation with Dymola 2026x Refresh 1. Timings are medians of five repetitions.
Circuit coverage. The joint has been run on the 23 Formula 1 circuits of the 2026 calendar. Every circuit is fitted with a uniform 5 m knot spacing, which gives 657–1387 quintic segments for track lengths of 3283–6934 m. A complete spline parameter record is about 1.2 MB of JSON. Table 1 lists the extremes. The injectivity margin (10) is above one on all 23 circuits. The tightest is 1.03 at Monaco, where the reference line comes down to a 9.3 m radius. The set covers both very tight corners (Monaco, Singapore) and steep camber (Zandvoort, up to 16.2° of bank).
Per-step evaluation cost. To measure the cost of the joint on its own, a unit point mass was driven one full lap through it with a fixed-step fourth-order Runge–Kutta integrator over 180,000 steps, so that every variant makes exactly 720,000 model evaluations. The released Horner version costs 3.54 s of integration CPU time, which is 4.9 s per model evaluation for the whole 2-DOF joint including the triad and both rotation-rate vectors. Writing every polynomial out in expanded power form, and changing nothing else, gives bit-identical trajectories for 2.63 s, or 26% less. The expanded form wins because Dymola turns integer powers into repeated multiplications and then shares across all eight channels and all four derivative orders. The Horner recursion instead gives each of the 26 evaluations its own chain of dependent multiply-adds. We keep Horner form for the accu-
Table 1. Geometry of the fitted circuits: track length , number of quintic segments, minimum reference-line radius, maximum bank angle and injectivity margin . Extremes of the 23-circuit set.
| Circuit | L [m] | [m] | bank [°] | margin | |
|---|---|---|---|---|---|
| Monaco | 3283 | 657 | 9.3 | 5.2 | 1.03 |
| Zandvoort | 4185 | 837 | 31.2 | 16.2 | 2.32 |
| Singapore | 4858 | 972 | 23.0 | 2.1 | 1.56 |
| Spa | 6934 | 1387 | 22.5 | 4.6 | 1.42 |
| Silverstone | 5798 | 1160 | 41.2 | 1.9 | 2.38 |
| all 23 | 3283 | 657 | 9.3 | 1.5 | 1.03 |
| (range) | 6934 | 1387 | 41.2 | 16.2 | 2.89 |
Table 2. Singapore minimum lap-time NLP with the two FMU builds, which differ only in the spline evaluation function. Identical track, setup, guess, mesh and solver options.
| Horner | expanded | |
|---|---|---|
| IPOPT status | optimal | optimal |
| Iterations | 264 | 249 |
| IPOPT time [s] | 464.4 | 442.5 |
| Final NLP error | ||
| Lap time [s] | 90.6462 | 90.6429 |
racy reason below, not for speed.
Evaluation accuracy. We evaluated both forms in double precision at every segment of the Singapore fit and compared them against a 60-digit reference evaluation of the same polynomial. Over 972 segments, all six channels and derivative orders 0–3, the largest relative error is for Horner and for the expanded form. So Horner is at best a factor 1.9 more accurate, and on some channels the order reverses. Both sit far below any tolerance that matters physically at this knot spacing. The difference only starts to count for much coarser knots.
FMU size and NLP performance. The vehicle-plus-joint model exports to an FMI 3.0 model-exchange FMU with a 35.5 MB shared library (10.9 MB archived). On the Singapore circuit the transcription uses 323 intervals (324 collocation points) and the solve is warm-started only by the trivial guess described above. Table 2 reports the back-to-back result for the two FMUs, which differ only in the body of the spline evaluation function; both consumed byte-identical problem data. Both reach Optimal Solution Found, and the lap times agree to 3.3 ms out of 90.6 s, a relative difference of . The iteration counts differ by 6%. We read that as the sensitivity of a nonconvex interior-point path to perturbations of order , not as a real advantage either way. On this evidence the choice of evaluation form makes no measurable difference to convergence.
The FMU, not the linear algebra, dominates the cost of a solve. Of the 464 s total, 167 s go into 266 objective-gradient evaluations (627 ms each), 120 s into 389 constraint evaluations (310 ms each) and 23 s into 266 constraint-Jacobian evaluations (85 ms each). Making the road model cheaper to evaluate therefore pays off directly, which is why the 26% figure above is worth having.
Table 3. Claytex Rail versus TrackJoint.
| Rail | TrackJoint | |
|---|---|---|
| Free DOF | 1 (s) | 2 (s, w) |
| Geometry | space curve | Monge-patch surface |
| Orientation | rail tangent or 3 angle tables | analytic triad from surface partials |
| Input data | xyz or xyzsample table | 6 quintic splines+ shared knots |
| Constraint | 1 projection | 2 d'Alembert relations |
| Camber/crown | Constant (centerline) | z(s, w) polynomial |
Comparison with the Claytex Rail joint. Table 3 sets the present component beside the 1-DOF rail joint (Briant 2021). The differences are about what the two components can represent. Rail holds a body on a curve and has to be told its orientation, either by tying it to the tangent or through three extra angle tables. TrackJoint holds a body on a surface and works the whole orientation triad out from the surface partials. Timing the two against each other would not mean much, since they solve different problems. The point is that the second degree of freedom, the analytic triad and the second d'Alembert relation all come from six scalar splines and no extra tabulated data.
6 Limitations
There are limits to what the component does today, and to what the measurements above can show.
Dependence on the fitting pipeline. The joint uses splines it does not produce, and it cannot tell at run time that a reference line was badly anchored. If (10) is broken, the constraint Jacobian quietly loses rank in the offending corner. A cheap guard would be to export with the splines and assert on it at initialization. The present version does not do this.
Validation scope. We validated the surface against Li-DAR terrain for one circuit and one point-mass run, and the optimization results use one vehicle, one setup and one initial guess per circuit. We have not run a spline-resolution sensitivity study or a multi-seed convergence study, so our comments about robustness are experience rather than measurement.
Availability. TrackJoint is proprietary. We give the formulation in full here so that it can be reimplemented, but the component, the vehicle models and the fitted circuit data are not public.
Implementation restrictions. The break vector is uniform, so non-uniform knots would need a search in place of the constant-time index lookup. The joint assumes a closed circuit and reduces s modulo the lap length. It exposes one frame_b, so four-wheel contact-patch queries need four instances sharing one parameter record.
7 Conclusions
Packaging a racetrack surface as an ordinary MultiBody joint works well in Modelica. TrackJoint exposes only a frame_b connector and two joint coordinates, so it plugs into the standard library like any elementary joint, and the whole road model comes down to six scalar splines and a shared knot vector.
Three things came out of this work. First, the regularity of the patch is not a modelling detail. It is the condition under which the joint can be solved at all: Proposition 1 shows the constraint Jacobian loses rank exactly on the Frenet fold, so on the input splines is what makes the DAE well posed. All 23 circuits fitted here meet it, the tightest being 1.03 at Monaco. Second, writing the chassis coordinates relative to the track triad makes the minimum lap-time problem easy to start. Setting every chassis coordinate to zero and ramping s puts the vehicle on the road with its axes aligned at every collocation point, with no preliminary simulation. Third, about two thirds of a 464 s Singapore solve happens inside the FMU. The 26% gap we measured between two mathematically identical polynomial forms is a reminder that what counts is the generated code, not the operation count on paper.
The next steps come straight out of Section 6: assert the injectivity margin at initialization, find out what the cubic lateral term buys on a circuit that needs it, swap the uniform-knot storage for an adaptive one, and build a contact-patch variant in which four instances share one parameter record.
Acknowledgements
The component builds on the geometric formulation of Limebeer and van de Merwe (2025), with input splines from the companion fitting work (Verulkar et al. 2026). We gratefully acknowledge the Modelica Standard Library MultiBody package, CasADi (Andersson et al. 2019) and IPOPT (Wächter and Biegler 2006).
References
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.
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.
Briant, David (2021). Universal Rail Joint. https://www.claytex.com/tech-blog/universal-rail-joint/. Accessed 31 May 2026. Claytex.
do Carmo, M. P. (1976). Differential Geometry of Curves and Surfaces. Englewood Cliffs, NJ: Prentice Hall.
Hall, Andrew, Chad Schmitke, and John McPhee (2014-08). "Symbolic Formulation of a Path-Following Joint for Multi-body Dynamics". In: Proceedings of the ASME 2014 International Design Engineering Technical Conferences and Computers and Information in Engineering Conference (IDETC/CIE). Volume 3: 16th International Conference on Advanced Vehicle Technologies, V003T01A025. DOI: 10.1115/DETC2014-35082.
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.
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.
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.
Perantoni, G. and D. J. N. Limebeer (2015). “Optimal control of a formula one car on a three-dimensional track—Part 1: Track modelling and identification”. In: ASME Journal of Dynamic Systems, Measurement, and Control 137.5, p. 051018. DOI: 10.1115/1.4028253.
Verulkar, A., B. Danaei, S. Sivaramakrishnan, and R. Trinter (2026). “A Singularity Avoiding Track Model for Race Car Optimization”. In: Proceedings of the North American Modelica and FMI Conference. Atlanta, GA, USA.
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.