Sequential Convex Programming Methods for Real-Time Optimal Trajectory Planning in Autonomous Vehicle Racing

Optimization problems for trajectory planning in autonomous vehicle racing are characterized by their nonlinearity and nonconvexity. Instead of solving these optimization problems, usually a convex approximation is solved instead to achieve a high update rate. We present a real-time-capable model predictive control (MPC) trajectory planner based on a nonlinear single-track vehicle model and Pacejka’s magic tire formula for autonomous vehicle racing. After formulating the general nonconvex trajectory optimization problem, we form a convex approximation using sequential convex programming (SCP). The state of the art convexifies track constraints using sequential linearization (SL), which is a method of relaxing the constraints. Solutions to the relaxed optimization problem are not guaranteed to be feasible in the nonconvex optimization problem. We propose sequential convex restriction (SCR) as a method to convexify track constraints. SCR guarantees that resulting solutions are feasible in the nonconvex optimization problem. We show recursive feasibility of solutions to the restricted optimization problem. The MPC is evaluated on a scaled version of the Hockenheimring racing track in simulation. The results show that MPC using SCR yields faster lap times than MPC using SL, while still being real-time capable.


A. Motivation
A UTONOMOUS vehicle racing is challenging, as the vehicle is moving at its handling limits. The goal in autonomous vehicle racing is to finish a race in minimum time. One of the building blocks to reach that goal is planning a time-optimal trajectory that adheres to the vehicle's nonlinear dynamics and to generally nonconvex track constraints. In The authors are with the Chair of Embedded Software, RWTH Aachen University, 52074 Aachen, NRW, Germany (e-mail: scheffe@embedded. rwth-aachen.de; theodor.henneken@rwth-aachen.de; kloock@embedded.rwthaachen.de; bassam.alrifaee@rwth-aachen.de).
A video showing the results is available at https://youtu.be/7Iwh980JMCs. The software is published on Github: https://github.com/embedded-softwarelaboratory/sequential-convex-programming and ready-to-use on Code Ocean: https://codeocean.com/capsule/6818033/tree. Digital Object Identifier 10.1109/TIV.2022.3168130 optimization-based trajectory planning, this represents solving a nonconvex optimization problem. Computing the global solution of a nonconvex optimization problem is computationally inefficient, i.e., the computation time grows exponentially with the size of the optimization problem. A method for nonconvex optimization is, e.g., mixed integer programming [1]. Driving at the vehicle's handling limits requires a trajectory planner with a high update rate and therefore short computation time. Finding close to globally optimal solutions requires a large enough horizon to cover subsequent curves. Only a computationally efficient method can fulfill both requirements. The high computational cost of finding the global solution of a nonconvex optimization problem can be accelerated by algorithms that instead find a good local solution. Sequential convex programming (SCP) [2]- [5] is a local optimization method that can find such good local solutions to nonconvex optimization problems. SCP is an iterative algorithm which solves a sequence of convex optimization problems. This allows the use of convex optimization methods, which always compute the global solution up to a numerical accuracy and are computationally efficient. Their computation time grows only polynomially with the size of the optimization problem and the numerical accuracy [1].
In each iteration of SCP, the algorithm forms a convex approximation of the original optimization problem. The approximation of nonconvex constraints can either be a restriction, which tightens the constraints, or a relaxation, which loosens the constraints. A restriction leads to a feasible set of the optimization problem that is a subset of the original one, meaning that the solution to a restricted optimization problem is always feasible in the original one. We call SCP-algorithm which tightens the constraints SCR in the following.
The following section presents various approaches besides SCP that efficiently find good local solutions for nonconvex optimization problems. All of these approaches simplify the original problem at some point in the optimization algorithm, compromising between global optimality and computational efficiency [1].

B. Related Work
There are many works on trajectory planning for autonomous vehicle racing, and the research interest increased over the last years, as the recent article [6] shows. The authors of [6]  recent developments in trajectory planning for vehicle racing. Trajectory planning algorithms can mainly be categorized as graph-based and optimization-based [7]. These methods deal with the nonconvexity introduced by the track constraints differently.
Graph-based trajectory planning aims at finding the global solution of the nonconvex optimization problem. The discretization of the configuration space accelerates the optimization. However, their ability to find the global solution strongly depends on this discretization. Graph-based trajectory planning methods need to check if a trajectory is collision-free, which includes the adherence to track constraints, e.g., [8]- [10].
Optimization-based trajectory planning follows different strategies to deal with the generally nonconvex track constraints. We present four of them in the following.
One strategy is to add the track constraint to the objective function, which is known as a barrier function in optimization. This resolves the nonconvexity due to track constraints. model predictive control (MPC) with GPU computing is proposed in [11] for a rally car on loose ground operating within friction limits of the tires. The barrier function for the track constraints results in an undesirable high cost at the track boundaries. Consequently, the trajectories tend to be close to the track centerline, which is suboptimal regarding lap time. A different barrier function with varying weight is used in [12] with a two-track vehicle model. The optimization problem is solved iteratively, which leads to better constraint approximations at the cost of higher computation time.
A second strategy is to formulate the optimization problem with a spatial discretization [13], [14]. In combination with a coordinate transformation, this resolves both the nonlinearity and nonconvexity of the track constraints. The approaches approximate the minimization of lap time with the minimization of the path curvature. zThe speed profile is optimized afterwards such that the trajectories adhere to given vehicle dynamic constraints.
A third strategy is to combine the coordinate transformation with the usual temporal discretization of MPC [15]- [19]. In contrast to the spatial discretization, the vehicle dynamics can be incorporated in the trajectory planning problem by expressing the vehicle model based on the track coordinate system. The nonlinear model and nonlinear track constraints result in a nonlinear optimization problem, which can be solved with nonlinear programming (NLP). Common software, such as FORCES [20] or IPOPT [21], solve such nonlinear optimization problems using sequential quadratic programming (SQP). SQP is an iterative algorithm which approximates the objective with a quadratic function and linearizes constraints.
A fourth strategy is to explicitly form convex approximations of the nonconvex optimization problem with SCP. There are several works in the state of the art using this strategy, which form the convex approximation by linearization of nonlinear and nonconvex constraints. We call this method SL in the following. Similar to the approaches above, [22], [23] transform coordinates to the track coordinate system to form a nonlinear optimization problem, which is subsequently solved by SL. Experiments with a full-scale vehicle validate the approach in [23]. A linearization of the track constraints around the solution of the previous timestep to obtain a convex quadratic programming, (QP) is presented in [24]. This corresponds to SL with only one iteration.
In [25], model predictive contouring control for autonomous racing with obstacles and opponents is proposed. The work presents the first implementation of an autonomous racing trajectory planner and tracker for a model-scale vehicle testbed. The optimization problem is solved with SL in one iteration. In [26], a trajectory planner which linearizes race track constraints performs approximately as well as a professional driver in a full-scale experiment. We convexified track boundaries with SL for vehicle racing in [27]. Additionally, we extended the approach for priority-based MPC for multiple vehicles in [28].
The error from approximating the race track using linearization may lead to performance degradation. Since the linearization of track constraints represent a relaxation, the resulting solutions are not guaranteed to be feasible in the original optimization problem.

C. Contribution of This Article
We formulate a general nonconvex optimization problem for trajectory planning for autonomous vehicle racing. An MPC based on a single-track model and Pacejka's Magic Tire Formula for the vehicle dynamics simultaneously computes both the trajectory and control inputs. We convexify this original, nonconvex optimization problem using SCP. The key contribution of this paper lies in the application-specific approximation of the original problem to a convex quadratic program by SCR. We approximate the track constraints as a set of polygons. A polygon is a set of linear inequality constraints in the optimization problem, sustaining its convexity. Since each polygon represents a restriction of the original nonconvex track constraint, our algorithm guarantees the feasibility of a solution to the restricted problem in the original problem. Additionally, we show that trajectories resulting from the optimization of the restricted optimization problem keep the property of recursive feasibility.
We compare the proposed SCR with the widely-known SL [22]- [28] in simulation. We show that besides guaranteeing feasible trajectories in the nonconvex optimization problem, the trajectories resulting from SCR are superior to those from SL in terms of time-optimality.

D. Structure of This Article
The remainder of this article consists of three main parts. First, we formulate the general nonconvex optimization problem for trajectory planning for autonomous vehicle racing in Section II. Second, we present the concept of SCP in Section III, and summarize its variant SL to convexify the original problem in Section IV. Section V details a convex restriction of the original problem for trajectory planning with SCR. Third, we compare the presented SCR with the state-of-the-art SL in Section VI.

II. GENERAL FORMULATION OF TRAJECTORY OPTIMIZATION PROBLEM
We denote the temporal dependency by a parenthesized index in a superscript, e.g., x (j) . Operating points are denoted by a tilde, e.g.,x.

A. Vehicle Models
We implement a single-track model of an RC car suited for vehicle racing applications and compare it to the linear vehicle model introduced in our previous paper [27]. We summarize both models below for completeness, the detailed modeling process is presented in the referenced literature. Both models share the same assumptions of having no aerodynamic lift or downforce, no pitch, no wear, and no weight changes.
The generalized discretized model is formulated as where the model M computes the state x j at timestep j based on the state x (j−1) and the input u (j−1) of the previous timestep.

1) Single-Track Model:
A kinetic single-track model is combined with Pacejka's Magic Tire Formula [29]. The resulting model considers rolling and air resistance, as well as the fixedgear electric motor's characteristic curve of maximal torque and limited power. The model can further reflect vehicle racing conditions such as oversteering, understeering and drifting. Individual front and rear lateral tire slips are used for the computation of tire forces. Braking and acceleration torques are applied at the rear wheels only, representing the setup of the RC car from [30]. Thus, only the rear wheel needs consideration of combined tire forces, which is done implicitly via the lateral tire parameters [25], [31]. The detailed construction including parameters of the entire model was given in [25]. On a side note, the experimentally estimated tire parameters combined with the input constraints result in the tire forces remaining at the convex parts of Pacejka's Magic Tire Formula.
The states of the model are the position p from the center of gravity to the reference frame, the velocity v in directions x and y, the heading angle φ and the accompanying yaw rate ω. The input consists of the steering angle δ and the electric motor's duty cycle τ . The differential equations which we use in discretized form areṗ with the mass m, the moment of inertia I z and the distances from the center of gravity to front and rear axles l f and l r , respectively.
The rear longitudinal tire force F r,x , rear lateral tire force F r,y and front lateral tire force F f,y are computed as where B f , B r , C f , C r , D f and D r are empiric tire formula coefficients and α f and α r the slip angles for front and rear tires, respectively. The electric motor is modeled with the parameters C m1 and C m2 , while the resistance parameters C r0 and C r2 are empirically determined. Singularities induced by the slip angle definitions are mitigated by replacing v x with a small number in case of v x = 0. Considering signed function arguments, we implement arctan with arctan2.
The input constraint set is 2) Linear Model: The linear model was introduced in our previous paper [27]. The states of the model are the vehicle's position p = (p x p y ) T and velocity v = (v x v y ) T , and the inputs u = (a x a y ) T are the accelerations in both xand y-direction. No yaw is considered, the vehicle is always facing in the same direction as the longitudinal velocity. The model with the discretization time Δt is ⎡ The tires' acceleration limits for lateral and longitudinal slip are described by two velocity-dependent half ellipses [32]. The tire limits are symmetric in lateral direction but asymmetric in longitudinal direction due to driving resistances. The constraint set for the input can be efficiently represented in the vehicle coordinate system as The transformation to global acceleration inputs is presented in our previous paper [5]. The constraint set is derived with the single-track model's input constraints to assure comparability between models.

B. Track Model
The race track is the allowed driving area of a vehicle. We assume the entire track has a constant width and its curve radii to be larger than the track width. A confinement to planar models is sufficient for most tracks, in the other cases it yields only limited error compared to non-planar models used with MPC [33]. In MPC, a numerical description of the track constraints is necessary. In the following, the track's discrete model and a function to measure a vehicle's progress on the track is introduced.
1) Discretized Track Model: Fig. 1 depicts the following discrete track definition. We define a center line C : [0, S] → T in the track area T ⊆ R 2 with the track length S ∈ R and the track progress s ∈ [0, S]. The discretized track points s i are constructed with the discretization size Δs i across the indices i ∈ N. The track's normal n i is defined to be orthogonal to the gradient of the center-line C, called the forward vector f i , as The left and right track boundary points T L,i and T R,i are constructed by translating the center point T C,i along n i with the track width w ∈ R >0 as 2) Progress Function: For an objective function, we require to link the position of the vehicle on the track to a progress measurement. We choose the center-line as the reference. This results in the usage of equivalent-valued lines orthogonal to the center-line C, modeled by the progress function For usage in the objective function, we linearize and discretize the progress function, starting with the linear interpolation of the center-line Inserting (9) into (8), we explicitly solve for s and neglect any constant parts, yielding the objective progress function

C. Model Predictive Control
We use the concept of MPC as the control structure [34]. In MPC, a model of the system is used to predict the states under the optimization of the inputs in the discrete timesteps 1, . . . , H u . H u ∈ N is the finite control horizon, equaling the finite prediction horizon H p in this article.
With that, a state vector x (j) can be assigned to a particular, discrete timestep j ∈ N. An input vector u (j) is applied starting at timestep j just until timestep j + 1.
To achieve recursive feasibility despite using a finite prediction horizon, we add the terminal constraint This requires the standstill of the vehicle at the end of the prediction horizon, thus ensuring to fulfill the track constraints in the next timesteps.

D. Complete General Trajectory Optimization Problem
This section combines the parts from Section II-A to II-C to form a nonlinear nonconvex optimization problem for trajectory planning on a race track without obstacles.
The objective is to maximize a vehicle's track progress (10) at the prediction horizon H p , or minimize its negation respectively. It has been proven to be an adequate substitution for minimizing time on the race track [25], [27].
To reduce aggressive input changes, we add the damping penalty R u ∈ R ≥0 on the input changes.
The complete program -termed General Trajectory Program -is then subject to with both the state prediction X and the input prediction U matrices as the decision variables, and the input constraint set U M for the vehicle model M . A sparse formulation is chosen Algorithm 1: Pseudo-Code for SCP. 1: X ← X init 2: repeat forever control loop 3: x (0) ← receiveCurrentState() 4: for i = 1 to N RTI do 5: QP ← createConvexQP(X, x (0) ) 6: X, U ← solveQP(QP) 7: end for 8: applyInput(u (1) ) 9: until as it fits the problem size and parameter selection of H u = H p better than a dense one, yielding lower computational cost [35]. If started with an initially feasible trajectory along the track, the General Trajectory Program stays feasible.

III. SEQUENTIAL CONVEX PROGRAMMING METHODS
The previous section introduced a nonconvex and thus NPhard optimization problem [2], [36]. In this section, we convexify the problem using SCP, allowing us to find a solution iteratively in real-time applications [2], [4]. Two variants of SCP are presented: SL, being a relaxation, and SCR, being a restriction. Both methods handle the nonconvex parts of the optimization problem by approximating the track and input constraints.
Algorithm 1 shows the pseudo-code of the real-time iteration (RTI) SCP method. In line 1 the state prediction matrix is initialized with a feasible solution. The control loop starts from line 2. After receiving the current state vector in line 3, N RTI ∈ N SCP iterations run. N RTI is set constant for predictable computation times, turning the SCP into an RTI algorithm, and chosen such that the execution time of the control loop is smaller than the sampling time. In each SCP iteration, first a QP is formulated in line 5 with the current state vector and a warm-start of the previous state prediction matrix. Either the SL or SCR method can convexify the nonconvex parts to create this QP. Then, the QP is solved, yielding a new state prediction matrix and input prediction matrix. After N RTI iterations, the first control input is applied in line 8.

IV. SEQUENTIAL LINEARIZATION
The idea of SL is to linearize nonconvex constraints of the optimization problem at operating points, based on initial guesses or previous solutions, to obtain a QP. This linearization acts as a relaxation of the track and input constraints. The following paragraphs summarize SL, our previous paper [27] presents more details.

A. Input Constraint Linearization
The input constraints for the single-track model are already in linear form, so U ST,SL = U ST . For the linear model, we approximate the velocity-dependent tire acceleration limit ellipses of (6) with n acc ∈ N evenly distributed tangents. This results in a relaxation, vanishing with n → ∞ at higher computational effort when solving the optimization problem. The resulting set of linear inequalities is with the operating pointṽ. The matrix A acc : R 2 × R → R 2 and vector b acc : R 2 → R are computed such that u is constrained to the ellipses.

B. Track Model Linearization
Based on the track discretization from Section II-B1, the track linearization is acquired by tangents to both the left track boundary T L and the right track boundary T R at each timestep. To formulate the linear track constraints, the closest center-line point's index i to a position p is acquired similar to (8) by the index function The progress function is used as defined in Section II-B2.
To mitigate approximation issues and subsequent infeasibility of the problem, the track constraints are softened by a slack variable ξ ∈ R ≥0 [34]. It is added to the problem objective with a high weighting factor S ∈ R >0 . Due to the minimization of the problem objective, ξ will be close to 0 except when the track constraints cannot be satisfied. Geometrically interpreted, ξ widens the track boundary to both sides by the track's unit. The track area constraint for SL is with the indexĩ = i(p (j) ) from (16). The deviation of the position to the track boundary is computed via a dot product with the boundary's normal vector. It remains negative while being inside the track boundaries. The track is approximated at the operating pointp (j) . This approximation is good for small distances between the actual position and the operating point p (j) −p (j) . This distance is limited to maintain the quality of the track approximation by a trust region with size L ∈ R >0 .

C. Complete Trajectory Optimization Problem
With the generalized formulation from Section II, this section's SL approximations yield the optimization problem subject to The method of SCR follows the idea of restricting a nonconvex feasible solution set to a strict convex subset. This section introduces the concept of SCR, followed by the construction and proof of feasible warm-start trajectories. It then applies SCR to our specific application, focusing on the track restriction function.

A. Concept of SCR
We present the core idea of SCR of allowing a new feasible trajectory to be computed based on an existing feasible trajectory. To simplify the argument, we use a generalized form of the General Trajectory Program (14), termed Generalized Unrestricted Program: where z ∈ R n , E ∈ R m×n , b ∈ R m , q : R n → R, D ⊆ R n . The Generalized Unrestricted Program is in general nonconvex. Letz be a known feasible vector in this program. Based onz we define a convex, restricted program -termed Generalized Restricted Program -as whereq : R n×n → R is a convex approximation of the objective function q and R : D → P(D) is the restriction function converting a nonconvex area to a convex polygon representation, denoted by P. R must satisfy the conditions  Generalized Restricted Program has by definition at least one feasible point,z. The program is convex because it minimizes a convex function on a convex set. Thus, it has a unique optimum, denoted by F(z). F(z) is also a feasible point in the Generalized Unrestricted Program becausez ∈ R(z) ⇒z ∈ D. Thus, F(z) can be used as a new starting point for the Generalized Restricted Program resulting in F(F(z)). By iteration, we can generate a sequence of pointsz i+1 = F(z i ) while maintaining the feasibility of each point in the Generalized Unrestricted Program. Whether this sequence approaches an optimal solution of the Generalized Unrestricted Program depends on the formulation ofq and R.

B. Construction of Trajectories for Recursive Feasibility
Since SCR uses a known feasible trajectory to determine an improved feasible trajectory, we need to specify the former. Theorem 1: Trajectories with the terminal constraint (13) resulting from solving the restricted convex program are recursively feasible in the General Trajectory Program (14).
Proof: In each timestep, the solution of the previous timestep -denoted with a tilde, e.g.,x -is shifted by one timestep to enable a warm-start as follows Asx (H p +1) andũ (H p ) do not exist, the trajectory must be explicitly extended by one timestep as Such a trajectory fulfills all constraints of the restricted convex program as we show in Appendix A.

C. Application to Problem
To apply SCR to the General Trajectory Program (14) we start by rewriting it in the form of the Generalized Unrestricted Program (19), before applying the restriction and conforming to the Generalized Restricted Program (20) formulation. Again, we use the linear vehicle model for simplicity. The approach stays the same for the single-track model.
We combine the decision variables of the General Trajectory Program to z ∈ R (n+m)×H p z = ⎛ ⎜ ⎝ p (1) . . . p (H p ) v (1) which is the decision variable in the Generalized Unrestricted Program. Equation (14b) and (14e) are affine and therefore represented with Ez = b (19b). The track constraints (14c) and acceleration constraints (14d) are nonconvex and nonlinear, respectively, and represent the constraint set D in (19c).
Combining the track and acceleration constraint sets yields The objective function remains unchanged aŝ which concludes rewriting the General Trajectory Program as a Generalized Unrestricted Program. For the transformation of the formulation to a Generalized Restricted Program, we need to construct a convex objectivê q and a restriction function R. The following Section V-D to V-E will formulate the restriction functions R A and R T for the acceleration and track constraints, respectively. They will fulfill the conditions for a restriction function (21) on their respective sets T and A acc . The overall restriction function R(z) is then composed using the Cartesian product as follows: Note that this definition corresponds directly to the definition of the unrestricted constraint set D in (24) and the decision variable in (23), i.e., the order of the variables is matched.
We need to justify that the Cartesian product of two restriction functions also is a restriction function. Checking that the conditions (21) are preserved by the Cartesian product shows that this is the case.

D. Restriction Function for Acceleration Input
For the acceleration constraints, we restrict the tire acceleration limit ellipses set (14d) by shrinking the existing polygon representation with the restriction function R A : U L → P(U L ) with b max ∈ (0, 1). The input constraint for the linear model are U

E. Restriction Function for Track Model
In this section, we present the track's restriction function R T : T → P(T ) in detail. After defining the function and proofing its validity in Section V-E1, the algorithm to create the restricted track is designed in Section V-E2. Lastly, adaptions to the progress functions are made in Section V-E3.

1) Definition & Proof of the Track Restriction Function:
This section defines the structure of the track area T ⊆ R 2 and the restriction function for the track area R T : T → P(T ). Because we want to use R T in the constraints of a QP, it must not just be convex but also consist of affine constraints. Thus, where P l ⊆ R 2 is a convex polygon, F l ∈ R n edges ×2 and g l ∈ R n edges being the constraints defining the polygon P l with n edges ∈ R ≥4 edges, and l : R 2 → N being an index function which selects the correct set of affine constraints, i.e., the polygon which includes p and is most forward on the track. Geometrically interpreted, the bounded set of linear constraints in two dimensions in (28b) forms a convex polygon. We model the nonconvex track area T with the union of N polygons overlapping convex polygons P l within the track area as Theorem 2: The track area function (28a) is a restriction function.
Proof: The track area function fulfills the conditions for a restriction function (21) as shown in Appendix B.
2) Design of the Track Restriction Function: As Section V-E1 demonstrated, a set of convex polygons can be used to define the track restriction function R T (p). The algorithm that determines the polygons should target to maximize r polygon size, as larger polygons imply less restriction and r polygon overlap, as the possibility to switch selected polygons for predicted trajectory points p (j) across iterations is required. Algorithm 2 shows the pseudo-code for the steps of tessellation, merging, and overlapping to compute the track polygons. These three steps are depicted in Fig. 3, starting from SL's discretized track as in Fig. 3(a). a) Tessellation: With the general track model from Section II-B, let hull : P(R n ) → P(R n ) be the convex hull function, yielding the smallest convex super-set of the input set. Then we can define a list of track polygons T that tessellate the track as where N is the number of track boundary points. Fig. 3(b) shows T for an example track section. b) Merging: We iterate over the list of polygons T and merge polygons P i and P i+1 if their union is convex. The two polygons are replaced with their union in the list and the polygons are renumbered from 1 to N merged − 1. This process is repeated until no polygons can be merged anymore.
To reduce the number of polygons and thus the number of constraints in the program further, we merge polygons if the union P i ∪ P i+1 is close to being convex. We define the function ΔA : P(R n ) × P(R n ) → R ≥0 which returns the required additional area to make the union of two polygons P A ∪ P B convex as From the definition of hull it follows that ΔA(P A , P B ) ≥ 0. For ΔA(P i , P i+1 ) ≤ ε A , where ε A > 0, ε A ∈ R is some small constant, we replace the polygons by their union as before. Note that this represents a minor relaxation.  c) Overlapping: Pursuing our goal of maximizing polygon size and overlap, we want to find the largest convex polygoñ P i to replace P i withP Every polygon P i is enlarged in both forward and backward direction. Fig. 4 illustrates the result of the enlargement algorithm in the forward direction. First, we enlarge P i by moving the points of the edge shared with neighbor P i+1 infinitely far along the direction of the polygon edges at the track boundary. This enlarged polygonP forward,i is then restricted by the following neighbors P i+1 , . . . , P last where P last is the last polygon overlapping withP forward,i . By enlarging P i into the other direction, too, we can union bothP forward,i andP backward,i to createP i . This algorithm is detailed in the published code and video. With the slack variable ξ and the index function l we express the track area constraint for SCR as

3) Progress Function Adaptions:
As the SCR track model doesn't allow the usage of the progress function defined in Section II-B2, we need to define hz(z) according to (20a) as with the discrete center-line forward direction vector F i of a polygon and l yielding the most forward polygon index containing the pointp (H p ) . We define F i as the mean of the forward direction vectors of the polygon's center-line points analogous to (10) as where I i ⊆ N is the index set of center-line points in the polygon P i .

F. Complete Trajectory Optimization Problem
Combining the General Trajectory Program (14) with this section's formulations, namely 1) the objective function (34), 2) a slack variable ξ ∈ R ≥0 to soften the track constraints (as in the formulation of SL in Section IV), 3) the track constraints (28) and 4) the acceleration constraints (27), yields the quadratic optimization problem subject to

VI. NUMERICAL RESULTS
This section compares the proposed convex approximation using SCR for autonomous vehicle racing with SL, a widelyspread approach in literature [22]- [28]. A video of the results and the code are linked in the beginning of the paper. The goal in vehicle racing is minimizing the lap time t lap . Therefore, the following evaluation concentrates on this metric.
Our algorithms run in MATLAB R2021a with the solver cplexqp from IBM ILog CPLEX 12.10 [37] on a PC with an AMD Ryzen 5 3600 4.2 GHz hexacore CPU and 16 GB RAM on Windows 10 21H1 64-bit.
The simulation parameters vary between scenarios, but can be found in the code repository which reproduces the simulation results. We tuned the MPC weights Q and R and the trust region size L to achieve a robust planner with minimal lap time on a 1:43-scaled version of the Hockenheimring. In order to achieve real-time performance with the sampling time Δt = 0.1 s, we set the number of iterations N RTI to 1.

A. Linear and Single-Track Model
We equip a single vehicle with two trajectory planners, one using the linear model [27] and one using the single-track model. The constraints on the single-track model determine the acceleration bounds for the linear model. Fig. 5 shows the difference in the predicted trajectories. When compared to the linear model, the single-track model achieves trajectories closer to racing lines, as it uses the entire track area to maintain speed. The prediction of the single-track model  progresses further on the track in the same time interval, which indicates a faster progress. In the following evaluation, we will use the single-track model only. Table I shows the lap times for both track convexification methods. The relative decrease for t lap,start is higher than for t lap,flying . At the start of the race, the trajector planner is initialized with a trajectory prediction corresponding to a standstill situation. The trust region that restricts SL is particularly prohibitive at the first iterations after the start. If we increase the number of iterations N RTI in SL to 50, the resulting lap times are still worse than with a single iteration of SCR, while the computation time is up to ten times higher.

B. Track Convexification With SCR
SL approximates the track less accurately than SCR. Since SL relaxes the track constraints, the solutions obtained do not always satisfy the original nonconvex constraints. In contrast, SCR guarantees satisfying the track constraints, since the convexification is a restriction of the nonconvex constraints. Fig. 6 shows an example of such a situation. The dotted line depicts the solution of the previous timestep, which serves as the operating point. The convex constraints for SCR and SL are shown in dark and light shades, respectively. Fig. 7 shows the trajectories a vehicle takes around the track with both the SL and the SCR convexification method. A marker signals every second on the trajectory to allow a comparison of the vehicle's progression. The vehicle starts with both the initial state and the prediction from a flying lap. The markers show   how the trajectory resulting from SCR progresses faster on the track than the one from SL. Fig. 8 shows the median, 99th percentile, and maximum computation time for SL and SCR. In all three categories, SCR has approximately double the computation time than SL. The computation time is mainly determined by the optimization time, which grows with the number of constraints. The QP in SCR is subject to a higher number of constraints given by the polygonal representation of the track. The number of constraints can be reduced by a coarser representation of the track, i.e., using polygons with fewer sides. The times stay consistent, i.e., the maximum and 99th percentile execution times are close to the median, which is a desired property for real-time applications.

VII. CONCLUSION
This paper introduced a general problem formulation for trajectory planning of autonomous race cars. We showed an adaption of the general problem formulation for the convexification method SL, which is state of the art, and introduced an adaption for SCR. We showed that we achieve a valid restriction of the track with overlapping, convex polygons. The paper also proves recursive feasibility of trajectories resulting from the restricted optimization problem. Solutions found with SCR always satisfy the nonconvex constraints of the original problem in contrast to SL. We showed that SCR improves lap times compared to the state-of-the-art method SL, while still being real-time capable. Opponents and obstacles can be incorporated as additional nonconvex constraints in the optimization problem. SCR can be extended by linearizing these constraints as in [28] to form a convex restriction of the original problem.
Future work will investigate real experiments within the Cyber-Physical Mobility Lab, an open-source platform for networked and autonomous vehicles [38].

APPENDIX B PROOF OF THEOREM 2
Proof: Condition (21a): Withp ∈ T follows∃n :p ∈ P n andd n (p) ≤ 0, thus We have proven that the track restriction function R T (p) is a valid restriction function by checking the conditions (21).