Traffic Light System With Embedded GPS (Global Positioning System) and GSM (Global System for Mobile Communications) Shield

Artificial intelligence traffic controllers are being designed with the primary goal of enabling them to adapt to the most recent sensor data in order to perform ongoing optimizations on the signal timing plan for intersections in a network in order to reduce traffic congestions, the most pressing issue in traffic flow control at present. The authors are employing an intelligent traffic redirection technology to reduce traffic and road congestion. This would operate utilizing sensors to determine weight, with the result communicated to a traffic light PLC to control the detour. The result of experiments reduced the number of automobiles in a given time interval by 51%. There is improvement as well as on the average speed of automobiles that increase within the system by 49%. The authors also found a reduction of the average time a vehicle must wait in a system by 58%. Moreover, the implementation shows that the average wait times at junctions have been reduced by 34%.


3
The server center and the automobiles are the two primary components of the investigated system. While the automobiles have the equipment device, the function of the server center is clarified. It combines an Arduino microcontroller with a GPS (Global Positioning System) and GSM shield. The GSM shield is utilized to communicate GPS readings to the server center for planning and decision-making purposes (Gómez Hidalgo et al., 2006) The GPS shield is utilized to determine an automobile's present location. Various programming situations have been implemented, and an online database has been created (Castillo et al., 2015). This paper is structured as follows: a literature review, an outline of the obstacles encountered in this field of study, our proposed AI-based traffic control methods, and discussion, followed by conclusions and suggestions for further research.

RESEARCH TECHNIQUE
The primary objective of developing artificially intelligent traffic controllers is to equip them with the ability to adapt to the most recent sensor data in order to make continuous adjustments to the signal timing schedule for network crossings and reduce traffic congestion, which is a significant problem (Zheng et al., 2019). This technique employs a smart traffic system to reduce road congestion and heavy traffic. It will measure weight using sensors whose output will be transmitted to the PLC controlling the traffic lights. The procedure flow is depicted in Figure 1.
The weight measurement will provide detail of the type of vehicles that will be able to predict the movement of the vehicles. Installation of cameras and sensors is already part of the infrastructure on the street. It means no need to add additional costs in the development of this system. In this research, we assume that the cars will freely move from any lane. In our research, we focused on reducing the number of automobiles in a given time interval, increasing the average speed of automobiles, and reducing the average time a vehicle must wait and average wait times at junctions. This method will help minimize traffic congestion and make it easier to respond to accidents, as heavy and light vehicles will be driving in opposite directions. Consequently, utilizing this framework would make it possible to address the far more fundamental issues of activity blocking and catastrophic accidents. The regulation of traffic is one of the most significant problems that cities with a larger population must address (Kowshik et al., 2011).
Live data is necessary for the intelligent traffic signal system. It is a source of real-time traffic data that reflects the current traffic situation in the area. Researchers have proposed a variety of sources and methods for obtaining this data, such as installing cameras and sensors at intersections to record traffic flow and utilizing algorithms to determine the volume of traffic, but all of these methods are prohibitively expensive and complex to implement (Wang et al., 2021). Additionally, the correctness of these data is the most essential aspect of our proposed strategy. The Google Maps APIs are a straightforward and dependable source for generating traffic intensity for optimal distribution (Light, 2011). The Google Maps Distance Matrix and Directions APIs, which are consulted by the server after each threshold period, now provide journey times for both current and future traffic. Customizable as it is inversely linked to network transmission cost, this threshold time can be adjusted (Wei et al., 2020).
To apply live data to the traffic signal, an intersection control agent was used. When there is a significant change in traffic flow, these software agents are placed at each intersection to intelligently adjust their traffic lights by receiving the server's optimal green-to-red ratio (Mishra et al., 2018). As mentioned by Mishra et al. (2018), a software agent possesses: • Cameras positioned upstream of an intersection, allowing a control center to monitor it. The camera located base on a certain position to make sure the area will be covered and calculated according to the number of cars. • Memory for storing distributions in order to prevent a single point of failure in our system. We can extract traffic patterns from historical data and take action on them by using an AI algorithm. The scope of this suggested solution does not include algorithm selection. • Actuators to keep the shape of traffic lights.
In a location with multiple crossroads, we employ downstream of each intersection so that they can work together to reach the global optimal solution, which is smooth traffic flow. The intersection control agent will be aided by the control center, which will provide a modest amount of human assistance to the system at any distance that encompasses multiple crossings (Macal et al., 2010). As shown in Figure 1, the intersection control agent will provide data based on the number of queueing cars, the waiting time of the cars, and the time of junction. They serve as the eyes (cameras) of the agents and are responsible for maintaining system monitoring (Mesbah et al., 2022). When an emergency occurs, they send a signal to the server, which in turn sends downstream the distribution that has been prioritized for the emergency.

METHod
Using a smart traffic diversion system is the strategy for decreasing heavy traffic and congestion on our roadways. As both heavy and light vehicles will utilize multiple lanes, this method will help alleviate traffic congestion and make it simpler to respond to emergencies (Mohanty et al., 2016). Consequently, by employing this paradigm, solutions to a number of the root causes of activity blockage and catastrophic mishaps might be conceived. Larger cities have a range of problems, with traffic management ranking among the most important. The United Nations projected that 50% of the world's population would reside in urban areas by the end of 2008 (Bloom et al., 2008). According to current estimates, 64% of developing nations and 86 developing nations will still be developing in 2050. Urbanization will increase in prosperous nations. By leveraging big data for traffic control, the flow of traffic at intersections can be enhanced.
In our model, as illustrated in Figure 3, select one of the multi-lane roads that distinguish between different auto vehicle speeds. The separation will benefit both the speed and the type of vehicles. Trucks and buses will be classified in a single lane. Typically, the slow lane is reserved for trucks and buses. Furthermore, with the type of personal car, the lane for high speed. The smart technology will give improved control for road lanes, including the ability to shift cars or trucks away from the corresponding lanes. Figure 3 shows how the GPS will deliver data from various locations in specific areas. The placements here refer to the traffic lights located throughout the areas that provide data in real time. The GPS analysis output is used to analyze those positions. The output of the analysis is used to regulate the color of each traffic signal. The AI GPS incorporated GPS and GSM communication shield will be the consequence of those controlling results. From the perspective of the calculation for traffic, we provide the calculations below. To compute traffic intensity in terms of speed at each intersection, we need to know all downstream trip times: Equation 1 provides the calculation of travel time. The travel time will calculate based on the intermittent time that happens due to the traffic jam. Once we obtain these times from a live data source, we can calculate the speed of each downstream user and express it as the intensity of the intersection. The speed, as shown in Equation 2, will base on the downstream stage. The intensity formula, as shown in Equations 3-4, will be accumulated based on the intermittent part for each period: where: We used the reciprocal of velocity because the intensity of a flow increases as its velocity decreases. All of these intensities are then saved in a local database on the server for two primary reasons. Then, all of these intensities are stored on a local server database for two primary purposes. One is to visualize the movement of traffic in relation to time. Another rationale is calculating the variation based on earlier data. If the variation reaches a specific threshold, we should continue with the method and establish the best distribution; otherwise, we should disregard the change and allow the agent to continue using the current distribution.
For optimal distribution, calculate green and red timings so that the greater the intensity, the more time is required: where L = time distribution, S = traffic light gap, and n = intersection downstream. Next is to calculate the percentage of every downstream intensity and assign available time with respect to it. As shown in Equation 6, the total intensity will be calculated based on the accumulation for each segment of intensities. The downstream percentage, as shown in Equation 7, reflects the measurement with the reduced time for each downstream. We expect the traffic jam will be reduced hence, we could have lower of downstream that imply higher the optimal value, as shown in

RESULTS
In this study, we propose an alternative method that uses real-time Google Traffic data to assess the traffic density of a path. Specifically, we determine the direct traffic density of a lane by designating one junction as the source and the other as the destination of the traffic. The same is true for all four types of downstream traffic. The intensity of a maximum passing period is greater. In the control center, cameras are employed to monitor any emergency situations controlled by humans. Using logic simulation modeling software, we simulated a real-world traffic scenario to test our strategy. Except for the north, all directions have heavy traffic during rush hour, which begins at 6:00 p.m., with the exception of the south. The duration of the experiment was taken on two weeks each month, January-March 2020.
As can be seen in Figure 4 and Figure 5, the number of vehicles waiting at a typical traffic light is more than that of the AI system. This is a result of the sensors installed on the traffic light. The data collected by sensors is processed using an AI algorithm. This significantly improves the number of automobiles waiting in line using AI. According to the preceding graph, efficiency is greater than 100%.
The traffic bottleneck has an effect on the average speed of vehicles. Compare with the result of the number of queues influenced by artificial intelligence. As demonstrated in Figures 6 and 7, the average speed has increased by more than 50%. This rise suggests that AI makes traffic flow more efficiently than conventional methods.
Reduced traffic congestion results from a decrease in the number of automobiles waiting in line, as well as an increase in driving speed. The lessening of traffic congestion will reduce the time required to reach a location. As shown in Figures 8 and 9, the application of AI to the traffic signal system reduces travel time by more than 100%.
The waiting time is defined as the amount of time a vehicle must wait in line before continuing to the destination. Based on Figures 10 and 11, we can deduce that the AI system reduced the waiting time. In rare instances, the time saved could be as much as 75% compared to the conventional approach to traffic jams. By applying the distribution of our suggested model to the system, we are able to draw the following conclusions: • It reduced the number of automobiles in a given time interval by 51%. The parameter that we used to get the comparison was based on the number of automobiles that queue in a certain period between the previous situation and upon the implementation of our approach. • It increased the average speed of automobiles within the system by 49%. The parameter that we used based on the speed of the car prior of our approach implemented and upon the system approach. The increase in the average speed of automobiles suggests a reduced number of traffic jams. • It reduced the average time a vehicle must wait in a system by 58%. The parameter that we used was based on the waiting time of queueing of the automobiles prior of our approach implemented and upon the system approach. • Average wait times at junctions were reduced by 34%. The parameter that we used was based on the waiting time at the junction of the automobiles prior of our approach implemented and upon the system approach. The reduced waiting time at the junction suggests a reduction in traffic jams.

dISCUSSIoN
Traffic is a major problem in urban places. A valuable solution for traffic flow management in conventional stationary control systems. With the evolution of computer science, we are able to design more intelligent and effective traffic signals (Harrison et al. 2010). Currently, the majority of traffic uses outmoded procedures, in which each direction flows according to a predetermined interval for red, yellow, and green lights. There is no imaginative solution available for this problem. Currently, our nation has 3,200 automotive manufacturing plants that invest $92 billion and produce 1,800,000 Figure 11. Wait time using an AI system Figure 10. Waiting time using a traditional system motorcycles and 200,000 autos annually. Therefore, it is necessary to take measures to ensure the future and make life easier (Neirotti et al., 2014). Previously, a number of technologies were employed to simultaneously reduce traffic delays, including big data analysis and image processing for calculating traffic intensity. In other words, one of the most common approaches for determining the greatest amount of traffic that can be accommodated in the shortest length of time is to count the vehicles in the lane with the most traffic. The author of a previous work suggested using an image in which a camera collects real-time traffic data. The camera records each car and communicates the data to a computer, which calculates the traffic density of the lane. The remaining three orientations adhere to a similar method.
This method of lowering traffic flow has been beneficial thus far, but it has several limitations, including the requirement for continuous image capture, which requires timing, and the likelihood of output delays. Similarly, the weather has an effect on picture processing. The light component may influence the yield value. There are no straightforward remedies for urgent or catastrophic situations.

CoNCLUSIoN
Our strategy proposes a method for reducing road congestion while simultaneously preventing accidents. In this research, we implemented approaches based on leveraging big data for traffic control. We found that the flow of traffic at intersections can be enhanced. To compute traffic intensity in terms of the speed at each intersection, we need to know all downstream trip times base on the formula: Here, we give evidence of fatal traffic accidents and routine traffic improvements. As the result of the experiments, we conclude with these results: 1. Reduced number of automobiles in a given time interval by 51%. 2. Increased average speed of automobiles within the system by 49%. 3. Reduced average time a vehicle must wait in a system by 58%. 4. Reduced average wait times at junctions by 34%. Therefore, the aforementioned hypothesis will make the world's highways safer. In the future, emergency vehicles may be outfitted with detectors that make locating our traffic lights straightforward. The control center can function automatically without requiring human intervention.