Sequential Convex Programming Methods for Real-time Trajectory Optimization in Autonomous Vehicle Racing

We present a real-time-capable Model Predictive Controller (MPC) based on a single-track vehicle model and Pacejka’s magic tire formula for autonomous racing applications. After formulating the general non-convex trajectory optimization problem, the model is linearized around estimated operating points and the constraints are convexified using the Sequen- tial Convex Programming (SCP) method. We use two different methods to convexify the non-convex track constraints, namely Sequential Linearization (SL) and Sequential Convex Restriction (SCR). SL, a method of relaxing the constraints, was introduced in our previous paper. SCR, a method of restricting the con- straints, is introduced in this paper. We show the application of SCR to autonomous racing and prove that it does not interfere with recursive feasibility. We compare the predicted trajectory quality for the nonlinear single-track model to the linear double integrator model from our previous paper. The MPC performance is evaluated on a scaled version of the Hockenheimring racing track. We show that an MPC with SCR yields faster lap times than an MPC with SL – for race starts as well as flying laps – while still being real-time capable. A video showing the results is available at https://youtu.be/21iETsolCNQ.

Abstract-We present a real-time-capable Model Predictive Controller (MPC) based on a single-track vehicle model and Pacejka's magic tire formula for autonomous racing applications. After formulating the general non-convex trajectory optimization problem, the model is linearized around estimated operating points and the constraints are convexified using the Sequential Convex Programming (SCP) method. We use two different methods to convexify the non-convex track constraints, namely Sequential Linearization (SL) and Sequential Convex Restriction (SCR). SL, a method of relaxing the constraints, was introduced in our previous paper. SCR, a method of restricting the constraints, is introduced in this paper. We show the application of SCR to autonomous racing and prove that it does not interfere with recursive feasibility. We compare the predicted trajectory quality for the nonlinear single-track model to the linear double integrator model from our previous paper. The MPC performance is evaluated on a scaled version of the Hockenheimring racing track. We show that an MPC with SCR yields faster lap times than an MPC with SL -for race starts as well as flying laps -while still being real-time capable. A video showing the results is available at https://youtu.be/21iETsolCNQ. Index Terms-Autonomous Vehicles; Control and Optimization; Vehicle Control; Motion Planning

I. INTRODUCTION
F OR autonomous racing, trajectory planning and trajectory tracking is required. In this paper, we implement Sequential Convex Programming (SCP) methods to achieve fast lap times while adhering to the vehicle's physical abilities and track boundaries. This task can be categorized as a kinodynamic planning problem, satisfying both kinematic and dynamic constraints.
In the greater task of automated driving of sensing, planning and acting, the presented approach has direct application in form of the planning component.

A. Related Work
In the field of online autonomous racing control, Model Predictive Control (MPC) with a non-linear vehicle and tire model is often used. This results in a non-linear optimal problem formulation, which can be solved by linearization.
In the past, problems were described as a steering optimization problem to follow a given trajectory, e.g., by [1]. In more recent years, the optimization task was extended to include path planning, e.g., [2]- [4]. The authors of [5] show the advantage of holistically co-designing the individual controllers, claiming to reach equal performance to professional drivers under certain circumstances.
Many papers showed real-world implementations of their formulated problems, e.g., [3], [6]. The authors of [2] showed the implementation of stochastic optimal control on GPUs for a rally car on loose ground thus operating within friction limits of the tires. Publications around Roborace, an autonomous robotic race series with full-scale vehicles, used the same setup of non-linear MPC and vehicle models [7]. Others proposed to use a graph search instead of MPC due to their tendency to find globally optimal solutions [8].
In [9], a setup of non-linear vehicle models and MPC was used but with second-order derivatives instead of linearization. Additionally, the proposed online MPC of the authors of [9] was compared to a racing trajectory as derived from iterative optimal control. Another approach is to model racing as a periodically repetitive task and use a learning MPC by [10]. However, this constricts the usage to a race without opponents and requires prior offline computation.
Recently, [6] proposed an approach using a kineto-dynamic model, determining parameters by experiments. Due to the low computation time, a long horizon can be used, resulting in close to optimal trajectories. In contrast to other publications, the goal of optimization of [6] is the minimization of lap time instead of maximization of track progress.
The current literature is using approximations such as linearizations or graph searches to model the track. Instead, a more accurate restriction could be used.

B. Addressed Problem & Contribution
We focus on the goal of developing a general formulation of trajectory planning for racing. Offline trajectory computation is not possible due to changing environments. To adhere to safety standards, stability and recursive feasibility of the controller are required. The driving situations at the vehicle's physical limits require a high controller update rate and realtime capable execution times. On the other hand, the planning horizon should be large to cover the entire length of subsequent curves, enabling us to find close to optimal solutions. Both demands in turn require a low computational cost.
Following these requirements, we propose a planning method using a single-track model and Pacejka's Magic Tire Formula for the vehicle dynamics. We construct an optimization problem as an MPC. The modeling results in a nonconvex optimization problem. To leverage readily available solvers, we approximate the problem as a linearly constrained convex Quadratic Optimization Problem (QP). SCP describes the required iterative convex approximation of a non-convex problem. SCP is a good approximation but doesn't guarantee a solution [11], [12].
The key contribution of this paper lies in the conversion of the application-specific problem formulation to a QP using two different SCP schemes, namely Sequential Linearization (SL) and Sequential Convex Restriction (SCR). The conducted parameter study can be used to 1) validate the SL method with a more complex singletrack vehicle and tire model in comparison to the author's previously proposed linear model [13]. 2) compare both methods with regarding the computation time and quality of solution.

C. Structure of this Article
We structure the remainder of this article into three main parts. Firstly, we construct the general optimization problem in a non-convex way in Section II. Secondly, the problem is convexified using the SL and SCR methods in Section III, IV and V. This includes modification of the general problem to match the individual methods. Thirdly, the formulated optimization problems are evaluated in Section VI with a parameter study. Lastly, the paper's conclusion is drawn in Section VII.

II. GENERAL FORMULATION OF TRAJECTORY
OPTIMIZATION PROBLEM In this section, we formulate the trajectory optimization problem in a general manner, before adapting it in the later sections to the SCP methods SL and SCR. We assume stable environmental conditions such as weather and road surface. We assume the current states, e.g., pose, velocity, acceleration, and yaw rate, to be known through sensors or being estimated correctly.
In the following, we introduce the vehicle models including the input constraints in Section II-A , the model of the track on which is driven in Section II-B and the MPC in Section II-C each before combining them into a complete trajectory optimization problem in Section II-D.
We will denote the temporal dependency with a parenthesized index in a superscript, e.g., x (j) .

A. Vehicle Models
To compare the our previous method SL [14] with our new method SCR, we implement a vehicle model suited for racing applications. Thus, we use a single-track model of an RC car, from which we derive the parameters for the previous paper's linear model. We present both models below for completeness, the detailed modeling process was 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 at time step j based on the previous time step's state x (j−1) and current input u (j) . 1) Single-Track Model: A kinetic single-track model is combined with Pacejka's Magic Tire Formula [15]. Rolling and air resistance are considered, as well as the fixed-gear electric motor's characteristic curve of max torque and limited power. Racing conditions such as oversteer, understeer, and drifting can be represented by this model. 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 [16]. Thus, only the rear wheel needs consideration of combined tire forces, which is done implicitly via the lateral tire parameters [3], [17]. The detailed construction including parameters of the entire model was given in [3]. 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 input consists of the steering angle δ ∈ (−0.35rad, 0.35rad) and the electric motor's duty cycle τ ∈ (10%, 100%).
The model from [3] contains the states of position p from the enter of gravity to the reference frame and velocity v in directions x and y. Additionally, the heading angle φ and the accompanying yaw rate ω are used. The differential equations which will be used in discretized form arė where the vehicle parameters are 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 α the tire slip angles for front and rear, respectively. Singularities induced by the slip angle definitions are mitigated by replacing v x with a small number in case of v x = 0. The electric motor is modeled with the parameters C m , while the resistance parameters C r are empirically determined.
2) Linear Model: The linear model was introduced in our previous paper [13]. It is a double-integrator model propagating the inputs of longitudinal and lateral accelerations a x and a y to the vehicle's velocity and position. No yaw is considered, the vehicle is always facing in the same direction as the longitudinal velocity. As a simplification, the tires' acceleration limits for lateral and longitudinal slip are described by two half ellipses [18]. The limits are velocity-dependent, symmetrical for lateral direction but due to resistances asymmetric for longitudinal direction.
To assure shared parameters and comparability with the previous II-A1's single-track model, the input bounds are derived with the single-track model. The single-track model's input bounds are kept enforced, which results in implicit incorporation in the linear model limits. In the case of longitudinal maximum acceleration determination, the tire force only depends on the input duty cycle τ and velocity. Thus, applying maximal and minimal τ yields maximal forward and backward acceleration at any v x , respectively. In the case of lateral maximum acceleration determination, the tire force depends on the slip angle. By using steady-state cornering at varying velocities the maximum lateral acceleration can be determined.
The model from [13] with the discretization time ∆t is T and a = (a x a y ) T being the position, velocity and acceleration in directions x and y, respectively. We use n acc ∈ N evenly distributed tangents to approximate the velocity-dependent tire acceleration limit ellipses. This results in a relaxation, vanishing with n → ∞ at higher computational costs. The resulting set of linear inequalities is with v = (v x v y ) T being the vehicle's velocity and u = (a x a y ) T the input. The matrix A acc and vector b acc are computed such that u is constrained to the ellipses.

B. Track Model
The track circuit represents the allowable driving area of the vehicle. We assume the entire track has a constant width. Also, we assume curve radii to be larger than the track width. A confinement to planar models is sufficient for most paths, in the other cases it yields only limited error compared to nonplanar models used with a Model Predictive Controller [19]. In the following, the track's discrete model and a function to measure a vehicle's progression on the track is introduced.
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 with s ∈ R.
To be usable as part of the objective function, we linearize and discretize the progress function, starting with the linear interpolation of the center-line Inserting (8) into (7), we explicitly solve for We neglect any constant part of this equation, resulting in the objective progress function

C. Model Predictive Control
We use the concept of MPC as the control structure [20]. In MPC, a model of the system is used to predict the states (11) under the optimization of the inputs in the discrete time steps 1, . . . , H u . H u ∈ Z 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 time step j ∈ Z. An input vector u (j) is applied starting at time step j just until time step j + 1.
To achieve recursive feasibility despite using a finite prediction horizon, we add the terminal constraint v (Hp) = 0. This requires the standstill of the vehicle at the end of the prediction horizon, thus ensuring to fulfill the track constraints in the next time steps. In the case of the single-track model from Section II-A1, we have to add lower and upper bounds close to zero instead to avoid numerical issues.

D. Complete General Trajectory Optimization Problem
After we have constructed all necessary sub-models across the previous sections, we combine them to form a non-linear non-convex optimization problem in this section.
We choose the goal to maximize the track progression from Section II-B2 at the prediction horizon H p . It has been proven to be an adequate substitution for minimizing time on the race track, e.g., in [3], [13]. For compliance with conventions, the negative track progression is minimized, resulting in the formulation −s p (Hp) for the objective function of the problem formulation.
The optimization problem's decision variables are X being the state prediction matrix and U being the input prediction matrix.
To reduce aggressive input changes, we add the damping penalty R u ∈ R on the input changes. With the equations derived in the Sections II-A to II-C extended across the prediction horizon, the complete model -termed General Trajectory Program -is subject to A sparse formulation is chosen as it fits the problem parameters of Section VI better than a dense one, yielding lower computational cost [21]. If started with an initially feasible trajectory, the General Trajectory Program stays feasible. x (0) ← receiveCurrentState() 4:

III. SEQUENTIAL CONVEX PROGRAMMING METHODS
The previous section introduced a non-convex and thus NP-hard optimization problem [11], [22]. In this section, we convexify the problem using SCP, allowing us to find a solution iteratively in real-time applications [11], [12]. Two variants of SCP are presented: SL, being a relaxation, and SCR, being a restriction. Both methods handle the non-convex parts of the optimization problem by approximating the track and input constraints.
Algorithm 1 shows the pseudo-code of the SCP methodmore specifically, the special case of Real-Time Iteration (RTI) -and is described in the following. After initializing the state in line 1 to allow a feasible solution, the actual control loop runs concurrently to the vehicle driving starting at line 2. After receiving the current vehicle state in line 3, N RTI ∈ N SCP iterations run. N is set constant for predictable computation times and chosen such that the execution time of loop 2 is smaller than the time step. First, the QP is formulated as a convex problem in line 5 with a warm-start of the previous state prediction matrix and the current state. Here, either the SL or SCR methods can be used. Then, the QP problem is solved, yielding the new state prediction matrix and input prediction matrix. The first input is used for control of the vehicle in line 8.

IV. SEQUENTIAL LINEARIZATION
The idea of SL is to linearize non-convex constraints of the optimization problem at the operating points, based on initial guesses or previous solutions. This linearization acts as a relaxation of the constraints and we obtain the form of a QP. We depict operating points' values with a tilde, e.g.,X . The following paragraphs summarize SL, a detailed presentation can be found in our paper [13].
The linear approximation of the general track model is described in Section IV-A. A trust-region is introduced in Section IV-B to support the track approximations. The complete SL formulation is given in Section IV-C.

A. Track Model: Linear Approximation
Based on the track discretization from Section II-B1, the track linearization is acquired by a tangent to the left track boundary T L and right track boundary T R each at each time step, respectively. To formulate the linear track constraints, the closest center-line point's index i to a position p is acquired similar to (7) by the index function i(p) = arg min k∈{0,...,Npoints} 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 ξ ≥ 0 [20]. It is added to the problem objective with a numerical big 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 either side by the track's unit. The track constraints can be formulated for the left and right sides respectively 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.

B. Trust Region
The track is approximated at the operating pointp (j) . This approximation is good for small distances of the actual position and the position's 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 p k − L ≤ p k ≤p k + L ∀k ∈ {x, y}. (16)

C. Complete Trajectory Optimization Problem
With the generalized formulation from Section II, the SL approximations from this section yield the optimization problem subject to A acc (ṽ (j) , 2πk n )u (j) ≤ b acc (ṽ (j) ) ∀k = 1, ..., n ∀j = 1, ..., H p (17e) The method of SCR follows the idea of restricting a nonconvex feasible solution set to a strict convex subset. This section starts with the introduction to the concept of SCR in Section V-A, followed by the construction and proof of feasible warm-start trajectories in Section V-B and Section V-C, respectively. Sections V-D to V-G will apply SCR to our specific application where we will focus 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 (13a) to (13e), termed Generalized Unrestricted Program: where z ∈ R n , E ∈ R m×n , b ∈ R m , q : R n → R, R ⊆ 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 → R is a convex approximation of the objective function q and R : D → P(D) is the restriction function which converts an area into a convex polygon representation, denoted by P. R must satisfy the conditions Fig. 2 illustrates an example for the restriction function and the feasible sets of the Generalized Unrestricted Program and Generalized Restricted Program for a two-dimensional case. The 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 solution, 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 of hz and R(z).

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. A feasible initial trajectory is, e.g., X = [0 0 . . . 0] and U = [0 0 . . . 0]. Thus, a vehicle that is standing still is following a feasible trajectory.
In each time step, the solution of the previous time stepdenoted with a tilde, e.g.,x -is shifted by one time step to enable a warm-start as follows Asx (Hp+1) andũ (Hp+1) do not exist, the trajectory must be explicitly extended by one time step using The resulting extended trajectory is ensured to be feasible by the terminal constraint (13e).

C. Proof of Trajectories for Recursive Feasibility
We prove that the trajectory in (21) is feasible in the General Trajectory Program (13) for every constraint, if the previous time step's solution was feasible. This is called Recursive Feasibility. We use the linear vehicle model for simplicity, for the single-track model the proof can be performed analogously. Constraints (13b) for j = 1: where (22d) states that SCR assumes the vehicle following the predicted trajectory without disturbances. Constraints (13b) for j = 2, . . . , H p − 1: Constraints (13b) for j = H p : x (Hp) = Ax (Hp−1) + Bu (Hp) (22h) (21a) and (21d) (4) and (13e) Constraints (13c) for j = 1, . . . , H p − 1: Constraints (13c) for j = H p : Constraints (13d) for j = 1, . . . , (H p − 1): Constraints (13d) for j = H p : We have proven for every constraint and every time step that the initial trajectory (21a) and (21d) is feasible in the General Trajectory Program (13) for the linear vehicle model (4).

D. Application to Problem
To apply SCR to the General Trajectory Program (13) we start by rewriting it in the form of the Generalized Unrestricted Program (18), before applying the restriction and conforming to the Generalized Restricted Program (19) 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 where z ∈ R 6×Hp is the decision variable in the Generalized Unrestricted Program.
(13b) and (13e) are affine and therefore represented with Ez = b (18b). The track constraints (13c) and acceleration constraints (13d) are non-convex and non-linear, respectively, and therefore represented with z ∈ D (18c). For the acceleration constraints, we reformulate (13d) as a set Combining the track and acceleration constraint sets with the Cartesian product yields where D ⊆ R 6×Hp is the constraint set in (18c). The objective function remains unchanged aŝ which concludes the rewrite of the General Trajectory Program as Generalized Unrestricted Program. Now we need to transform the formulation to the Generalized Restricted Program. For this, we need to construct a convex objective hz and a restriction function R(z). The following Sections V-E to V-F will formulate the restriction functions R A and R T for the acceleration and track, respectively. They will fulfill the conditions for a restriction function (20) 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 (25b) and to the definition of 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 (20) are preserved by the Cartesian product shows that this is the case.

E. Restriction Function for Acceleration Input
For the acceleration constraints, we restrict the tire acceleration limit ellipses set from (24) by shrinking the existing polygon representation with the restriction function R A : where a max is chosen so that R A becomes a restriction.

F. 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-F1, the algorithm to create the restricted track is designed in Section V-F2. Lastly, adaptions to the progress functions are made in Section V-F3.

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 nedges×2 and g l ∈ R nedges being the constraints defining the polygon P l with n edges ∈ R ≥4 edges, and l : R 2 → Z being an index function defined in the next paragraphs which selects the correct set of affine constraints, i.e., the polygon which includes p. (29b) can be interpreted geometrically: A bounded set of linear constraints in two dimensions forms a convex polygon. We model the non-convex track area with the union of N polygons overlapping, inside the track area lying, convex polygons P l as The polygon at a position p is given by an index function l. From the overlapping polygons that include the position p, the index function selects the most forward polygon as l potential (p) = P k ∈ T | arg k=1,...,Npolygons p ∈ P k (31) l(p) = l potential (arg max(∆l potential (p))) .
Choosing the most forward overlapped polygon ensures using most progressive track constraints, agreeing with the objective function (26).
In the case of p not being inside the track area T due to numerical issues, we want to find the polygon being closest to p as a fallback. We assume that the affine constraints that construct the polygons are normalized, i.e., f k,l = 1 where f k,l ∈ R 2 is a row vector in F l . Thus, the signed distances to the polygon boundaries are F l p − g l . The fallback index function can be written as l(p) = arg min k=1,...,Npolygons where d k (p) : R 2 → R is the maximum signed distance to an edge of P k and the subscript m selects the m-th entry from the signed distances vector F k p − g k . With the above definitions we can prove that the track restriction function R T (p) in (29a) fulfills the conditions (20) for a restriction function: Condition (20a): Withp ∈ T follows ∃n :p ∈ P n and d n (p) ≤ 0, thus We have proven that the track restriction function R T (p) is a valid restriction function by checking the conditions (20).
2) Design of the Track Restriction Function: As Section V-F1 demonstrated that a set of convex polygons can be used to define the track restriction function R T (p), we design an algorithm for the polygons' computation. The algorithm should target to maximize • polygon size, as larger polygons imply less restriction and • polygon overlap, as the possibility to switch selected polygons for predicted trajectory points p (j) across iterations is beneficial. 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. 3a.
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. 3b shows T for an example track section. 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. Fig. 3c shows the example track's merged polygons, reducing the number of polygons from 1090 to 178 with ε A = 1.35e−05m 2 , equaling ε A = 0.025m 2 on a 1 : 1-scale. c) Overlapping: Pursuing our goal of maximizing polygon size and overlap, we want to find the largest convex polygonP i to replace P i with P i ⊇ P i and (37b) Every polygon P i is enlarged in both forward and backward direction. For the forward direction, the result of the  Fig. 4 and the process is described briefly in the following. 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 described in more detail in the published code repository.
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 (19a) 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 (Hp) . 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 .

VI. IMPLEMENTATION & COMPUTATIONAL RESULTS
To validate and compare the presented methods, varying combinations of vehicle models and track discretization methods are evaluated in simulation. A video of the results is available at https:// youtu.be/ 21iETsolCNQ. This video shows not only the paper contents but also that our implementation works with multiple vehicle racing, adhering to collision avoidance constraints. The complete software is published ready-to-run on Github and CodeOcean, https:// github.com/ embedded-software-laboratory/ sequential-convex-programming and https:// codeocean. com/ capsule/ 6818033/ tree/ v1, respectively.
In the following, implementation details are given before the results of the evaluation are presented.

A. Implementation
The controller is implemented in software using MATLAB R2021a. To solve the quadratic programs cplexqp of IBM ILog CPLEX 12.10 is used. A simulation is run using the same MATLAB instance. The complete software package is executed on a PC equipped with an AMD Ryzen 5 3600 CPU, a hexacore with 12 logical cores @ 4.2GHz, and 16GB RAM at 3200MHz on the operating system Windows 10 21H1 64-bit.
As the parameters such as vehicle model for controller and simulation, MPC objective weights, and track discretization type vary between individual scenarios, no overview is given. The parameters were chosen with the goal of the maximum controller execution time to fall below the discretization time of 100ms and can be found in the code repository. The MPC-Weights Q and R as well as SL's trust region size were tuned with a semi-automated parameter study to achieve a robust controller with minimal lap time on a 1:43-scaled version of the Hockenheimring. This track is a down-scaled version of the one used in our previous paper [13] and will be used for the following evaluation, too.

B. Computational Results
For the results, we have two objectives to examine in the following. Firstly, how the single-track vehicle model compares to the linear double integrator model used in our previous paper. Secondly, how our new track discretization method SCR compares to SL.  a) Comparison of Linear vs. Single-Track Model: We equip one vehicle with two controllers, one using the linear model and one using the single-track model. This showcases the difference between their predictions. The controllers use SL, start from the same state and run with the same parameters. The acceleration bounds for the linear model were derived by steady-state tests with the single-track model, as described in Section II-A2. Fig. 5 shows that the predicted trajectories differ qualitatively. When compared to the linear model, the single-track model achieves trajectories closer to typical racing lines found in reality, using the entire track area to maintain speed. In the following evaluation, we will use the single-track model only.
b) Comparison of Track Discretization Methods SL and SCR: To compare the track discretization methods of SL and SCR, we choose the evaluation criteria of 1) the first lap time from standstill t lap,start and 2) the flying lap time t lap,flying , which we define as lap number two. For evaluation, we keep all parameters other than the track discretization method fixed. The trajectories of SL and SCR are qualitatively close. A trajectory of the single-track model was already displayed in gray using SL in Fig. 5.
The lap time results show that SCR yields better lap times in both evaluation criteria, as displayed in Table I. The relative decrease for t lap,start is higher than for t lap,flying , as the trustregion restricts SL at the very first iterations after start.
To get an understanding of the significance of the decrease in lap time t lap,flying we use Formula 1's 2019 Hockenheimring qualifying results [23]. The results are down-scaled to match Hockenheimring's shorter track layout, which we use in simulation [24]. The lap time difference of 0.5s equals the difference between 1st position and 6th, 14th, and 7th for qualifying Q3, Q2, and Q1, respectively. Regarding lap times, SL performs worse than SCR because it uses a higher level of approximation and relaxes the track area. Due to the approximations, a trust-region is required to restrict the deviation of future states from the current states. Moreover, the approximations manifest in the solver throwing warnings about numerical issues. SCR is presumably producing more accurate predictions, i.e., being closer to the optimal non-convex solution.
SCR not always obtains the optimal racing line due to numerical issues. Instead, the vehicle tends to drift outwards due to the aggressive choice of selecting the most forward polygon for track representation. The polygon selection function could be optimized for better lap times in the future. Nevertheless, the selection method proved functional and consistently achieving better lap times than SL.
Regarding computation times, we examine the median, 99th percentile, and maximum computation time for SL and SCR, each. For all three time categories, we see a doubling of times for SCR under the chosen parameters, as displayed in Fig. 6. The times stay consistent, i.e., maximum and 99th percentile execution times are close to the median.

VII. CONCLUSION
A general model and problem formulation for the trajectory planning of autonomous race cars were introduced. The general problem formulation was adapted to the specific solution methods SL and SCR, the latter being introduced in detail in this paper. By comparison, it was found that SCR provides improved lap times, especially in dynamic situations, while being real-time capable.
Future work will investigate real experiments within the Cyber-Physical Mobility Lab, an open source platform for networked and autonomous vehicles [25], [26]. Furthermore, SCR could be optimized for faster execution times and SCR's polygon index function could be improved for even better lap times.