# Modeling Driver's Real-Time Confidence in Autonomous Vehicles
## 3 Modeling Confidence
### The Influence of Self Factors  
We define the relationship related to the time of the autonomous driving system publication as the baseline coefficients for the self-factor value before calculating the confidence risk associated with the abnormal behavior and state of the ego vehicle, as the following Equation (9):  
\[U=e^{\frac{1}{t0\gamma+k_{1}}} \tag{9}\]  
where \(y\) is the length of time the system has been in use. \(k_{0}\) is a set parameter, used to adjust the relationship between driving confidence and the length of time the system has been released. \(k_{1}\) is also a set parameter, used to determine the initial value for the new autonomous driving system. From the kinetic aspect to detect the abnormal state of the ego, we believe that as long as the ego vehicle is in a state of especially high acceleration or deceleration, as well as a high wheel steering rate can lead to the loss of confidence. We adopt the same equation as the abnormal acceleration and deceleration of the other car in Equation (7) with the different threshold settings to guarantee comfort. We use the rate of change of the ego vehicle's heading angle to represent the wheel steering which is shown in Equation (10):  
\[T= \begin{cases}0,&\text{if }\Delta yaw_{t}<\frac{n}{f}\\ e^{k(1-e^{-(fayn_{t}-n)})}+m,&\text{otherwise}.\end{cases}  \tag{10}\]  
where \(f\) is the operating frequency of the VC model. \(\Delta yaw_{t}\) is the value of yaw change at the moment \(t\). \(n\) is the baseline changing rate. \(k\) is the human-set parameter and \(m\) is the constant that is used to determine the minimum amount of loss. Combining with the abnormal state, the final value of confidence loss due to the unusual driving state of the ego can be expressed as Equation (11):  
\[State_{t}=\left(k_{1}E_{ego}+k_{2}T_{ego}\right)_{t} \tag{11}\]  
where \(E_{ego}\) is the value of abnormal confidence loss for acceleration and deceleration, \(T_{ego}\) is the value of confidence loss for abnormal steering rate. \(t\) represents the moment \(t\) as mentioned above. \(k_{1}\) and \(k_{2}\) are set parameters that can adjust the numerical proportional relationship between the two affections. For the possible violations of autonomous vehicles, we take into account three common but relatively not completely unacceptable violations that can bring direct danger to the vehicle: (1) Driving over the speed limit (2) Driving against traffic (3) Frequent Lane changes. For speeding, the traffic law allows vehicles to exceed a certain percentage of the road limit for a short period of time during overtaking. However, when the vehicle is seriously speeding, the greater margin of speeding the greater the negative impact on drivers' confidence. At the same time, the instantaneous speeding penalty should be capped. We use the following Equation (12) to quantify the impact of the ego vehicle's speeding:  
\[B_{v}= \begin{cases}0,&\text{if }v<v_{lim}\\ \frac{k}{1+e^{-(v-v_{lim}(1+v_{tol}))}},&\text{otherwise}.\end{cases}  \tag{12}\]  
where \(v_{lim}\) is the speed limit of the road section. \(c_{tol}\) is the set over speeding amplitude. \(k\) is a set parameter, which determines the maximum value of the impact of each time period because of the speeding reason. In the case of going against traffic, although overtaking on a two-lane road will require temporally driving on the opposite lane, the duration of driving on the opposite lane should not be too long. There will be an amount of impact on the driver's confidence when traveling in the reverse lane. The VC model will check the vehicle's heading and the road heading. While the two heading value is significantly different, the confidence loss calculation will be carried out according to Equation (13). \[B_{d}= \begin{cases}0,&\text{if }yaw_{ego}\subseteq(yaw_{road}-\frac{\pi}{2}, yaw_{road}+\frac{\pi}{2})\\ \Lambda,&\text{otherwise}.\end{cases}  \tag{13}\]  
The loss constant \(\lambda\) in Equation (13) can be set artificially to describe the driver's tolerance of avoiding or penalizing the vehicles against traffic time.