## 3 Optimisation Approach  
From the literature, it is known that a generic curve, \(\gamma\), can be parameterized with any parameter. Denoting with \(t\) (the tangent unit vector) and \(k\) (the curvature), in general, the following relationships hold [22]:  
\[\mathbf{t}=\frac{d\gamma/d\lambda}{\left|d\gamma/d\lambda\right|}=d\gamma/ds \tag{11}\]  
and  
\[k=\left|\frac{\mathrm{d}^{2}\gamma(s)}{\mathrm{d}s^{2}}\right|=\left|\frac{dt }{ds}\right| \tag{12}\]  
where the relationship between the generic parameter, \(\lambda\), and the arc length, \(s\), is as follows:  
\[s(\lambda)=\int_{0}^{\lambda}\left|\frac{\mathrm{d}\gamma(u)}{\mathrm{d}u} \right|\mathrm{d}u \tag{13}\]  
which implies \(\left|d\gamma/ds\right|=1\), already used in Equation (11). As the vehicle performance bounds imply that \(a_{y}=\frac{v^{2}}{R}=kv^{2}\) cannot exceed \(a_{y,max}\), there is a maximum allowable speed at each \(\lambda\):  
\[v_{max}(\lambda)=\sqrt{\frac{a_{y,max}}{k}} \tag{14}\]  
Such maximum speed plays a key role in the definition of the optimal driver behaviour. Therefore, knowledge of the curvature, \(k\), is crucial. Figure 4: Maximum achievable speed as a result of the grip and critical radius of the curvature. Practically, curves are often written in terms of a parameter, \(\lambda\), which is not the arc length. To work out \(k\), a potential strategy would be to calculate \(s(\lambda)\) using Equation (13), find \(\lambda(s)\) by inversion, express the curve using the curvilinear abscissa \(\gamma(\lambda(s))\), and then calculate \(k\) using Equation (12). However, this approach might not be straightforward. For instance, in the simple case of a planar ellipse, \(\gamma(\lambda)~{}=~{}(a~{}cos~{}\lambda;~{}b~{}sin~{}\lambda)\) can be used as the parameterisation, where \(a\) and \(b\) are the ellipse semi-axes. The computation of the curvilinear abscissa leads to an integral that cannot be expressed by elementary functions (elliptical integral). As an alternative, Equation (11) can be used in Equation (12):  
\[k=\left|\frac{dt}{ds}\right|=\left|\frac{dt}{d\lambda}\frac{d\lambda}{ds} \right|=\left.\frac{\frac{d\tau}{ds}}{d\lambda}\right|\frac{dt}{d\lambda}=\left| \frac{d\tau}{d\lambda}\right|\left|\frac{dt}{d\lambda}\right| \tag{15}\]  
where the second term on the right-hand side can be expanded, using Equation (11), as follows:  
\[\left|\frac{dt}{d\lambda}\right|=\left|\frac{d}{d\lambda}\left(\frac{d\gamma/d \lambda}{\left|d\gamma/d\lambda\right|}\right)\right|=\left|\frac{\frac{d^{2} \gamma}{d\lambda^{2}}\left|d\gamma/d\lambda\right|-\frac{d}{d\lambda}\left( \left|d\gamma/d\lambda\right|\right)d\gamma/d\lambda}{\left|d\gamma/d\lambda \right|^{2}}\right| \tag{16}\]  
and applying the chain rule, the derivative of the norm of \(d\gamma/d\lambda\) can be calculated as:  
\[\frac{d}{d\lambda}\left(\left|d\gamma/d\lambda\right|\right)=\frac{d}{d\left( \frac{d\gamma}{d\lambda}\right)}\left(\left|d\gamma/d\lambda\right|\right) \frac{d\left(\frac{d\gamma}{d\lambda}\right)}{d\lambda}=\frac{d}{d\left( \frac{d\gamma}{d\lambda}\right)}\left(\left|d\gamma/d\lambda\right|\right) \frac{d^{2}\gamma}{d\lambda^{2}}=\frac{(d\gamma/d\lambda)^{T}}{\left|d\gamma/d \lambda\right|}\frac{d^{2}\gamma}{d\lambda^{2}} \tag{17}\]  
Replacing Equation (17) into Equation (16), and then into Equation (15), leads to the following:  
\[k=\frac{1}{\left|\frac{d\gamma}{d\lambda}\right|}\left|\frac{dt}{d\lambda} \right|=\frac{1}{\left|\frac{d\gamma}{d\lambda^{2}}\left|d\gamma/d\lambda \right|-\frac{(d\gamma/d\lambda)^{T}}{\left|d\gamma/d\lambda\right|}\frac{d \gamma}{d\lambda^{2}}d\gamma/d\lambda\right|} \tag{18}\]  
and finally, is simplified to the following:  
\[k=\frac{\left|\frac{d^{2}\gamma}{d\lambda^{2}}-\frac{(d\Check whether the speed satisfies \(k(\lambda)v^{2}\leq a_{y,max}\) at any future time step j. The interdependency between the track parameters and vehicle states is embedded in the above steps, as the track curvature influences the maximum speed at which a specific portion of the track can be negotiated.