Qatar University, Department of Electrical Engineering
Senior Design Project
ALGORITHM
An algorithm is implemented using simple logic for three cars to pass an intersection with no traffic lights. The algorithm allows the vehicles to be prioritized, considering at the intersection with a predefined zone about it, monitored by a watchtower which detects vehicles by their physical address as they approach. Assuming the future direction of the vehicles is unknown, the algorithm will follow the first-in-first-out queue in order to avoid any collisions. The main purpose of this algorithm is to avoid cars from stopping or colliding at the intersection. When cars do not stop at the intersection, driving quality is improved in terms of time consumption, comfort, and energy consumption. The algorithm is better than the current traffic management system that depends on traffic lights. That because it allows cars to slow down just enough to avoid any collision, resulting in fewer traffic jams, a more comfortable driving, and less fuel consumption, hence, an eco-friendlier driving. The algorithm follows a simple logic according to the flow chart in Figure 3-11. When one car is detected in the zone, no action needs to be taken. When another car enters the zone, it will check the distance of both cars relative to the watchtower (center of the intersection), whichever is farthest will take priority 2 and the closest car will take priority 1. Similarly, if three cars enter the zone, the order will be that the farthest car will take priority 3, and the closest car will take priority 1. When the algorithm broadcasts a car as priority 2, the car's speed will be updated according to priority 1 car. Likewise, the car of priority 3 will slow down depending on the speed of the car in priority 2. To summarize, the algorithm implemented within the watchtower will detect cars inside the predefined zone, prioritize them, and adjust their speeds so that they never collide. Finally, the flow will loop again, meaning the algorithm is within a continuous loop.