Development of An Autonomous Adaptive Traffic Control System
Development of An Autonomous Adaptive Traffic Control System
K. Tavladakis, N. C. Voulgaris
Technical University of Crete, Dept. of Electronic and Computer Engineering GR-73100 Chania, Greece
ABSTRACT: An adaptive traffic control system was developed where the traffic load is continuously measured by loop detectors connected to a microcontroller-based system which also performs all intersection control functions. Intersection controllers of an area are interconnected with a communication network through which traffic load and synchronization information is exchanged. As a result, the duration and relative phases of each traffic light cycle change dynamically. The new architecture is completely distributed and eliminates the need for a central computer to individually control traffic lights. For the basic function of the system only the intersection controllers are required. The connection of the central computer is needed only for system surveillance and for traffic data collection and storage.
KEYWORDS: Traffic control, Adaptive control, Loop detectors, Intersection controllers, Traffic surveillance
INTRODUCTION
Traffic load is highly dependent on parameters such as time, day, season, weather and unpredictable situations such as accidents, special events or construction activities. If these parameters are not taken into account, the traffic control system will create bottlenecks and delays. A traffic control system that solves these problems by continuously sensing and monitoring traffic conditions and adjusting the timing of traffic lights according to the actual traffic load is called an adaptive traffic control system. One traffic control technique is to distribute time cyclically to each phase of the intersection. These systems are called cyclic systems and they are characterized by: the scheduling period called the cycle time, the fractions of cycle time given to each intersection called splits, and the delay between two neighboring intersections to initiate each cycle called offset. Some traffic control systems called acyclic have been developed in the past years. In these system, the terms cycle, splits, offsets have no meaning, because the system decides every time to switch or not to switch to the next phase. These systems implement the rolling horizon method which was introduced in the OPAC system (Gartner 1983) and which continued to be used in other systems such as CRONOS (Boilot et al 1992, Boilot 1994), PRODYN (Henry, Farges 1989), and ALLONS-D (Porche 1996). This method seems to give good results in specific isolated intersections where it was implemented and tested. However, it provides no guarantee that, if applied to an arterial node or to a network, the intersection will remain synchronized. It should be noted also that the rolling horizon method was implemented at intersections requiring only two phases. With a mean vehicle speed is 50 km/h and a traffic detector placed 50 meters before the stop line, the traffic control system has real data for the next 3-4 seconds. However, a real time urban traffic control system must have traffic information for a much longer time in order to have a way to predict traffic. Traffic data must be collected during the last 2-3 minutes. Data collected for a longer period are useless because a vehicle passing now over a detector, after 5 minutes it may be at the other end of the town. Traffic control systems may also be classified as saturated or unsaturated, depending on whether they were designed for a saturated or unsaturated network. In an unsaturated network, it is desired to minimize the mean delay of drivers, while in a saturated network it is desired to serve as many drivers as possible, or in other words, to maximize traffic capacity of the intersection. The problem of capacity maximization is the same as the queue minimization problem.
An adaptive traffic control system must have the ability to diagnose saturation conditions in the network and change the objective function as desired. In older fixed-time systems, there were multiple timing plans, but now a modern traffic control system can have multiple control strategies. From the above it follows that an urban traffic control system for a whole network must be flexible to switch in each intersection according to real time traffic data, but looking at it macroscopically, it must be synchronized and every switching in one intersection must be related to the switching in other intersections. That can not be done with the rolling horizon where every intersection is totally independent. In the proposed system the terms cycle, splits and offset still remain but they are no longer constant but dependent on real time traffic conditions. The strategy is implemented by a number of intersection controllers interconnected in a communication network. The design permits also system surveillance from a traffic control center. The system details as well as the control strategy are explained in detail in the rest of the paper.
SYSTEM ARCHITECTURE
The basic structure of the proposed system includes a number of intersection controllers. One intersection controller is placed at each intersection and performs all functions and computations required at the intersection. These controllers are connected to a dedicated communication network, through which the controllers share information in order to remain synchronized. The intersection controllers may be connected also to a central computer. For the system basic function, which is traffic conditioning, only the intersection controllers are required. The connection to the central computer is optional and is needed only for system surveillance and for traffic data collection and storage. The functions that a system intersection controller performs are the following: it reads the detectors state and hence it computes traffic flow information, it computes the timing schedule for the intersection based on traffic flow, it communicates with the controllers of the adjacent nodes to share data and synchronization information, it switches traffic lights on and off and finally it checks the system for malfunctions. The block diagram of an intersection controller is shown in Fig. 1.
Networ Flash EEPROM card 32K X 8
Motherboard
Reset circuit Communication network card
serial comunication
RAM card 2K X 8
LED display
8051
synchronization signal
Networ
Figure 1. An intersection Controller As shown, the controller consists of a motherboard and a number of cards connected to it. The heart of the motherboard is Intels 8051 microcontroller, capable of executing 1 million instructions per second and addressing a total of 128 Kbytes of program and data memory. In addition to the microcontroller, the motherboard has some auxiliary circuits and a timer to interrupt the microcontroller at a 10-Hz rate for detector sampling. During each interrupt, the controller reads the state of the traffic detectors. On the motherboard there is an 8-bit bus which connects extension cards. Thus, for each particular traffic node, only the necessary cards need to be connected to the bus. There are four kinds of extenson cards: RAM, ROM, input and output. Input and output cards are used whenever input or output is required for the system. The main purpose of input cards is for reading the loop detectors, while the output cards are used for driving the power circuits that switch traffic lights on and off. As shown in the block diagram of Fig. 1, the power circuits have also the ability to detect faults in the lamps. This feature is very important for an intersection controller and is described in detail in the Fault Detection section of this paper. In addition to the above, there is a communication card which is connected directly to the microcontroller rather than to the bus. The communication card consists of line driving circuits, signal regeneration circuits and multiplex circuits between the controller and the network. See also (Tavladakis et al 1997).
TRAFFIC DETECTORS
An essential feature of any dynamic traffic control system is its capability to compute traffic flow rates at the controlled intersection. There are several methods to detect a passing vehicle (Klein L. A., et al, 1995), the most common of which is the loop detector. The main advantage of the loop detector is that it is robust and reliable, since it does not come in contact with vehicles and it is easily installed. Its principle of operation is based on the detection of a vehicle as a metallic mass entering the magnetic field of an inductor and thus changing its inductance. This section describes a loop detector which was designed and implemented for the new system presented in this paper. The sensing element is a coil with dimensions of two by three meters placed just below the road surface and characterized by an inductance variation which depends on the proximity of a vehicle. The detector must be positioned at a distance of about 50 m before the stop line at a traffic node in order to detect passing vehicles and not those waiting for a green light close to the node. For a road with more than one traffic lane, one detector must be placed at each lane. The block diagram of the circuit that converts the loop inductance variation to a digital signal is shown in Fig. 2.
Colpitts Oscillator Zero-Crossing Schmitt Trigger Digital Circuit microcontroller
Loop
Figure 2. The loop detector The loop coil is part of a Colpitts oscillator and thus any inductance variation will result in an oscillator frequency shift. The signal is then passed through a Schmitt Trigger type comparator where it is converted to TTL levels. The signal frequency variations, when a vehicle is passing over the coil, are very low, typically <5%. Also the signal is influenced by several environmental factors, such as temperature, moisture and road surface distortion. The latter factor may result sometimes to the complete destruction of the coil, a situation which can be detected by a special feature of the digital circuit of Fig. 2. The complete loop detector circuit was designed using digital circuits including a microcontroller. This increases circuit reliability in the detection and provides the capability to upgrade the software used and to add new detection methods, e.g. pattern recognition. The microcontroller measures the Colpitts oscillator frequency every 10 msec, resulting in a resolution of one hundredth of a Hertz. This measurement must be compared with a reference value in order to detect the passing of a vehicle. The reference value is not fixed. The microcontroller stores every measurement in a 128-position, 8-bit FIFO memory space. From these 128 last measurements, the microcontroller finds the average which is used as the reference value for a vehicle detection. Using the average as a reference value is like filtering the signal from its small variations, which are dependent on the temperature, the moisture, the road distortion or a parked car on a adjacent lane to the coil. If the microcontroller measures a frequency near zero, it assumes that the coil is destroyed and provides an output warning signal.
Network card
Network card
Network card
Network card
MASTER
SLAVE 1
SLAVE 2
SLAVE 3
Figure 3. Communication network topology As Fig. 3 shows, there is a node called the master, while the rest of the nodes are called slaves. Any node of the network can be the master node and is responsible for the network operation, in order to avoid packet collisions. Of the three network lines, two are used for data transmission and the third is used by the master to send a synchronization signal to all slaves. A token-based protocol does not allow two slaves to transmit data on the same line simultaneously. The microcontroller of every network node has a different address, with the master having the address 0. A node receives only those packets having the node address and rejects those with a different address. Each information packet consists of four bytes and that is the minimum amount of data a node can transmit. Twelve types of packets have been implemented. No slave can initiate packet transmission to the channel. There are two types of information transmission. The first is when the master must send information to the slaves. The master sends a packet containing the information, starting with the first slave. Then the slave sends an ACK packet. When communication with the first slave ends, the master goes on to the second slave, and so on. The second type of information transmission is when data must be sent by the slaves to the master. Again, the master initiates the process with the first slave and sends a packet which is a specific data request. Then the slave responds by sending a packet containing that information. When the packet is received, the master continues with the next slave. According to the above protocol, no one slave puts data on the channel, except when the master has made a request for it. Since the master never requests a packet from a slave unless communication with the previous node has been completed, there is no possibility for packet collision. With a speed of 9600 bps, the packet consisting of 40 bits (including start and stop bits) requires transmission time equal to 40 bits/9600 bps = 4.17 msec. Based on this time, the time-out interval was selected to be 15 msec and this period determines the number of nodes that can be connected to the network. A full conversation of the master with 100 slaves can take place in a 1-sec period.
CONTROL STRATEGY
In the proposed system, traffic can be controlled in four different modes: a) The mode of time of day plans, which is the classical control method b) The vehicle-actuated mode, which can be executed at periods with very low traffic. For example, in an arterial node at night the main road has a green light until one or more vehicles come on a crossing road. Then the main road traffic light turns red temporarily to allow passing of these vehicles. c) Direct from the central computer mode. In this mode, an operator from the traffic control center can manually change the signaling of some network nodes. This mode can be combined with a closed circuit TV, thus avoiding the use of a large number of traffic policemen in periods of heavy traffic d) The real-time control mode. This is the mode that makes the system adaptive to traffic demands. The rest of this section describes how mode (d) is implemented. The flow chart of Fig. 4 shows the steps of this implementation. The system adapts its timing to traffic demands by continuously changing the cycle time. Each cycle may have a different duration compared to the previous cycles. The cycle time is computed by the intersection controllers in a distributed fashion at the end of each cycle. The computation of that cycle time is based on traffic measurements taken during the previous cycle. The cycle time can change according to the traffic demands, but each cycle time is common to all network nodes, resulting in a continuously synchronized network.
Cycle 1
Cycle 2
Cycle 3 time
Use actual traffic flow rates Apply output signals from previous cycle to traffic lamps simulate 5 possible cycle times Repeat the steps of the previous cycles Select the optimal cycle time and send it to the master node Receive the cycle time from the master node Repeat the steps of the previous cycle Figure 4. The flow chart of the adaptive mode
to
Before the beginning of a traffic light cycle, each controller computes the traffic flow rates according to the detector measurements during the previous cycle. From these flow rates, the optimal cycle time of the specific intersection is computed as it will be described. At the end of a cycle, the master is informed through the network about the optimal times that every slave has computed. Then the master computes the common cycle time that will take effect in the next cycle. The common cycle time is the average of all the slave times. When the cycle time is computed, the master transmits it to each slave separately. Fig. 4 shows the procedure followed in each controller starting from the first cycle of operation. The steps shown under cycle 3 are then repeated on all subsequent cycles. In order for a controller to compute the optimal timing for the next cycle, it must predict traffic conditions. Thus, the controller assumes that during the next cycle the distribution of arrivals will be exactly the same with that of the previous cycle. For that reason, the controller keeps detailed information for the arrivals during the complete cycle time. In other words, the controller examines, using actual traffic data, how the intersection should be signaled in the previous cycle. Given that the traffic data do not change dramatically during the next one-minute period, which is a typical cycle time, we can say that the system is fully adapted to the traffic demands. Based on that traffic prediction model, the controller simulates the intersection for five possible cycle times: Exactly the same as the previous, increased by two sec, increased by five sec, decreased by two sec and decreased by five sec. When these simulations are completed, the controller selects the optimal cycle time as that which left the lowest number of vehicles in the queues at the end of the cycle. The continuous cycle time change requires synchronization at every cycle. To start a cycle, the master sends a synchronization pulse through the network. Such a pulse is sent every time the master initiates a cycle. A slave does not start its cycle immediately with the synchronization pulse, but waits for a time called offset, and then starts the new cycle. For every node there is a different offset which is pre-computed and is hardwired at each node. After a slave controller is informed of the next light cycle time from the master, it is responsible to manage it and to use it in an optimal way. Based on locally measured traffic flow, the intersection approach time distribution is computed. A phase sequence table is subsequently constructed to determine the phase code and the phase duration of every phase. For the remaining cycle duration, the controller switches the traffic lights on and off according to that table and collects traffic flow data. After all the phases of the table are executed, a synchronization pulse is sent from the master to the slaves denoting the beginning of the next cycle.
FAULT DETECTION
It is of paramount importance that a traffic control system must be safe for its users because, if anything goes wrong, it may cost human lives. The controller through the output cards drives the power circuits to switch the lights on and off and installs the desired phase at the intersection. With the power circuits there are also circuits that detect faults at the lamps. The fault detection unit consists of circuits capable of detecting faults for a maximum of 64 lamps. These circuits have two outputs named Error and Warning and are applied to the microcontroller through the input cards as shown in Fig. 5.
Intersection controller
Traffic lights
Figure 5. Fault detection scheme The Warning output is activated when a non-critical fault is detected, but the system will continue to operate without risk for drivers safety. The Error output is activated when a critical fault is detected and the system must interrupt immediately its operation. These critical faults are of two kinds: A red lamp is burned-out, or two green lights on different approaches are turned on simultaneously.
SYSTEM SURVEILLANCE
As mentioned earlier, there is the option to connect a surveillance computer to the network of intersection controllers. In the version implemented, the computer runs a program which communicates with the controllers through a serial port and performs the system and user interaction.
Figure 5. The traffic Surveillance program displaying a section of the city of Chania, Crete The program uses the MS Windows GUI (Graphical User Interface) and principles of GIS (Geographical Information Iystems). The operator sees on the screen a town map showing in real time the actual status of lights and detectors. The operator sees also information for every individual intersection concerning the control mode, the timing etc. and information for the whole network about the common cycle time, the duration of the next cycle etc. The operator can execute some high-level functions from the toolbar, but he can also access the system in low-level by sending packets to a node resulting to various functions such as change of the control mode of a node, change of the phase to take the duration of a phase from a node etc. The program has been written using object oriented programming technology and C++ language. For the needs of the program a library has been written containing the objects that are used in a traffic control system.
EXPERIMENTAL RESULTS
A complete three-node traffic control prototype system has been developed and tested in the laboratory. Suitable diagnostic programs check the integrity of the system. A surveillance computer has been connected to watch the system
parameters. The controllers are interconnected with 100-meter long lines to make up the control network. The network was thoroughly tested by transmitting packets without any error reports. One detector was tested under actual conditions. The rest of the loop detectors were simulated by the surveillance computer through its parallel port. For testing purposes, a three-node road miniature replica was constructed. The controllers were connected to the traffic lights and the synchronization between the nodes was maintained, even under simulated severe traffic conditions. The fault detection unit was also constructed and tested successfully using simulated faults.
CONCLUSIONS
The development of an area-wide traffic control system has been described. At each intersection there is an intersection controller. All intersection controllers of an area are interconnected via a communication network. Traffic control is accomplished in a distributed way, where each node computes the optimal timing of each traffic light cycle. The major advantage of this system is the adaptation of the cycle period to the entire regions traffic profile. Another advantage is its network configuration which is based on a point-to-point architecture, thus avoiding the higher complexity and cost of a star connection. The system has a high degree of versatility. Any intersection can be controlled by simply connecting input and output cards to the motherboard. Other advantages include low implementation cost and low-power consumption. The system has the ability for surveillance from a traffic control center using a graphical user interface and principles of geographical information systems. The system has been tested thoroughly and has been found to work successfully according to the specifications. Because it is an autonomous system, it is ideal to control the traffic in isolated nodes as well as in the center of small towns.
REFERENCES
Boillot F., 1994. Evaluation of the real time urban traffic control algorithm CRONOS: first phase. 7th IFAC/IFORS Symposium on Transportation, Tianjin China, pp. 585-590. Boillot F., Blosseville J. M, Lessort J. B., Motyka V, Papageorgiou M., Sellam S., 1992. Optimal signal control of urban traffic networks. 6th International conference on road traffic monitoring and control, IEE London, pp. 7579. Gartner N., 1983. A demand responsive strategy for traffic signal control. Transportation Research Record, no. 906. Henry J. J., Farges J. L., 1989. PRODYN. Proc. 6th IFAC/IFIP/IFORS Symposium on Transportation, Pergamon, Oxford, pp. 253-255. Klein L. A., M. R. Kelley, M. K. Mills, 1995. Traffic detection technologies for a modern transportation infrastructure. Proc. of the intern Soc. for optical Eng. VOL 2592 pp. 99-113. Porche I., 1996. A decentralized scheme for real time optimization of traffic signals. Proc. Of the 1996 IEEE International Conference on Control Applications, pp. 582-589. Tavladakis K., Kostalias K., Dollas A., Kalaitzakis K., Voulgaris N. C., 1997. Development of a microcontroller-based, distributed, adaptive traffic control system. Proc. 8th IFAC/IFIP/IFORS Symposium on transportation systems, Chania Crete.