# V2X-Based Highly Reliable Warning System for Emergency Vehicles
## 4 Proposed Work  
Once an EV is ready to start its travel, its source, destination, unique ID, and level of emergency are sent to the centralized server of that particular city. Figure 1 shows the architecture diagram of the J2H approach for emergency vehicles. The server will check for the EV's ID in the database. If there is any match, the following process will take place; otherwise, the server will send an error to the EV. The centralized server uses the fastest path algorithm to calculate the route, which has less average density among all other possible routes to reach the destination. In Algorithm 1, the nodes are the traffic signals, and the edge weight is the traffic signal's time delay. If the average speed is high, then traffic density will definitely be low, and if the average speed is low, then the traffic density will be high. The average speed is calculated by placing a WSS at a distance of 250 m before each signal. The sensor's controller is connected to its respective signal by an ethernet cable. As we are placed 250 m before the signal if the traffic congestion is high, the average speed will be low at that place (i.e., vehicles will be moving slowly, and thus, the density will be high). Using the average speed, time delay can be calculated by Equation (2). If the time delay is high at that signal, we can assume that there is less traffic density, and if the time delay is low, then the traffic density is high. Thus, here, traffic density at each signal is inversely proportional to the average speed at its respective sensor. This value is sent to the centralized server by all the traffic systems. The centralized server will determine the fastest route by taking an average of the traffic densities in every possible route. The selected route will be directed to the EV. The advantage of Algorithm 1 is to find the route that has less average density among all other possible routes to reach the destination. Algorithm 1 works based on [PERSON]'s algorithm, which is the best algorithm to find the shortest path from one node to every other node. The limitation of Algorithm 1 is that we must give a complete representation of the graph for finding the appropriate fastest path. In our proposed system, the centralized server will provide a global view of the road structure, which is used to find the shortest path. The source is the starting node of the EV, the destination is the ending node of the EV, and the adjacent matrix represents the connection between the nodes. Figure 1: Architecture diagram of J2H approach for emergency vehicles. All traffic signals continuously update the traffic density. Using these data, approximate estimated travel time through that road is calculated. The roads are considered as edges, junctions are as vertices, and the calculated time delay is represented as the weight of the edges. The fastest route algorithm will take the source and destination points and the adjacent matrix as input, and the output path has a minimum average travel time. All the traffic signals in the selected route will receive EV information including destination, ID, and level of emergency. The position of the EV is continuously updated to these signals using GPS. After receiving the route from the server, the EV starts to travel. On this route, to alert other non-EVs, an alert about the approaching EV is passed through V2V communication. V2V communication works in 360\({}^{\circ}\), and it may receive an alert from the downstream vehicles. This will lead to confusion for the drivers. To ensure that the alert is only from the EVs behind them, the EV will send the lane ID and EV position in the alert. Thus, the confusion can be resolved. This alert passing mechanism is followed until the destination is reached. In real time, the EV may not be able to complete its journey on time due to the heavy traffic scenarios.