# Distributed Approach to Traffic Management Automation Implemented According to IEC 61499

Dmitry Elkin, Valeriy Vyatkin

► To cite this version:

Dmitry Elkin, Valeriy Vyatkin. Distributed Approach to Traffic Management Automation Implemented According to IEC 61499. 11th Doctoral Conference on Computing, Electrical and Industrial Systems (DoCEIS), Jul 2020, Costa de Caparica, Portugal. pp.159-167, 10.1007/978-3-030-45124-0_15. hal-03741545

HAL Id: hal-03741545

https://inria.hal.science/hal-03741545v1

Submitted on 1 Aug 2022

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons CC BY 4.0 - Attribution - International License
<figure><img src="image_2.png" /></figure>

ifip

International Federation for Information Processing

This document is the original author manuscript of a paper submitted to an IFIP
conference proceedings or other IFIP publication by Springer Nature. As such, there
may be some differences in the official published version of the paper. Such
differences, if any, are usually due to reformatting during preparation for publication or
minor corrections made by the author(s) during final proofreading of the publication
manuscript.
<figure><img src="image_3.png" /></figure>

ifip

International Federation for Information Processing

This document is the original author manuscript of a paper submitted to an IFIP
conference proceedings or other IFIP publication by Springer Nature. As such, there
may be some differences in the official published version of the paper. Such
differences, if any, are usually due to reformatting during preparation for publication or
minor corrections made by the author(s) during final proofreading of the publication
manuscript.
# Distributed Approach to Traffic Management
Automation Implemented according to IEC 61499

Dmitry Elkin¹ and Valeriy Vyatkin²,³

¹ Southern Federal University, Institute of Computer Technologies and Information Security, Chekhova. 2, 347900, Taganrog, Russia
delkin@sfedu.ru

² Aalto University, Department of Electrical Engineering and Automation, Otakaari 1B, fi-00076 Aalto, Finland

³ Luleå University of Technology, Department of Computer Science, Electrical and Space Engineering, Luleå, SE-97187, Sweden
vyatkin@ieee.org

**Abstract.** The number of vehicles on public roads is increasing while the road infrastructure is not keeping up to this. It is necessary to apply advanced algorithms and approaches to transport management to maximize the use of the existing road network and increase the capacity of roads. In this article, we propose a way to control traffic flows and automate road infrastructure using a multi-agent approach. The proposed approach involves the distributed management of various elements on the road network and their direct relationship with each other in a peer to peer manner. To implement this concept, we used the open standard of distributed control and automation systems IEC 61499, and to validate the approach we used the SUMO - microscopic and continuous road traffic simulation package.

**Keywords:** Multi-Agent System; IEC 61499, Traffic Management, Intelligent Transportation System, ITS, Traffic, Traffic Jam.

## 1 Introduction

Today, there are several different automation approaches to cope with traffic management in high traffic conditions and to improve road safety. Usually, to control traffic at intersections, traffic lights with hard-wired non-programmable control are used [1]. To increase the effectiveness of such control, the period of traffic signals varies depending on the time of day [2]. Also, to increase the traffic capacity of the road, the Green Wave approach is used. In this approach, transport engineers calculate the phase shift in the work of traffic lights for various intersections located nearby [3]. The considered approaches are useful when traffic flows are predictable and lose their effectiveness when traffic changes dramatically [4]. In sections of the road network with high traffic intensity and variability, adaptive approaches to traffic control are most effective [5,6,7]. Approaches to adaptive control are based on the analysis of traffic congestion and changes in the phases of the traffic light, depending on it. Adaptive traffic management shows much better results compared to tight control, significantly reduces traffic delays, travel time, and emissions of harmful substances
into the atmosphere [8]. Therefore, modern researchers are developing new and improving existing approaches and algorithms for adaptive traffic management. For example, approaches to adaptive traffic management are actively developing, based on the concept of IoT [9],[10],[11] and the use of cloud computing [12]. The concepts of applying the agent approach to adaptive management are also being developed [13],[14],[15]. According to the review of the developed solutions for adaptive transport management, the main problems are the complexity of developing and implementing new approaches for the existing road infrastructure. These factors increase the cost of introducing new approaches, as well as the period from the publication of the proposed approach to testing and direct application.

To solve these problems, we propose an approach to adaptive traffic management by intellectualizing the existing road infrastructure. The proposed approach involves the management of intelligent devices at intersections and sections of the road network (traffic lights, sensors, detectors, signs). All these devices are elements of the road infrastructure and are combined by communication channels, forming a single distributed system for managing traffic flows.

To develop and implement the proposed approach of distributed optimization, we used the open standard of distributed control and automation systems IEC 61499 [16]. The IEC 61499 standard does naturally support distributed application development and allows for quick creation of a prototype system to test the operability of the proposed approach, as well as deploy the resulting logic to the industrial grade PLCs, embedded into each traffic light. Combination of these features makes IEC 61499 the technology of choice for our application.

In the next section, we will consider the contribution of this research to improving people's lives. Then in the second part of the work, we describe the essence of the proposed approach to adaptive traffic management. In the third part, we will consider the implementation of the developed approach in a modeling environment and verify its operation on a simulation model of a road network section. In the fourth part of the work, we will present comparative results of traffic flow management using various approaches to the organization of traffic.

## 2 Contribution to Life Improvement

The uninterrupted functioning of the road transport complex is a necessary condition for the sustainable development of the country's economy and the social well-being of the population. Motorization plays a decisive role in the development of the economy and society. However, without the appropriate infrastructural reinforcement, it raises many severe problems in the field of traffic, which have far-reaching consequences for the social and economic sphere. The most serious of these problems is the limited capacity of the road network; the growth of transport infrastructure is not keeping pace with the growth in the number of vehicles. Also, due to the constant growth of the urban population, this problem will sooner or later become relevant in most settlements. High costs for the construction of new road network infrastructure facilities, travel restrictions, as well as environmental factors push companies to study specialized solutions for managing traffic flows to mitigate the negative consequences of traffic jams and optimize the use of limited public funds.
## 3 Approach to Adaptive Traffic Management based on Interconnected Intelligent Agents

Similarly, to many other areas of industrial automation, system flexibility increases with use of smart IoT devices with embedded intelligence. This implies transition to decentralised control architecture.

In the present control architectures, control actions on traffic flows are formed in the traffic control center, and data on the situation on the road network are also processed centrally. As a result, the system loses its flexibility, and control solutions are slow. However, flexibility and speed of decision making are essential properties for managing dynamic environments.

A popular architecture for distributed decision making is agent-based approach. Its application to traffic management makes the system flexible and intelligent. For example, in [17], a new architecture of a multi-agent approach for traffic control in a section of a road network is proposed. But a significant drawback of the proposed solutions is that it is necessary to create a new infrastructure for implementation and develop specialized equipment. This process is often expensive and lengthy.

At the same time, the use of IoT devices based on modern microcontrollers [18], [19] allows one to partially solve the problem with equipment for the new road infrastructure. However, the questions of reliability of such equipment and integration with existing traffic control systems remain acute.

We offer the concept of traffic management using interconnected intelligent agents. Each of the agents has the authority to apply control actions on vehicles inside the intersection by changing the traffic light cycles or turning it off. Agents also transmit data on traffic congestion in their area of responsibility to agents managing neighboring intersections to provide more efficient traffic control.

At this stage, the following principle of the agent's work at the crossroads is considered:

1) Receiving data from sensors and sensors located on the road network;

2) Analysis of traffic congestion according to the logic embedded in the agent;

3) Transfer of information about workload to neighboring agents;

4) Obtaining information from neighboring agents;

5) Decision-making on the control impact on the road network section;

6) Application of control action (color change of traffic lights).

To verify the presented concept, we used the environment for working with the open standard for the design of distributed systems "NxtStudio" [20] and the traffic flows simulation environment SUMO [21].

## 4 The Implementation of the Concept of Multi-Agent Management

At the moment, at the beginning of the development of our concept, we consider implementation of intelligent control of one intersection on the road network with the help of an intelligent agent - traffic controller whose logic is as follows:
The traffic controller determines the number of cars moving in each direction using information from sensors installed on the road network. If the number of cars on the road does not exceed the acceptable value for an uncontrolled intersection, the agent is inactive. As soon as the number of vehicles has exceeded the allowable limit, the traffic controller checks in which direction more cars are moving and analyzes each lane to adjust the intensity of passing cars in each lane individually. After determination, on the selected lanes, the enable signal of the traffic light is turned on. The traffic controller regularly updates the number of vehicles to be passed in each lane: as soon as the number of cars in the moving direction exceeds the half of the number of cars waiting to be driven, the traffic light changes to the enable signal for the waiting cars. The traffic controller works until the number of vehicles at the intersection is reduced to the allowable level for disabling traffic signals.

The proposed simple traffic controller logic when the traffic light is turned on for various directions at the intersection can be represented in the form of formula

$$ \frac{100 \sum_{l=1}^{n} l}{\sum_{r=1}^{k} r} > 50, \text{ where:} $$

n - is the total number of lanes for movement in a moving direction,

l - the number of strips in the moving direction,

k - is the total number of lanes for movement in the waiting direction,

r - is the number of lanes in the waiting direction.

The agent traffic controller was implemented as a function block made according to IEC 61499 as illustrated in Fig.1.

<figure><img src="image_4.png" /><figcaption>**Fig. 1.** Function block - traffic controller with the adaptive traffic control algorithm implemented as ECC.</figcaption></figure>

Input event INIT initializes the operation of the function block and allows reading data about the current traffic intersection from transport detectors that transmit data to input variables: «det_vehs_east_north» ... «det_vehs_north_east». The input variable «junction_bandwidth» determines the maximum congestion for the intersection without traffic lights. Input event «Change_state» - initiates a change by resetting traffic lights when the number of cars at the intersection has decreased to an acceptable level.

Output event REQ - initializes the output variable «Traffic-light_state» in which the traffic light cycle formed by the traffic controller is located.
Output events «Start_timer» and «Stop_timer» are used to control the on and off traffic control mode at the intersection.

The logic of the traffic controller at the intersection is implemented in the function block using the ECC chart with algorithms in the state actions programmed in the Structured Text language.

To verify the concept, we created two models of x-shaped crossroads (Fig. 2). The Crossroad B was created without taking into account the real transport and geometric characteristics of the road network. The intersection has one lane in each direction and a random volume of traffic flows and a standard traffic light cycle.

<figure><img src="image_5.png" /><figcaption>Fig. 2. Crossroads - A and Crossroads - B.</figcaption></figure>

Crossroad A is created based on data on transport and geometric characteristics from a specialized manual for transport engineers [22]. It has 3 lanes for movement in each direction from north to south and 2 from west to east. Also, the traffic light cycle based on traffic congestion was specially designed for it. Next, we developed a means for the traffic controller to communicate with a simulation model of a road network section.

The IEC 61499 standard for the design of distributed systems provides for the possibility of communication between devices and the environment using the TCP protocol. This feature was implemented as a NETIO function block. NETIO was used to let the developed traffic controller communicate with the SUMO simulation environment using the Python programming language and the standard SUMO tool - TraCi. In Python, an asynchronous server was implemented for receiving and processing data from the function block of the traffic controller to the simulation model of the intersection implemented in SUMO (Fig. 3).

After combining the components into a testing environment, we conducted a series of experiments to control traffic at intersections A and B in various ways.

<figure><img src="image_6.png" /><figcaption>Fig. 3. Architecture for testing the distributed automation logic of the road intersection.</figcaption></figure>
# 5 Experimental Validation

Experiments were carried out at two intersections A and B. During the experiments, a simulation of 3600 seconds of the traffic was performed with three types of traffic control at the intersection:

1) Management of a regulatory agent;

2) Hard control using a traffic light cycle;

3) No regulation (free passage).

The parameters recorded during the simulation are shown in Table 1.

<table><caption>**Table 1.** Simulation parameters.</caption><thead><tr><td>Parameter</td><td>Unit of measurement</td><td>Description</td></tr></thead><tbody><tr><td>departDelay</td><td>(simulation) seconds</td><td>The time the vehicle had to wait before it could start his journey</td></tr><tr><td>arrivalSpeed</td><td>m/s</td><td>The speed the vehicle had when reaching the destination</td></tr><tr><td>waitingTime</td><td>s</td><td>The time in which the vehicle speed was below 0.1m/s (scheduled stops do not count)</td></tr><tr><td>timeLoss</td><td>seconds</td><td>The time lost due to driving below the ideal speed. (ideal speed includes the individual speedFactor; slowdowns due to intersections, etc., incur timeLoss, scheduled stops not counted)</td></tr><tr><td>number Cars</td><td>pieces</td><td>the number of cars that drove the intersection during the simulation period</td></tr></tbody></table>

<table><caption>**Table 2.** Results for intersection B.</caption><thead><tr><td></td><td>Without traffic control</td><td>Agent traffic controller</td><td>With standard traffic light</td></tr></thead><tbody><tr><td>DepartDelay</td><td>349,8</td><td><strong>259,6</strong></td><td>1368,1</td></tr><tr><td>arrivalSpeed</td><td>8,4</td><td><strong>8,4</strong></td><td>9,3</td></tr><tr><td>waiting time</td><td><strong>4,9</strong></td><td>18,8</td><td>22</td></tr><tr><td>timeLoss</td><td>41,3</td><td><strong>39,3</strong></td><td>57</td></tr><tr><td>number cars</td><td>1782</td><td><strong>1950</strong></td><td>1558</td></tr></tbody></table>

As a result of the simulation, the following results were obtained. «departDelay», when using a traffic controller, is about 25 percent lower without traffic control at the intersection and 80 percent lower than when using a tight traffic light cycle.

The "arrivalSpeed" parameter for control by a traffic controller and without any control is almost the same. When using standard traffic lights, the speed is higher.

The shortest waiting time for vehicles is typical for an intersection without control, but this is relevant only in ideal modeling conditions where no accidents occur. At a controlled intersection, a driving agent reduces latency by 14 percent compared to a regular traffic light.

The "timeLoss" parameter also takes the smallest value when controlling the traffic controller with an advantage of 31 percent. With agent control, intersection throughput is increased by 25 percent compared to standard traffic control. In this case, departDelay without traffic lights is significantly lower than at a regulated intersection, but the agent approach also has an advantage of 19 percent.
The final speed of vehicles, as well as at the previous intersection, remains approximately the same.

<table><caption>**Table 3.** Results for intersection A.</caption><thead><tr><th></th><th>Without traffic control</th><th>Agent traffic controller</th><th>With standard traffic light</th></tr></thead><tbody><tr><td>DepartDelay</td><td><strong>42,5</strong></td><td>410,2</td><td>506,5</td></tr><tr><td>arrivalSpeed</td><td>8,4</td><td><strong>8,3</strong></td><td>8,3</td></tr><tr><td>waiting time</td><td>34,3</td><td><strong>26,6</strong></td><td>30,6</td></tr><tr><td>timeLoss</td><td>42,4</td><td><strong>40,1</strong></td><td>43,2</td></tr><tr><td>number cars</td><td>1844</td><td><strong>2220</strong></td><td>2016</td></tr></tbody></table>

As one can see, at a more complex intersection, the traffic controller provides the least time loss for vehicles, up to 7% compared to standard traffic lights. The waiting time for the crossing, which is controlled by the traffic controller, is 22 percent lower than at the intersection without regulation, and 13 percent lower than at the intersection with a hard traffic light. And as a result, the traffic capacity of the intersection managed by the traffic controller is 10 percent higher than with a regular traffic light and 20% higher than without a traffic light, since without a traffic light at this type of intersection there was a big traffic jam on the side of the secondary road.

# 6 Conclusion and Future Work

The work described a novel adaptive agent approach to traffic control at intersections, which switches traffic signals depending on traffic directions.

As a result of the simulations, we have identified advantages in the adaptive intersection control by an intelligent traffic controller, compared to the classic traffic light control, as well as to an unregulated intersection. In most of the studied parameters, control by the adaptive agent is superior to the reference cases, in some cases by several times. At the same time, to implement the agent, the open standard IEC 61499 and the NxtStudio environment were used, which allowed us to quickly create a prototype of the developed solution for the supported controller and implement it on the experimental section of the road network. This approach allows one to quickly move from the development and prototyping stage to the stage of implementation on real equipment. This increases the economic and practical effectiveness of the research.

In future work, we plan to apply this adaptive algorithm to traffic control at several intersections simultaneously. Agents at the intersections will influence the decision on the impact on the traffic flow of each other, exchanging data on the workload of the controlled road network.

Future work will also consider an approach to traffic control, where at each intersection, many agents collectively make decisions when forming the next phase of the movement of vehicles. The decision of such agents would be based on the workload of the controlled strip. First of all, the agent assesses the impact of the decision on the transport situation as a whole. Also, in the process of work, the opinions of neighboring agents on the necessary phases of vehicle movement are taken into account.
**Acknowledgments.** The reported study was funded by RFBR, project number 19-37-90102

**References**

1. Roess R. P., Prassas E. S., McShane W. R. Traffic engineering. – Pearson/Prentice Hall, 2004.

2. Heung, T. H., T K Ho, and Y F Fung. "Coordinated road-junction traffic control by dynamic programming." IEEE Trans on Intelligent Transportation Systems 6.3 (2005): 341-350.

3. Nagatani, Takashi. "Vehicular traffic through a sequence of green-wave lights." Physica A: Statistical Mechanics and its Applications 380 (2007): 503-511.

4. Gershenson, Carlos, and David A. Rosenblueth. "Self-organizing traffic lights at multiple-street intersections." Complexity 17.4 (2012): 23-39.

5. Smith, Stephen F., et al. "Smart urban signal networks: Initial application of the surtrac adaptive traffic signal control system." Twenty-Third International Conference on Automated Planning and Scheduling. 2013.

6. Hunter, Michael P., et al. "A probe-vehicle-based evaluation of adaptive traffic signal control." IEEE Transactions on Intelligent Transportation Systems 13.2 (2012): 704-713.

7. Pandit, Kartik, et al. "Adaptive traffic signal control with vehicular ad hoc networks." IEEE Transactions on Vehicular Technology 62.4 (2013): 1459-1471.

8. Tielert, Tessa, et al. "The impact of traffic-light-to-vehicle communication on fuel consumption and emissions." 2010 Internet of Things (IOT). IEEE, 2010

9. Khanna, Abhirup, and Rishi Anand. "IoT based smart parking system." 2016 International Conference on Internet of Things and Applications (IOTA). IEEE, 2016

10. Bui, Khac-Hoai Nam, Jai E. Jung, and David Camacho. "Game theoretic approach on Real-time decision making for IoT-based traffic light control." Concurrency and Computation: Practice and Experience 29.11 (2017): e4077.

11. Phan, Cao Tho, et al. "Applying the IoT platform and green wave theory to control intelligent traffic lights system for urban areas in Vietnam." TIIS 13.1 (2019): 34-51

12. He, Wu, Gongjun Yan, and Li Da Xu. "Developing vehicular data cloud services in the IoT environment." IEEE Transactions on Industrial Informatics 10.2 (2014): 1587-1595.

13. Mzahm, Anas M., Mohd Sharifuddin Ahmad, and Alicia YC Tang. "Agents of Things (AoT): An intelligent operational concept of the Internet of Things (IoT)." 2013 13th International Conference on Intelligent Systems Design and Applications. IEEE, 2013

14. Liu, Ying, Lei Liu, and Wei-Peng Chen. "Intelligent traffic light control using distributed multi-agent Q learning." 2017 IEEE 20th International Conference on Intelligent Transportation Systems (ITSC). IEEE, 2017.

15. Bui, Khac-Hoai Nam, and Jason J. Jung. "Internet of agents framework for connected vehicles: A case study on distributed traffic control system." Journal of Parallel and Distributed Computing 116 (2018): 89-95.

16. IEC61499-1, "Function Blocks - Part 1 Architecture," International Electrotechnical Commission, Geneva, International standard,2005

17. Kaminski, Nicholas J., Maria Murphy, and Nicola Marchetti. "Agent-based modeling of an IoT network." 2016 IEEE Intl symposium on systems engineering (ISSE). IEEE, 2016.

18. Misbahuddin, Syed, et al. "IoT based dynamic road traffic management for smart cities." 2015 12th International Conference on High-capacity Optical Networks and Enabling/Emerging Technologies (HONET). IEEE, 2015.

19. Chong, H. F., and D. W. Kiat Ng. "Development of IoT device for traffic management system." 2016 IEEE Student Conf on Research and Development (SCOReD). IEEE, 2016.

20. The tool for engineering of distributed systems [Online]. Available: https://www.nxtcontrol.com/en/engineering/

21. The vehicular traffic simulator. [Online]. Available: http://sumo.sourceforge.net/
22. Stolyarov, V., et al. "Guidelines to practical work and diploma design for students of the specialty 190700 "Substantiation of duration of the lighting cycle"." (2012).