# V2X-Based Highly Reliable Warning System for Emergency Vehicles
## 4 Proposed Work
To avoid this, the proposed J2H approach considers various factors such as the number of lanes, emergency level, types of roads, traffic density, number of EVs approaching, and time of arrival of the vehicles. By considering all these factors, the fastest path to reach the destination is calculated, and the traffic signals in the traveling path are customized. The centralized controller used in J2H is responsible for updating the network if any instantaneous events happen, and the EVs receive the updated information through the backbone network. Thus, the proposed solution works optimally even under instantaneous events in real conditions. Once the EV comes within range of the traffic signal (which is 250 m where the sensor is also placed), the information of the EVs (ID, level of emergency, destination address) is sent along with the time of arrival to the traffic system. This traffic system uses Algorithm 2 and guides when to customize the green light. The yellow light is converted in between because a sudden change to a red light may lead to a collision. To overcome crashes, the yellow light is converted first before the red light. After converting all the signals in that junction to a red light, conversion of the green light in the selected signal will be performed. We customized all the other signals to a red light to handle some corner cases such as a U-turn or turning right or left. In addition, through V2V communication, all the non-EVs cannot move to the left lane, as there may be no space; thus, when switching to a green light only, the right lane vehicles should move. To ensure that only the light is customized because of the EV's approach, in the timer display, an emergency symbol is displayed, and the timer will be paused. When the EV crosses every signal, information about that vehicle is removed from that signal, and the timer will be resumed. This process is followed until the destination is reached. In the J2H algorithm, the traffic system will receive information on all the surrounding signals in that junction. If more than one EV enters at the same time, the vehicle that is closest to the traffic light will be given a way to cross the signal while the other signals will be customized to yellow and then to red. If more than one vehicle is closer to the traffic system, then the level of emergency also equals the maximum distance to reach the destination, which will be considered first. Figure 2 shows the flow of enhancing the alert systems for emergency vehicles in the J2H approach. Figure 2: Flow chart for enhancing the alert system for emergency vehicles in the J2H approach. Algorithm 2 is used for customizing traffic signals based on the position of the EV. Using this algorithm, the EV can reach its destination without any road blockage and delay. Algorithm 2 is a heuristic algorithm, which is the best way to obtain a quick and effective solution. However, the heuristic algorithms may not provide the optimal solution. We used this algorithm for customizing the traffic signal, because in our scenario, we need a quick solution to customize the traffic signal rather than the optimal solution. The proposed approach considers the emergency level as an important factor, which helps the network to differentiate between various emergency vehicles. Phasing the traffic lights at intersections may affect the performance of the surrounding network. However, when enabling the EVs to have smooth travel to reach their destination on time without any delay for saving lives, the minimal deviations in the performance of the surrounding network can be negligible, as the passage of EVs is communicated with the non-emergency vehicles through V2V communication. _TL_id_ is the traffic light, _EV_ is the EV, \(d\) is the distance between the emergency vehicle and traffic light, and _lvl_ is the level of emergency.