## 2 Materials and Methods
### Adaptive Co-Pilot--Shared Controller
#### 2.1.4 The Stability Criteria  
Stability for NMPC has been discussed in the literature [38]; however, in practice, the controllers are generally adjusted via manual tuning, until finding the desired behavior. For the nominal controller (\(\lambda=1\)) of Section 2.1.2, those weights are the ones defined in Tables 2 and 3. Nevertheless, when increasing \(\lambda\) the stability is affected (as shown in Figure 3), which would require a new adjustment of the weight matrices, making this methodology tedious by the constant tuning, not to mention the difficulty of finding the proper weights for each value of \(\lambda\). In this sense, the novelty of our approach consists of a methodology to assign a level of authority to the controller without losing the stability achieved with the nominal controller. The following analysis was followed. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Parameter** & **Value** & **Parameter** & **Value** & **Parameter** & **Value** \\ \hline Vehicle mass (\(m\)) & 1650 kg & Motor inertia (\(J\)) & 0.1 kg\(\cdot\)m\({}^{2}\) & \
\begin{tabular}{c} Cornering stiffness \\ front-rear (\(C_{f},C_{r}\)) \\ \end{tabular} &
\begin{tabular}{c} 940 \(\times\) 10\({}^{2}\) N \\ \(118\times\) 10\({}^{3}\) N \\ \end{tabular} \\ \hline Vehicle inertia (\(I_{z}\)) & 3234 kg\(\cdot\)m\({}^{2}\) & Motor damping (\(b\)) & 0.65 N\(\cdot\)s/rad & MPC horizon (\(N\)) & 30 \\ \hline Distance to axis & 1.40 m & 1.65 m & Steering ratio (\(k_{r}\)) & 8.77 & MPC sample-time (\(T_{s}\)) & 0.05 s \\ front-rear (\(I_{f},I_{r}\)) & 1.65 m & Steering ratio (\(k_{r}\)) & 8.77 & MPC sample-time (\(T_{s}\)) & 0.05 s \\ \hline \hline \end{tabular}
\end{table} 
Table 4: NMPC formulation adaptive co-pilot (system parameters). The second-order system of the steering wheel column is represented by the following differential Equation (15):  
\[\dot{J}\ddot{\theta}+b\dot{\theta}=T_{total}=T_{sat}+\lambda T_{mpc}+T_{driver} \tag{15}\]  
where the self-aligning torque (\(T_{sat}=-k_{sat}\theta\)) provides the system's stiffness, \(T_{mpc}\) is the automation steering torque, \(\lambda\) is the level of authority, and \(T_{driver}\) is the torque exerted by the driver's hands on the steering wheel. For the analysis of the system stability, the equation is solved in its homogeneous form (\(T_{driver}=0\)) and is linearized around the equilibrium position, rendering:  
\[\dot{J}\ddot{\theta}+b\dot{\theta}+(k_{sat}+\lambda k_{mpc})\theta=0 \tag{16}\]  
This approximate representation (with \(k_{sat}\) and \(k_{mpc}\) being the stiffness added by the self-aligning torque and the NMPC control torque, respectively), makes evident the destabilizing effect of the variable authority, as increasing the authority results in a stiffer system, thus resulting in a smaller damping ratio:  
\[\zeta=\frac{b}{2\sqrt{f(k_{sat}+\lambda k_{mpc})}} \tag{17}\]  
The NMPC controller is tuned for the nominal authority \((\lambda=1)\), with the parameters of Tables 2 and 3 providing the reference damping ratio considered optimum for a stable system. \[\zeta_{1}=\frac{b}{2\sqrt{f(k_{sat}+\lambda k_{mpc})}} \tag{18}\]  
The proposed strategy to maintain this damping ratio as the authority is varied; it relies on estimating the required damping \((b_{\lambda})\) so that:  
\[\zeta_{\lambda}=\frac{b_{\lambda}}{2\sqrt{f(k_{sat}+\lambda k_{mpc})}}=\zeta _{1} \tag{19}\]  
Substituting Equation (18) into Equation (19) and considering the NMPC stiffness to be of the same magnitude as the self-aligning stiffness--as can be expected by looking at the equilibrium or quasistatic system behavior--a scaling factor for the system damping can be obtained:  
\[b_{\lambda}=b\sqrt{\frac{\lambda+1}{2}} \tag{20}\]  
Figure 3: Stability test with constant damping (\(b\)). This variable (scaled) damping can be easily introduced into the system through a linear term in the steering actuator motor controller and has proven to maintain a nearly constant damping ratio.