A reduced-order lie group-based race car model for systematic trajectory optimization on 3D tracks

This paper derives the dynamic equations of a reduced-order race-car model using Lie-group methods. While these methods are familiar to computational dynamicists and roboticists, their adoption in the vehicle dynamics community is limited. We address this gap by demonstrating how this framework integrates smoothly with the Articulated-Body Algorithm (ABA) and provides a fresh and systematic formulation of vehicle dynamics. For the first time, we model the car body as the end effector of a serial robot with a floating base connected to the track via virtual revolute and prismatic joints. Our formulation also accounts for the effects of 3D track geometry, providing a natural embedding of the car into the 3D track. We rigorously reconcile the ABA steps with key aspects of vehicle dynamics, including road-tire interactions, aerodynamic forces, and load transfers. The resulting model, simple yet accurate, is a powerful tool to efficiently solve Minimum-Lap-Time Planning problems. To demonstrate the effectiveness of our approach, we show numerical results obtained on the Nürburgring circuit. Our optimization problem is formulated via a direct collocation method and solved using the CasADi optimization suite. To validate the results, we test our reduced-order model against a full-fledged multi-body model recently developed by the same authors. The comparison confirms the validity of our reduced-order model, proving both the accuracy of the solution and the computational efficiency achieved.


Literature review
Minimum-Lap-Time Planning (MLTP) problems are among the hottest topics in the automotive research field.Nowadays, they are widely employed in the industry to investigate car performances and provide guidelines both in the design and the tuning stages.
Two fundamental elements of MLTPs are the car and the track model.The choice of the track model is closely related to the MLTP formulation, which can be defined on a time or spatial domain.As well Vol:.(1234567890) described in [1], the latter approach is the most commonly used, although it requires a well defined and differentiable track.For this, a spline representation is often used and the state of the art is well represented by [2] and [3].In [2] a 3D ribbon-shaped racetrack model is obtained using a generalized Frenet-Serret apparatus.In particular, the authors propose an optimal estimation procedure that provides a smooth parameterization of the road from noisy data, allowing to model curvature, camber and elevation changes, as well as a variable track width.Lovato et al. in [3] further extended the ribbon-type road model to include lateral curvature.This accounts for lateral camber variations across the track; hence, lateral position-dependent camber is introduced as a generalization required for some racetracks.
The choice of the car model depends on the level of details required to describe the vehicle dynamics.The most simple model is the single-track one [4].Rucco et al. [5] formulate an optimal control problem adopting the single-track model on a 2D track, and include important aspects of vehicle dynamics such as load transfers and nonlinear tire models.Increasing in complexity, a double-track model is implemented in [6], where longitudinal and lateral load transfers are considered along with aerodynamic loads and Pacejka's Magic Formula [7].The double-track model has been further refined to cover four-wheel drive vehicles with active aerodynamic controls [8] and limited-slip differential [9].Instead, Limebeer et al. [10] develop a double track vehicle model embedded in a 3D track.Hence, they take into account the effects of track geometry when computing load transfers and vehicle absolute velocity.
As the last stage of complexity, a multi-body approach can be used to increase the level of details.In particular, in [11] a 2D multi-body dynamic model is developed where the rear wheels are fixed to the chassis-making it a single rigid body-while the front wheels are independent bodies pinned to the main chassis via revolute joints.Dal Bianco et al. [12] extended further and developed a 3D multi-body car model with 14 degrees of freedom.
Even if successful, all the mentioned contributions do not provide a systematic framework for the assembly of the vehicle dynamic equations, especially when considering their motion on 3D tracks.Their approaches seem episodic lacking a systematic procedure.Moreover, they do not exploit the recent developments in recursive dynamics algorithms, quite popular, on the contrary, in the fields of robotics and general computational dynamics, see e.g.[13] and [14].In a recent contribution by the authors [15], a detailed multi-body model is constructed employing Featherstone's Articulated-Body Algorithm (ABA) [14].The ABA offers a systematic approach and has an algorithmic complexity of O(n), which scales linearly with the number of degrees of freedom.This leads to a significant reduction in the volume of the algebra during the assembly of the dynamic equations.In contrast, the classical Lagrange equationbased approach, with its complexity of O(n 3 ) , is not considered in this analysis due to its inferior performance.For more details see [14, chap. 10, p. 203].
In this work, we present a unified framework to systematically build a reduced-order vehicle model that strikes a balance between accuracy and efficiency.More specifically, we develop a Lie-group based race-car model where the vehicle is regarded as a serial robot.The effects of 3D track geometry are directly included via a generalized kinematic joint, enabling a natural embedding of the car model into the 3D track.The dynamics equations are obtained by merging an efficient recursive formulation based on the Articulated-Body Algorithm and a simplified yet rigorous treatment of the vehicle dynamics [4].Finally, fundamental phenomena in vehicle dynamics such as the load transfers and the nonlinear dependence of tire forces on vertical are incorporated within the ABA formulation by suitably defined algebraic equations.A noteworthy result is that our framework opens up the possibility to directly employ efficient and open-source rigid body dynamics libraries (see, e.g.[16] documented in [17]) also within the vehicle dynamics context.

Structure of the work
The main contributions of this paper are organized as follows.In Sect.2, we delve into the parameterization of the track and vehicle, emphasizing crucial elements such as the mathematical representation of the track, the reference frames, and the kinematic chain that characterizes the vehicle structure.This section provides a comprehensive understanding of the foundational aspects of our reduced-order model.
Section 3 focuses on deriving the vehicle's dynamic model using the ABA formulation.We describe how tire forces and load transfers are reconciled with the wrench formalism proper of the ABA framework.Key to this reconciliation are the suspension constitutive equations, which are addressed within the framework proposed in [4].
Finally, in Sect.4, we present numerical results obtained from solving a minimum-lap-time problems on the Nürburgring Nordschleife circuit.First we validate of our proposed reduced-order against a reliable multi-body model introduced by the same authors in [15].On a particularly demanding segment of the track, we demonstrate how our simplified model accurately manages to capture the essential dynamics of the system, while presenting a significantly improved computational efficiency.This computational advantage makes our model particularly suitable for long-term planning scenarios.As a demonstration, we report a solution for a full lap of the circuit.

Kinematic model
With reference to Fig. 1, the kinematic model of a vehicle traveling on a 3D track is devised as a serial kinematic chain whose root node consists of a fixed Cartesian reference frame {B 0 } and whose end- effector represents the vehicle sprung mass, to which frame {B 6 } is attached.The serial chain starts with a complex joint that accounts for advancing tangentially to the road centerline, and proceeds with a series of virtual prismatic and revolute joints.
To efficiently parameterize the posture of the i-th body respect to the fixed reference frame {B 0 } , we employ the body-fixed (local) version of the Product of Exponentials (POE) formula [18] where g 0,i ∈ SE(3) denotes the posture of {B i } with respect to {B 0 } , g k−1,k (0) represents the initial config- uration of {B k } w.r.t.{B k−1 } , Xk are the (homogeneous representations of the) twists of the joints defining the kinematic chain, and q = [q 1 , … , q i ] T are the expo- nential coordinates of the 2nd kind [19] for a local representation of SE(3) for the i-th body.
The symbol X k is a shorthand for X k k , i.e.X k = X k k when expressed in the attached local frame {B k } , the right superscript denoting the reading frame {B k } .It is worth recalling that X k ∈ ℝ 6 is the vector repre- sentation of Xk ∈ ℝ 4×4 , according to the standard Lie groups notation [19] and [20].In the general case, where the adjoint operator Ad g i,j maps the same twist X k from reading frame {B j } to {B i }.
The rigid-body velocity Vi 0,i of {B i } w.r.t.{B 0 } in the moving frame {B i } is given (as a 4x4 matrix) by the following formula where, given the 3x3 rotation matrix R 0,i from {B 0 } to {B i } , ωi 0,i ∶= R T 0,i Ṙ0,i is the skew-symmetric matrix of the angular velocity components (in {B i } ) of {B i } w.r.t.{B 0 } , and v i 0,i = R T 0,i ḋi 0,i are the components (in {B i } ) of the velocity of the origin O i with respect to O 0 .Equation (3) can be rewritten (as a 6x1 vector) in a convenient form by factoring out the joint velocities ̇q as follows with q = [q 1 ⋯ q i ] T and the distal Jacobian J i 0,i can be computed as where we define C k,i = e Xk q k g k,i and k = 1, … , i.
Similarly to twist formulation, W k k ∈ ℝ 6 denotes the components in {B k } of the wrench exerted on the k-th body.A generic wrench can be expressed, relative to a different frame, as follows where f j k are the components of the force acting on body k, expressed in {B j } , and m j k the components with respect to O j and in {B j } of the resulting moment applied to body k.The operator Ad * g = Ad −T g maps the same wrench in different reading frames.

Track parameterization
To build an analytical model of the track, that is continuously differentiable and capable of efficiently represent complex shapes while remaining numerically stable, we employ 3D NURBS curves [21].The track centerline (spine) curve C( ) is defined by a position vector p( ) such that In our representation, is not necessarily the curvilinear abscissa s (i.e. the arc length of the spine), but a generic curvilinear parameter.The relationship between s and can be described by (5) where p , = dp∕d .
In order to precisely define a track frame {S} = (O S ;[t, n, m]) that follows the 3D ribbon along its spine (see Fig. 2), an intermediate frame {H} = (O H ;[t, v, w]) needs to be introduced.Here t = dp∕ds is the unit vector tangent to C; v is the unit , with k G the unit vector representing the vertical direction of the ground-fixed reference frame and t Π k G the projection of t on the plane Π k G , perpendicular to k G ; finally w is defined as as t × v .Then, {S} is obtained by rotating {H} about t through an angle , which represents the track banking.
It is worth remarking that the complex track joint cannot be analyzed using the exponential approach proper of the POE (see (1)); hence, the transformation matrix g G,S , along with the rigid-body velocity V S G,S of {S} w.r.t.{G} expressed in {S} , need to be derived fol- lowing the general definition in [19].Once the track is parameterized and the NURBS analytical model is available, the quantities [t, n, m] can be computed and g G,S can be evaluated as where R G,S is the rotation matrix from {G} to {S} , and t G , n G , m G are the components of t, n, m in the fixed- ground reference frame {G}.
Instead the velocity V S G,S can be computed as Here, T S G,S is the geometric twist obtained by differentiation of C and R G,S with respect to s, t S is the unit tangent vector to the centerline, and Ω S G,S is the angular velocity defined by ( 8) ds .

Vehicle parameterization
The vehicle kinematic chain is shown in Fig. 1, where the kinematic joints are depicted along with the reference frames {B 0 } to {B 6 } , their corresponding joint variables q i , and the twist velocities X i .
Starting from ground, the first joint is associated with the track and transforms the ground frame {B 0 } into the track frame {B 1 } .Its motion is parameter- ized by the q 1 coordinate.Then the variables q 2 and q 3 , respectively associated with a (virtual) prismatic and revolute joint, encode the vehicle degrees of freedom w.r.t. to {B 1 } .Specifically, the car can translate along the normal direction j 1 , thus defining the frame {B 2 } , and rotate along the vertical direction k 2 , defin- ing {B 3 } .The latter frame is located at road level and it is thought of as fixed to the car axles plane, where the interaction forces between road and vehicle are exchanged.
The remaining joints variables q 4 , q 5 and q 6 param- eterize the relative motion of the car body frame {B 6 } with respect to the car axles plane, due to the suspension system.In particular, q 4 is the vertical displace- ment, and q 5 and q 6 are, according to common vehicle dynamics terminology [4], the pitch and roll angles of the chassis.
It is worth observing that the last two revolute joints have intersecting axes.Furthermore, our reference frames definition implies that O 4 ≡ O 5 ≡ O 6 .In particular, point O 6 does not coincide with car body center of mass G 6 (which is located above along k 6 direction), but coincides with the vehicle invariant point (VIP) [4].This point, regardless of the roll angle, remains centered with respect to the four contact patches, hence in the middle of the vehicle, even when it rolls.This property makes such point the best option to monitor the vehicle position.
As we pointed out in the previous section, the track joint-unlike the joints from {B 1 } to {B 6 }-cannot be parameterized by the exponential approach and requires a dedicated formulation.Considering that {S} and {G} , introduced in Fig. 2, become {B 0 } and {B 1 } according to the notation of Fig. 1, and that the joint variable becomes q 1 , we can rewrite ( 9) and (10) as follows (12a) g 0,1 = R 0,1 (q 1 ) C(q 1 ) 0 1×3 1

Dynamic model
Once the vehicle has been parameterized by means of the Lie group machinery, the equations of motion can be derived systematically.To this end we can employ the Articulated-Body Algorithm [14].
Following the ABA approach, the dynamics of a generic body k connected to a parent joint is written using the Newton-Euler equations where W k k J is the wrench exerted on body k through the previous connection joint, M k k is the inertia matrix k, Vk k 1 is the rigid-body acceleration, and b k k is the bias force, defined as In ( 14), the first term on the right-hand side accounts for the generalized gyroscopic forces and torques, which are bilinear in is the wrench exerted by the forces directly applied to the body k.The mathematical operator ad V in (14) transforms the input vector V = [v T T ] T ∈ ℝ 6 in a 6 × 6 matrix as follows and serves to compute the Lie derivative between two vector fields.Referring to [19], it is worth recalling that ad * V = − ad T V .The ABA algorithm revolves about the concept of articulated body, defined as a collection of N B rigid bodies interconnected by movable joints (either active or passive).Remarkably, if k is the first body (the handle) of the articulated body, its dynamics can still be written similar to (13) in the following form where Mk k and bk k are now generalized inertial and bias terms accounting for the inertia and bias forces of the children bodies in the kinematic chain that are structurally transmitted backwards to the handle k.
The explicit expressions of the articulated-body inertia and bias terms Mk k and bk k , along with other fundamental aspects of the ABA algorithm, will be given in the next subsection.

Forward dynamics via a tailored ABA formulation
The Articulated-Body Algorithm consists of three subsequent steps.

Forward propagation of posture and velocity
In Step 1, starting from the handle body, the rigidbody postures and velocities are being propagated from ground to the car body.
The number of rigid bodies in our articulated body is N B = 6 .These are identified by frames {B 1 } to {B 6 } and their inertial properties are introduced in the next ABA step.As detailed in Sect.2, it is worth noting that the first joint (track transformation) is treated separately, via the homogeneous matrix g 0,1 and the Jacobian J 1 1 .

Evaluation of the generalized bias force and articulated-body inertia
In this step, starting from the last body of the kinematic chain, we evaluate Mk k and bk k (introduced in ( 16)) for a generic body k.

The quantities Ml
l and bl l are calculated as where the shorthand notation A lk = Ad g k+1,k is used and l is the active joint force (or torque, depending on the nature of the joint).In the vehicle model we propose joints are not actuated: the non-zero l 's are passively generated by springs and dampers.
Step 2 can be easily implemented once the terms M k k , l and W k k E have been defined for each body.In our serial kinematic chain, only the inertias of sprung M 6  6 and unsprung masses M 3 3 , as usual in vehicle dynamics [4], are different from zero.
Regarding the active joint force (or torque) l , we clearly distinguish the first three joints from the last ones.For the former group of joints, which are fictitious, we have 1 = 2 = 3 = 0 .For the lat- ter, although not actuated, we have in general nonzero forces 4 , 5 , 6 developed by the presence of springs and dampers.Their constitutive equations are described by where k , k and k are first-order approximations of roll, pitch and vertical stiffness about a nominal working condition of the vehicle.Similarly, the coefficients c , c and c, respectively approximate the roll, pitch, and vertical damping.Employing symbol p to represent either k or c, the explicit expression of these coefficients can be computed as follows where, according to the notation in [4], the subscript of p ij refers to the axle and side of the vehicle ( i = 1, 2 for front/rear and j = 1, 2 for left/right).As usual, t 1 and t 2 denote he front and rear tracks of the car.
Finally, to evaluate b k k as in ( 14), we must have the external wrenches W k kE .The only external contributions in our model come from the aerodynamic forces, applied to the car body (fixed to {B 6 } ), and the interaction between the axle body (fixed to {B 3 } ) and the road.The contribution of gravity is treated separately, as explained in Step 3. As far as the aerodynamic wrench W 6  6E is concerned, it is convenient to evaluate it in {B 3 } and then express it back in {B 6 } through (6) to also model its effects on the roll, pitch and bounce motion.Therefore, its expression is computed as , where Here, is the air density, S is the vehicle frontal area, v 3   3 x is the component of v 3  3 along i 3 , and a 1 , a 2 are the longitudinal distances of G 6 from the front and rear axles, respectively.C x > 0 is the drag coefficient, C z > 0 the downforce coefficient, and The other non-zero external wrench W 3   3 E is applied directly on the axle body (fixed to {B 3 } ) and accounts for a portion of the interactions between road and vehicle.In our model, as in a real vehicle, the totality of the external forces that act on the car (except for the aerodynamic ones) are developed through the contact between tires and road.However, since we are considering the body {B 3 } as the handle of an articulated body going up to {B 6 } , it is more convenient to encode the in-plane components of the force in the external wrench and the outof-plane ones in the internal wrench W 3 3 J , as shown in Fig. 3.The total wrench W 3  3 , collecting all forces and torques generated at the four contact patches between road and tires, is thus partitioned as More in detail, we define Considering that the first three joints are passive, W 3 Fig. 3 Step 2 of the Articulated-Body Algorithm: Evaluation of the articulated-body inertia M3 3 and representation of inplane (blue) and out-of-plane (red) wrenches Vol:.(1234567890) embedded in W3 3 E .These will be linked, in the next subsection, to the control inputs of our model.

Forward propagation of acceleration
In this step, again starting from the first body, we compute and forward propagate the joint accelerations qk to obtain the rigid-body accelerations Vk k .
This procedure is presented in the pseudo-code below.

As in
Step 1, the first joint is treated separately, due to its non-standard nature; thus we let J 1   1,q 1 = dJ 1  1 ∕dq 1 .Furthermore, in order to model the presence of gravity, we introduce a fictitious acceleration on {B 0 } (which is automatically propagated through the kinematic chain) by setting where a g = 9.81 m/s2 is the gravity acceleration.
After Step 3, having computed V3 3 , we can calculate the structural wrench W since the k 's only depend on q and ̇q , and b3 3 only depends on W 3   3 E , we can express W 3 3 as 3.2 Reconciliation of ABA wrenches with tire forces and load transfers The paramount aspect that characterizes vehicle dynamics is the interaction between road and tires.As explained in the previous subsection, in our model this interaction is encoded in the wrenches W 3 .In order to model the dynamics of an actual vehicle with tires, it is therefore necessary to link them to the actual forces developed at the four contact patches.
The generic wrench exerted on the ij-th wheel (where ij refers, as usual, to the considered axle and side of the vehicle) is assumed to have only three non-zero components f ij x , f ij y , f ij z , which are expressed in the corresponding frame 2 {B ij } .Assuming a front- wheel steering vehicle and a parallel steering law, we set 21 = 22 = 0 and 11 = 12 = .
We start by analyzing the vertical force f ij z .Inspired by [4] we write where f z i0 is the static load, f z ia is the aerodynamic force, and Δf z , Δf z i are the longitudinal and lateral load transfers, respectively.Equation (26) (one for each wheel) represent implicit equations in the f ij z terms.To make this more explicit, the four terms of (26) are analyzed, and their dependencies on f ij z and on the non-zero components of W 3 3 J highlighted.The first term f z i0 is computed, by definition, from its dynamic counterpart f 3 3 z filtering out the aerodynamic force as follows where l = a 1 + a 2 is the wheelbase of the vehicle.After reintroducing the downforce via (25) Vol.: (0123456789) the longitudinal load transfer can be obtained as where we are subtracting the aerodynamic moment since it already results from how we defined the f z ia on each wheel.Finally, according to [4, p. 152], and assuming the tires to be perfectly rigid in the vertical direction, we can compute the lateral load transfers as follows Here, 2 is the roll stiffness of the i-th axle and h q i is the distance of the no-roll center of the i-th suspension from the road [4, p.119].
The explicit expressions of Y 1 and Y 2 are given by In (31) we highlight the dependencies of the lateral force f ij y on the vertical load on each wheel, according to the tire model detailed below.
To describe the tire behavior in the lateral direction we use the Pacejka's Magic Formula [7], which reads It is worth noting here the explicit dependence of four factors D y (f ij z ) , C y (f ij z ) , B y (f ij z ) and E y (f ij z ) on the vertical load f ij z on the tire.The ij 's are the tire slip angles, which we may assume to be equal for wheels of the same axle, as frequently done in [4].Their expressions are given by ( 28) Finally, considering a rear-wheel drive vehicle equipped with an open differential (which makes f 21 x = f 22 x ), we compute the longitudinal forces as where k b is the braking ratio, and f xb , f xa respectively represent the total braking and traction force on the vehicle.
At this point it is important to underline how to combine the above equations in order to characterize the implicit Eq. given by (26).
Substituting (32) in ( 31) and inserting the result in (30), we obtain the explicit expression that links each Δf z i to all four vertical loads f ij z .
Then, Eqs.(30), ( 29), ( 28) and ( 27) can be substituted in (26).Here, note that (30), ( 29), ( 28) and ( 27), beside v 3 3x , also contain the components m 3 ; nevertheless, according to (25) and the relations resulting from the ABA steps, these can be eliminated in favor of a direct dependence on q, ̇q and W 3   3 E .On the other hand, since (30) contains Y i , which depends through (31), ( 33) and (34) on q, ̇q , f xa , f xb and , Eq. ( 26) can be written in the form of the following four implicit equations It is worth noting that the system of vertical forces thus obtained is equivalent to W 3 where, for brevity, we let By expanding the whole depend- encies in (36), we can also write and substituting (37) in ( 35) we finally obtain following the four expressions (one for each wheel).
The dependency of f ij z on q , leads to an implicit dynamic equation (see line 7 of Step 3), due to the dependency of W 3 3 E on f ij z .To cut open the resulting algebraic loop and restore the explicit form for the dynamic equations, in our implementation we introduce 7 algebraic variables as placeholders.These include the three non-zero component of W 3   3 E , and the four components f ij z .Accordingly, we implement (36) as three and (35) as four algebraic equations.Along with the six ODEs coming from line 7 of Step 3, they form a Differential Algebraic Equations (DAE) system which can be approached, within the MLTP formulation, by introducing algebraic equations as path equality constraints of the optimization problem (see Sect. 4).

Application to trajectory optimization
To showcase the validity of the proposed approach we set up a minimum-lap-time scenario implementing our dynamic model.The aim of the problem is to find the optimal trajectories for the inputs-and (36a) the resulting motion of the vehicle-that minimize the lap-time achieved on a given track.
In general, MLTP problems can be formulated on a time or spatial domain (see [22] and [23], respectively).The first approach parameterizes the position of the vehicle with respect to the groundfixed reference frame, with time as the independent variable of the equations of motion.Instead, in the second approach, the vehicle position is described in terms of road coordinates, and the curvilinear parameter of the track centerline (here q 1 ) is employed as the independent variable.Since in our model the vehicle position and orientation are parameterized through the track coordinates ( q 1 , q 2 and q 3 ), the natural choice for us is to use the sec- ond approach.For this sake, the model equations obtained through the ABA algorithm have to be translated into the spatial domain.
Our dynamic model is characterized by the states x = [q 1 , q 2 , q 3 , q 4 , q 5 , q 6 , q1 , q2 , q3 , q4 , q5 , q6 ] , the control inputs u = [f xa , f xb , ] and the algebraic vari- To obtain the spatial formulation for the model, we compute x ,q 1 = dx∕dq 1 , where q 1 is the track curvilinear parameter defined in Sect. 2.Then, we can evaluate x ,q 1 as follows where F(⋅) is the dynamic vector field, computing the qi components through the Articulated-Body Algo- rithm, and the system evolution is expressed as a function of q 1 instead of t.

Formulation via direct collocation
Among the many techniques that can be employed to solve Optimal Control Problems (OCPs) [24], for this work we choose the direct collocation method.The peculiarity of this method is the discretization of the original OCP as a large (but sparse) Nonlinear Program (NLP).The generic form of the NLP resulting from this approach is (39) x ,q 1 (q 1 ) = ̇x∕ q1 = F(x(q 1 ), u(q 1 ), z(q 1 ))∕ q1 , Here, we can distinguish the controls u(q 1 ) , the states x(q 1 ) and the algebraic variables z(q 1 ) .These vari- ables are discretized on a fixed space grid q 1 i = Δ q i , ( i = 0, … , N ), with Δ q = q 1 N ∕N , where q 1 N is the final value of the spline parameter and N is the number of mesh intervals.In agreement with the dimension of controls, states and algebraic vectors, we therefore have in our problem a number of u(q 1 i ) = u i ∈ ℝ 3 , x(q 1 i ) = x i ∈ ℝ 12 and z(q 1 i ) = z i ∈ ℝ 7 decision vari- ables.With v i we indicate the collocation states [25] located within the generic i-th interval.
The inequality constraints h i (⋅) comprise all path constraints limiting states, controls, and algebraic parameters.Power limits, adherence constraints and bounds on the lateral displacement q 2 (necessary to remain within the track bounds), are also included in this term.
The terminal constraint r(⋅) is optional and can be included, for continuity purposes, to enforce a closed lap optimization.
Finally, the cost function is approximated in each interval by a quadrature formula.A typical stage cost l i can be of the form where the first term penalizes lap-time, and the last two penalizes abrupt variations of the steer angle and the input force.Instead, the last term is introduced, with its weight K f , as a relaxation for the complemen- tary constraint f xa f xb = 0 .To prevent simultaneous traction and braking action, we introduce the complementary condition f xa f xb = 0 as an additional path constraint.
The optimal control problem is coded in a scripting environment using the MATLAB interface to the open-source CasADi framework [26], which provides building blocks to efficiently formulate and solve large-scale optimization problems. (40)

Numerical results
Numerical results of the MLTP are obtained and discussed for a Formula SAE vehicle (whose data are reported in Table 1) on the Nürburgring Nordschleife circuit.We consider two cases: first, we run a simulation on a short segment of the track ( ≈ 2 km) to assess the validity of the proposed model against a more complex and reliable multi-body model; then, we compute the optimal trajectory on a full lap of the circuit ( ≈ 21 km) to demonstrate the efficiency of the proposed approach.

Model validation
To substantiate our results, we provide a comparison between the optimal solutions obtained using the proposed reduced-order model and a full multi-body model [15] that describes the dynamics of the vehicle's bodies with greater accuracy.Both simulations are run under the same conditions and using the same Formula SAE vehicle as a reference.As test bench we choose a sector of the Nürburgring circuit that is sufficiently rich of corners and slopes to excite the relevant dynamics of the system.
An overview of the solutions is provided in Fig. 4. In Fig. 5, 6 and 7 we show and discuss the optimal trajectories of the controls, the velocities and the attitudes of the two models, depicting with thick and thin line the multi-body and the proposed reducedorder model solution, repsectively.The similarity between the two solutions is evident, and there is large agreement on almost every segment of the track.The optimal lap-times are also comparable, with the reduced-order model scoring a t opt = 53.9s versus the t opt = 54.3 s achieved by the multi-body one.
The only noticeable difference in the behavior of the two models concerns the trajectory of their attitude.As it can be observed in Fig. 7, the pitch of the reduced-order model is more steady and less prone to variations.This behavior can be ascribed to the simplified model of suspensions we are employing in this model; in particular, the proposed approach fails to capture the different stiffness opposed by the front and rear axle to the roll motion, and the consequent variation of pitch angle that arises during cornering.
This slight inaccuracy, however, is greatly compensated in terms of computational complexity and efficiency.With the same number of discretization intervals N = 400 , the NLP resulting from the full multi-body approach features a total number of N opt = 36000 decision variables and is solved in t calc = 116.3s after 64 iterations; the proposed approach, on the other hand, leads to a NLP with N opt = 18000 variables which we have been able to solve in t calc = 29.3s and 62 iterations.3Remarkably, the computation time required to find a solution is reduced by about a factor of four.
Fig. 4 The two lines show the optimal trajectories for the proposed model and the one serving as validation.In this figure and the following ones, the most significant points of the track are addressed with numbers, to help visualize the behavior of the vehicle Fig. 5 This figure show the trajectory of the controls (thick line for multi-body model and thin one for reduced-order model).The solver strives to keep the input force as close as possible to the maximum value allowed by the power limit.To provide a validation curve for the steering input , we averaged the effective steering angles of the front wheels of the multibody model Fig. 6 Optimal profiles of the forward velocity, drift velocity, and yaw rate (thick lines for multi-body model and thin ones for reduced-order model).The agreement of the proposed solution with the validation curves is complete, proving the validity of our model Vol.: (0123456789)

Full lap
We conclude our work with presenting an optimal solution computed on a full lap of the Nordschleife circuit.The full length of the track is 21.7 km and has been sampled in N = 2000 equispaced points.The resulting NLP features N opt = 90000 variables; with our reduced-order approach, we managed to find a solution in t calc = 100.0s and 70 iterations, achiev- ing an optimal lap-time of t opt = 531.7 s.This is quite a remarkable result, especially if considering the huge extension of the track and the variety of effects included in our model.
The optimal trajectories of the controls and the speed profiles are reported in Figs. 8 and 9. Fig. 7 Optimal profiles of the pitch and roll angles (thick lines for multi-body model and thin ones for reduced-order model).In correspondence to corners, the proposed solution slightly deviates from the validation curves.This undesired behavior is to be ascribed to the simplified suspension model employed in our system, which fails accurately describe the different compliance offered by the four independent suspensions.Neverthe-less, the overall evolution of the angles is correct and consistent with the gross motion of the vehicle during corners.For example, in correspondence of the three marked corners the pitch angle ( q 5 ) increases when the vehicle is braking, while the roll angle ( q 6 ) grows in the outward direction of the turn under the effect of the centrifugal acceleration

Conclusions
In this paper a reduced-order race car model is presented.The mathematical model is formulated using Lie group formalism and is devised as a serial kinematic chain, linked to a 3D track via a series of joints suitably defined for this purpose.
It is clearly shown how our framework gracefully merges with the Articulated-Body Algorithm and enables a fresh and systematic formulation of vehicle dynamics.A noteworthy contribution is the rigorous reconciliation of the ABA steps with the salient features of vehicle dynamics, such as the road-tire interaction, the nonlinear tire characteristics, the aerodynamic forces, and the longitudinal and lateral load transfers.The discussion highlights the need to introduce algebraic variables to encode the dynamics as a system of DAE.
To foster the validity of the proposed approach, we set up a Minimum-Lap-Time Planning problem based on our reduced-order model, where the algebraic equations are nicely embedded as path equality constraints.The problem is formulated via a direct collocation method and solved using the open-source CasADi suite.
To prove the accuracy of our modeling efforts, we provide a comparison with a more detailed vehicle model.Then we show the achieved advantage in terms of computational complexity by reporting a minimum-lap-time solution in a real-world scenario of a Formula SAE car on the Nürburgring Nordschleife circuit.
As a last remark, it is noteworthy to highlight that our framework facilitates the direct utilization of efficient and open-source rigid-body dynamics libraries, like [16], also in the domain of vehicle dynamics.Ultimately, we hope that this undertaking will inspire the development of computationally more efficient yet realistic models for use in the design and optimization of next-generation vehicles.
Funding Open access funding provided by Università di Pisa within the CRUI-CARE Agreement.No funding was received for conducting this study.

Conflicts of interest
The authors declare that they have no conflict of interest.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made.The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material.If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.

Fig. 1
Fig. 1 Kinematic chain of the 3D vehicle model with the reference frames and degrees of freedom described by coordinates q

Fig. 2
Fig. 2 3D ribbon track with intermediate reference frame {H} and track reference frame {S}

3 J,
represents a structural wrench: its non-zero components f are the forces and torques that can be thought, in line with the ABA perspective, as those structurally absorbed by the first three virtual joints of the kinematic chain.These components restrain {B 3 } to stay on the track.Instead, the compo- nents f lying on the plane locally tangent to the road surface, are treated as external forces accounting for the tire adherence and traction and are

3
to the inertial, bias and acceleration terms obtained through the ABA algorithm.More in detail, (23a) condition is required to ensure that the external wrench W 3 3 E , defined in (22b) and appearing in (35), is the resultant of the in-plane tire forces.Thus we write = p 11 + p 12 + p 21 + p 22 ,

Table 1
[4] table lists the values of the main parameters of the Formula SAE car model employed in this study.For the notation we refer to[4]