# Modeling Driver's Real-Time Confidence in Autonomous Vehicles
## 3 Modeling Confidence
### The Influence of Out Factors
This calculation is aiming to figure out the timestamp when the interacting vehicle is expected to drive into and out of the interaction area. By using Equation (4), we can obtain four time points, the entry time \(t_{c1}\) and the exit time \(t_{c2}\) of the ego vehicle and the entry time \(t_{p1}\) and the exit time \(t_{p2}\) of the corresponding vehicle:  
\[(t_{1},t_{2})_{i}=(t_{c1},t_{c2})_{i}\cap(t_{p1},t_{p2})_{i} \tag{4}\]  
The intersection of the two time periods \((t_{1},t_{2})\) is calculated. \(i\) denotes the vehicle serial number that has an intersection with the reachable area of the ego, and if this intersection is empty, it means that under the assumption of this paper, there is no possibility of a future collision between the two vehicles. If the intersection set \((t_{1},t_{2})\) exists, then calculate the collision possibility of ego using Equation (5):  
\[P_{i}=\frac{(t_{1},t_{2})_{i}}{(t_{c1},t_{c2})_{i}} \tag{5}\]  
where \(P_{i}\) denotes the temporal crossover rate between the ego and the vehicle with serial number \(i\) during the interactions. Figure 4: Intersecting relationship. (**a**) general interacting scenarios 1 (**b**) specific situation 1 (**c**) general interacting scenarios 2 (**d**) specific situation 2. In addition to the degree of temporal crossover of the two vehicles, the location of the interaction region relative to the ego vehicle can lead to different degrees of influence on driving confidence. We use the minimum distance \(de_{i}\) from the front of the ego vehicle to each interaction area, combined with the temporal crossover rate above, to calculate the final influence of interaction on confidence. Using Equation (6), the value of the interference during interaction can be figured out. \[Inter_{i}=ke^{(\gamma-de_{i})}(-\ln\left(1-P_{i}\right)) \tag{6}\]  
where \(k\) is a human-set parameter, which indicates the different impact coefficients of different types of vehicles. For example, the \(k\) for large delivery vehicles is higher than that for sedans. \(\gamma\) is a human-set parameter, which determines the standard value of interaction loss at the reference distance. In addition to the interaction interference, the confidence of human drivers will also be affected by the abnormal actions of the surrounding traffic participants. The sudden braking operation of the surrounding vehicles may represent a sudden dangerous situation. In the calculation, we only focus on the vehicle with the maximum acceleration around the ego. The influence of the vehicle on the confidence value can be expressed as Equation (7):  
\[E= \begin{cases}0,&\text{if }a<\bar{a}\\ e^{k(1-e^{-(a-\bar{a})})},&\text{otherwise}.\end{cases}  \tag{7}\]  
where \(k\) is the human-set parameter. \(a\) is the acceleration value of the maximum accelerating vehicle. \(\bar{a}\) is the constant value for abnormal acceleration, which can be regarded as the response threshold and can always be set to be \(7\) m/s\({}^{2}\). \(m\) is the human-set constant used to determine the minimum amount of affection in case of abnormal acceleration. As the abnormal acceleration's value rises, the confidence impact will present an exponential expansion. By combining the interaction and the abnormal behavior confidence interference, the combined effect of two major external interference factors on the ego can be described as Equation (8):  
\[Of_{t}=\left(k_{1}\sum Inter_{i}+k_{2}E\right)_{t} \tag{8}\]  
where \(t\) in the equation represents the time of the calculation. \(k_{1}\) and \(k_{2}\) indicate the proportional relationship between the two main influences.