## 3 Research Methodology
### AEB Controller  
The AEB controller subsystem uses a stopping time calculation method to implement the AEBS controller and FCW algorithm. The stopping time can be described as follows:  
\[T_{stop}=v_{ego}/a_{brake} \tag{2}\]  
where the \(T_{stop}\) stopping time is the period from the ego vehicle's first deceleration to when it comes to a complete stop. Additionally, \(a_{brake}\) is the ego vehicle's deceleration at this point in the deceleration cycle. As seen in Figure 6, drivers are warned by the FCW system that a collision with the lead vehicle is impending and that they should apply the brakes with a delay in the time  
Figure 4: Block diagram of AEB with sensor fusion. Figure 5: Flow chart of AEB with sensor fusion. indicated \(T_{react}\). The following equation can be used to determine how far the ego vehicle will go before colliding with the lead car:  
\[T_{FCW}=T_{react}+T_{stop}=T_{react}+v_{ego}/a_{driver} \tag{3}\]  
where \(a_{driver}\) is the ego vehicle's deceleration and is the ego vehicle's velocity. The AEB controller subsystem consists of three functions: AEB Logic, _StoppingTimeCalculation_, and _TTCCalculation_. The FCW can be engaged when the FCW is greater than the TTC of the ego vehicle, as represented in Equation (4). The AEBS takes over the operation of the car instead of the driver if the driver does not react to the alert on time. \[T_{ttc}=x_{relative}/v_{relative} \tag{4}\]  
Here, the lead car's velocity toward the ego vehicle is the \(v_{relative}\), and the \(x_{relative}\) is the distance between the two vehicles. The cascaded braking method used by the AEBS is depicted in Figure 7. The two stages of partial braking (PB) and full braking (FB) make up the cascaded braking. Equation (3) in \(StoppingTimeCalculation\) is used to determine the stopping period for the FCW, and both the initial and second phases of PB and FB are calculated in the manner described below:  
\[T_{PB1}=v_{ego}/a_{PB1} \tag{5}\]  
\[T_{PB2}=v_{ego}/a_{PB2} \tag{6}\]  
\[T_{FB}=v_{ego}/a_{FB} \tag{7}\]  
where \(a_{PB1}\), \(a_{PB2}\), and \(a_{FB}\) represent, respectively, the deceleration of both the first and second stages of PB and FB. An AEBS is a function that compares the stopping time calculated by \(StoppingTimeCalculation\) to the TTC to decide if the FCW or which stages of the brakes can always be engaged. The state chart AEBS is shown in Figure 8. State 0 through State 4 in this diagram, respectively, refer to the following states [13]:  
Figure 4:0 Forward collision warning system [31]. Figure 4:1 The AEB system’s cascaded braking. The following circumstances, which are indicated in Figure 8 given in Equations (8)-(11), cause the ego vehicle's state to change:  
Figure 4:2  
Figure 4:3  
Figure 4:4  
Figure 4:5  
The ego vehicle accelerates to attain the defined velocity after the driving scenario has been started, and if the defined velocity is reached, it maintains the velocity. The car in front of the ego vehicle is detected by the radar, lidar, and vision sensors, which extract data. As soon as requirement 1A is satisfied, the FCW is turned on. Until condition 2A is satisfied, the ego vehicle remains in State 1 in motion. Starting at this point, the ego vehicle applies cascaded brakes. Similar to this, the ego car is in Stage 3 or 4 when condition 3A or 4A has been satisfied. The ego vehicle begins to decelerate as soon as it enters the braking stage and continues to do so until its speed is less than 0.1 m/s. There are two PID controllers in this research, as indicated below. During the acceleration phase, one is in charge of regulating the ego vehicle's speed (State 0). The other is used as leverage to manage the ego vehicle's braking stage deceleration (State 2-4). The second PID controller is the part of the AEB controller which controls the different stages of braking, as shown in below Figure 4:6 The implementation of this controller was conducted in a simulation using a signal flow graph  
Figure 4:7 The AEB system’s state chart.