Consensus-Based Cooperative Control Based on Pollution Sensing and Traffic Information for Urban Traffic Networks

Nowadays many studies are being conducted to develop solutions for improving the performance of urban traffic networks. One of the main challenges is the necessary cooperation among different entities such as vehicles or infrastructure systems and how to exploit the information available through networks of sensors deployed as infrastructures for smart cities. In this work an algorithm for cooperative control of urban subsystems is proposed to provide a solution for mobility problems in cities. The interconnected traffic lights controller (TLC) network adapts traffic lights cycles, based on traffic and air pollution sensory information, in order to improve the performance of urban traffic networks. The presence of air pollution in cities is not only caused by road traffic but there are other pollution sources that contribute to increase or decrease the pollution level. Due to the distributed and heterogeneous nature of the different components involved, a system of systems engineering approach is applied to design a consensus-based control algorithm. The designed control strategy contains a consensus-based component that uses the information shared in the network for reaching a consensus in the state of TLC network components. Discrete event systems specification is applied for modelling and simulation. The proposed solution is assessed by simulation studies with very promising results to deal with simultaneous responses to both pollution levels and traffic flows in urban traffic networks.

The system uses the principles of consensus between control agents and behavioral coordination, in order to conciliate local and global control objectives.
In another work reported in [19], the distributed control principle was applied to a network of intersections, with the aim of controlling the traffic at a macroscopic level. Wuthishuwong et al. implemented a discrete time-consensus algorithm, to coordinate the gross traffic density of an intersection and its neighborhoods in the network. The traffic density at each intersection was collected, by using Vehicle-to-Infrastructure (V2I) communication, and the information was distributed to the neighborhood via Infrastructure-to-Infrastructure (I2I) communication link. Each intersection performed as a centralized controller that computed the control signal using both, own and neighborhood information on traffic density. Intersections were considered individual nodes, in order to apply the consensus strategy, and each node shared information on its traffic density and coordination variables.
In this work, the System-of-Systems (SoS) engineering paradigm sets the foundation for developing a cooperative control strategy applied to an urban scenario. For this purpose, the air-pollution information service and the traffic control subsystem are put together, and the control system makes use of available information to modify or adjust traffic-light cycles at intersections. Due to the distributed nature of the main subsystems, a distributed consensus-based control method is developed. Pollution levels and traffic densities are considered inputs of the proposed control strategy based on subsystems cooperation. It should be noted that sources of air pollution in cities are not only coming from vehicle emissions but also from industrial activity, domestic fuel burning, boilers for heating, etc.; which increases the complexity for considering the whole problem. Modeling and simulation are not straightforward according to the complexity of main subsystems, instead both can be powerful tools to address the problem and generate the basic knowledge on this field. The discrete event systems specification (DEVS) is applied for modeling and simulation in this work. The main rationale for using DEVS relies on the suitability of this framework for modeling complex dynamical systems and their interactions [20].
From the best of authors' knowledge the main contribution of this work is the design and evaluation of a strategy for improving the performance of urban traffic networks in specific regions of a city taking into account traffic and pollution sensory information. A consensus-based cooperative control method is proposed by taking advantage of new developments on technologies and concepts for smart cities. This paper is organized as follows: in Section 2, a brief review of pollution and traffic sensing systems is presented. Section 3 introduces the problem and the proposed solution. Section 3.1 deals with the modeling technique for representing the behavior of the main subsystems components. Section 3.2 addresses the consensus-based cooperative control and presents the proposed cooperative control solution.

Review of Pollution and Traffic Sensing Systems
In the last years, the interest in collecting data in cities has increased substantially. The current trend is to make a better use of public resources while increasing the quality of the services that citizens can access [21]. In particular, urban air quality sensing and traffic information are attracting a lot of research because of growing population in cities. In this section, a brief review about pollution and traffic sensing systems in cities is presented.

Pollution Sensing Systems
The basis for the consensus-based cooperative control is the pollution sensing system. Current sensors for pollution concentration measurement are based on different chemical of physical principles such as chemoresistance, solid electrolyte, absorption, etc. These sensors can measure different pollutants such as O 2 , O 3 , CO, carbon dioxide (CO 2 ), mono-nitrogen oxides (NO x ), PM, and volatile organic compounds (VOCs), in different range of sensitivity, selectivity and response time. Depending on the application, the sensor can be chosen with the required specific parameters e.g., in [22] an O 2 with a sampling time of 1.6 s and NO 2 with a sampling time of 41 s are selected.
Traditional approaches for pollution monitoring in urban or rural areas are based on networks of fixed stations for measuring air quality. Typically, these networks can provide detailed data but limited to the location of the stations. This makes that modelling approaches are usually used for obtaining representative pollution information in the area of interest [23].
The current challenges in the assessment of human exposure to pollution are how to make available reliable pollution data in cities, and how to handle large amounts of data from high resolution sensors and process it. Most recent methods propose the deployment of low-cost sensors that can provide emission information that allows the development of mitigation strategies [23]. In contrast with traditional approaches, the advances in sensor compactness, robustness, and wireless communications let sensor networks to be remotely managed, to easily transmit collected data and to report high spatial-resolution information in near-real time [24]. Data from these new pollution information systems enable a better pollution assessment and the development of new control strategies for pollution reduction [23].

Traffic Sensing Systems
The performance and safety of traffic control and management systems depend directly on traffic sensing systems. As in the case of pollution sensing systems, in the last decade there has been significant progress in the application of computer, sensing and communication technologies to traffic management and sensing systems [25]. Nowadays, there exist different technologies for traffic sensing that are suitable for several scenarios depending on the installation of the sensors, maintenance, performance, atmospheric conditions, etc. Some of them are: inductive loops, radio-frequency identification (RFID), microwave radar, acoustic, magnetic, ultrasonic and video image processor (VIP) [25]. Inductive loop detectors are commonly used for traffic sensing in cities and highways due to their characteristics: they are suitable for different weather conditions and different traffic volumes [26]. They also provide consistent and accurate measurements. Induction loops are also capable of measuring vehicle speed and vehicle classification, what make them appropriate and reliable for provide data to traffic control systems [27].

General Scenario and the Proposed Solution
We have defined a general scenario based on a smart mobility application with the aim of improving the performance of urban traffic networks in urban regions of a city. The scenario is based on an emission control scheme proposed by Andò et al. [28]. These authors suggested the idea of a vehicles emission control scheme for traffic flow control as a possible solution to address the problem of urban air quality (see Figure 1). However, they do not provide specific solution for designing the emission controller. Authors proposed the number of allowed vehicles as the main control signal whereas the difference between the innocuous allowed CO level and the CO measured level is the input signal. limited to the location of the stations. This makes that modelling approaches are usually used for obtaining representative pollution information in the area of interest [23]. The current challenges in the assessment of human exposure to pollution are how to make available reliable pollution data in cities, and how to handle large amounts of data from high resolution sensors and process it. Most recent methods propose the deployment of low-cost sensors that can provide emission information that allows the development of mitigation strategies [23]. In contrast with traditional approaches, the advances in sensor compactness, robustness, and wireless communications let sensor networks to be remotely managed, to easily transmit collected data and to report high spatial-resolution information in near-real time [24]. Data from these new pollution information systems enable a better pollution assessment and the development of new control strategies for pollution reduction [23].

Traffic Sensing Systems
The performance and safety of traffic control and management systems depend directly on traffic sensing systems. As in the case of pollution sensing systems, in the last decade there has been significant progress in the application of computer, sensing and communication technologies to traffic management and sensing systems [25]. Nowadays, there exist different technologies for traffic sensing that are suitable for several scenarios depending on the installation of the sensors, maintenance, performance, atmospheric conditions, etc. Some of them are: inductive loops, radio-frequency identification (RFID), microwave radar, acoustic, magnetic, ultrasonic and video image processor (VIP) [25]. Inductive loop detectors are commonly used for traffic sensing in cities and highways due to their characteristics: they are suitable for different weather conditions and different traffic volumes [26]. They also provide consistent and accurate measurements. Induction loops are also capable of measuring vehicle speed and vehicle classification, what make them appropriate and reliable for provide data to traffic control systems [27].

General Scenario and the Proposed Solution
We have defined a general scenario based on a smart mobility application with the aim of improving the performance of urban traffic networks in urban regions of a city. The scenario is based on an emission control scheme proposed by Andò et al. [28]. These authors suggested the idea of a vehicles emission control scheme for traffic flow control as a possible solution to address the problem of urban air quality (see Figure 1). However, they do not provide specific solution for designing the emission controller. Authors proposed the number of allowed vehicles as the main control signal whereas the difference between the innocuous allowed CO level and the CO measured level is the input signal. A new control scheme and a procedure that can be integrated into the Adaptive Traffic Control System (ATCS) of an urban area are proposed in this work [29]. The ATCS adjusts, in real time, signal timing plans based on the current traffic conditions, demand, system capacity, among other conditions. In the control scheme suggested in this work, we focused on designing the adaptive component Δ for traffic lights cycles . The traffic lights cycles can vary on the basis of the following relationship = + Δ , where is the value set by other components of the ATCS or by traffic engineers. A new control scheme and a procedure that can be integrated into the Adaptive Traffic Control System (ATCS) of an urban area are proposed in this work [29]. The ATCS adjusts, in real time, signal timing plans based on the current traffic conditions, demand, system capacity, among other conditions. In the control scheme suggested in this work, we focused on designing the adaptive component ∆u for traffic lights cycles U. The traffic lights cycles can vary on the basis of the following relationship U 0 = U 0 + U 0 ∆u, where U 0 is the value set by other components of the ATCS or by traffic engineers. Figure 2 depicts a general diagram of the scenario and the strategy proposed in this work. Interconnected traffic lights control (TLC) network adapts the traffic-light cycles based on air pollution data provided by the city information service and local traffic measurements. The air pollution information service provides data (ξ) from the city pollution sensing system. Moreover, traffic information (x) is given by the vehicle detection sensor placed at each intersection of the urban traffic network. The traffic lights cycles (U) are updated by TLC units which make decisions based on a consensus variable (ε) derived from the consensus-based control method.  The following subsections address the modeling, control design, and simulation of the whole system.

Modeling
In order to study the dynamic behaviour and the interaction between the different components of the scenario, Discrete Event Systems Specification (DEVS) formalism is selected as a framework for SoS modeling and simulation. This formalism can be used for modeling and simulating complex dynamical systems and their interactions [20]. The DEVS modeling-based approach enables specification of basic models and how they are connected together. These basic models, known as atomic models, are modular systems with inputs (through input ports), changing states, and outputs (through output ports) running in a time frame. The couplings between atomic models generate coupled models.
In this work we used Parallel DEVS formalism (PDEVS) which solves collisions between internal and external transitions allowing all components to be activated and to send their output to other components. A basic PDEVS model can be represented as: where, = ( , )| ∈ , ∈ is the set of input ports (p) and values (v) The following subsections address the modeling, control design, and simulation of the whole system.

Modeling
In order to study the dynamic behaviour and the interaction between the different components of the scenario, Discrete Event Systems Specification (DEVS) formalism is selected as a framework for SoS modeling and simulation. This formalism can be used for modeling and simulating complex dynamical systems and their interactions [20]. The DEVS modeling-based approach enables specification of basic models and how they are connected together. These basic models, known as atomic models, are modular systems with inputs (through input ports), changing states, and outputs (through output ports) running in a time frame. The couplings between atomic models generate coupled models. In this work we used Parallel DEVS formalism (PDEVS) which solves collisions between internal and external transitions allowing all components to be activated and to send their output to other components. A basic PDEVS model can be represented as: where, } is the total state set and e is the time since the previous transition Basic PDEVS models have a bag of inputs. A bag is a set with possible multiple occurrences of its elements e.g., {a,b,a,c} [30]. PDEVS also introduces the confluent transition function (δ con ), which decides the next state in case of collision between external and internal events (e = t a (s)) without the need for a priority scheme. This option provides a complete control over the collision behavior. Instead of serializing model behavior through the select function at the coupled-model level, PDEVS leaves this decision to the individual component. After modeling, it is necessary to conduct simulation studies. DEVS simulation methods generate the corresponding behaviors of each model, which are trajectories that can even reach illegal states by following execution protocols. This modeling paradigm serves to represent each subsystem as an atomic model that can be coupled with other model, forming coupled models.
This section addresses the representation of the system based on a conceptual model and the data flows between subsystems. Every system is represented as an atomic discrete system. The coupling of atomic models forms a coupled model. Figure 3 depicts the structure of a DEVS model of the general scenario and how the subsystems are connected. is the set of states : → is the internal transition function : × → is the external transition function : × → is the confluent transition function = ( , )| ∈ , ∈ 0, ] is the total state set and e is the time since the previous transition : → is the output function : → ∪ ∞ is the time advance function Basic PDEVS models have a bag of inputs. A bag is a set with possible multiple occurrences of its elements e.g., {a,b,a,c} [30]. PDEVS also introduces the confluent transition function ( ), which decides the next state in case of collision between external and internal events ( = ( )) without the need for a priority scheme. This option provides a complete control over the collision behavior. Instead of serializing model behavior through the select function at the coupled-model level, PDEVS leaves this decision to the individual component. After modeling, it is necessary to conduct simulation studies. DEVS simulation methods generate the corresponding behaviors of each model, which are trajectories that can even reach illegal states by following execution protocols. This modeling paradigm serves to represent each subsystem as an atomic model that can be coupled with other model, forming coupled models.
This section addresses the representation of the system based on a conceptual model and the data flows between subsystems. Every system is represented as an atomic discrete system. The coupling of atomic models forms a coupled model. Figure 3 depicts the structure of a DEVS model of the general scenario and how the subsystems are connected. In the above model, the following systems are defined as atomic models: Pollution-monitoring service  Traffic system (i.e., road network, vehicles, traffic lights, etc.)  Other pollution sources The network of interconnected TLCs shares information (consensus variable, ) to achieve a consensus between each other. This network is modeled as a coupled model. Each TLC is connected with a Traffic system to adapt the cycle length ( ) of the corresponding traffic lights. The output of In the above model, the following systems are defined as atomic models: • Traffic-light control unit (TLC) • Pollution-monitoring service The network of interconnected TLCs shares information (consensus variable, ε i ) to achieve a consensus between each other. This network is modeled as a coupled model. Each TLC is connected with a Traffic system to adapt the cycle length (u i ) of the corresponding traffic lights. The output of the Traffic subsystem is the traffic information (i.e., traffic flow at every intersection, x i ) and the pollution data from urban road traffic (Ev). The system called "Other pollution sources" emulated the pollution contribution of other urban subsystems (e.g., building heating systems, other transportation systems, etc., Eo). The Pollution monitoring system is represented by the urban pollution-measurement system that brings information on air quality to the TLC network (ξ). Data flows illustrated in Figures 2 and 3 are summarized in Table 1. Table 1. Description of data flows.

Variable Description
Ev Vehicle emissions monitoring

Eo
Other emissions ξ Area-wide air-quality information. Includes current pollution-status details for a given geographic area.
ε Consensus variable that represents the TLC dynamics (see Section 3.2.1) x Processed traffic-detector data which allows derivation of traffic-flow variables (density, occupancy, flow measures, etc.). It can be represented as a vector that refers to the signal of each sensor.
u Data flow contains the system configuration data for a traffic signal controller. It includes the parameters required to reconfigure its operations.

Consensus-Based Cooperative Control Design
Consensus algorithms are thought to be distributed algorithms that assume only neighbor-to-neighbor interactions between subsystems. Subsystems update their information states based on their neighbors. The aim is to design a control strategy for updating the information states of all of the subsystems in the network, so that they converge to a common value.
The main rationale of a consensus-based procedure is to impose similar dynamics on the information states of each subsystem of the network [9]. Depending on the typology of the network for connecting subsystems, two different approaches can be applied. Firstly, if the network allows continuous communication, then the information state is modeled using differential equations. Secondly, if the data are communicated through discrete packets, the information state is represented by difference equations.
The topology for interactions in a network of agents is represented using a graph G = (V, E), where V = {1, 2, . . . , n} is a finite none-empty node set and E ⊆ V × V is an edge set of ordered nodal pairs, called edge. The edge (i, j) in the edge set of a graph denotes that node j can obtain information from node i. The neighbors of a node i are denoted by N i = {j ∈ V : (i, j) ∈ E}. An iterative form of the consensus algorithm to reach an agreement in relation to the state of n integrator nodes with dynamics .
x i = u i can be represented in discrete time as follows: where, a ij is the entry in row i and column j of the adjacency matrix A n ∈ R n×n associated with G, and x i is the information state of the i-th system. A consequence of this equation is that the information state x i (k) of the system i is driven toward the information states of its neighbors. The consensus is achieved if, for all x i (0) and for all i, j = 1, . . . , n, x i (k) − x j (k) → 0 , as k → ∞ . The procedure to apply the consensus-based control and the results are then presented. The goal of the control system is to achieve a consensus between the intersections related to an estimation of local emissions (consensus state variable) by adapting local traffic-light cycles. The consensus-based decision-making takes into consideration the air-pollution state, provided by the air pollution information service, and the local traffic state. Specifically, a discrete consensus-based control algorithm is applied to control the coordination of the TLC network. The main steps for designing the control system are described in the following subsections.

System Dynamics
A consensus variable that represents the system dynamics should be defined. Each TLC uses local traffic and pollution sensing information from a pollution information service. Therefore, an estimation of the pollutant concentration at each intersection as the consensus state variable is taken. The dynamics of each intersection is the same and it is assumed to behave as a local linear system. The discrete dynamic model of the node, that includes traffic information and pollution sensing data, is defined by the following recursive equation: where, is the state of the system i at instant k. The state of the system is related to the pollution levels and the traffic state at each intersection. The pollutant considered in this study is NO x (mononitrogen oxides). • ξ(k − n) [gNO x /m 3 ] is a system input. It contains the pollution information provided to the TLCs at instant k − n where n is the delay between pollution production and pollution information reception by the TLCs. • α i is a dimensionless parameter that represents the contribution of intersection i to overall city pollution. It is computed on the basis of the maximum occupancy of intersection i over the total maximum occupancy.
[veh] is a system input. It contains the summation of vehicle queues at every approach of the intersection controlled by TLC i . m represents the delay between traffic queue measurement and traffic information reception at TLC i . • β [gNO x /veh/m 3 ] is the pollutant emissions of a given traffic queue at an intersection. β = q·F 10 3 ·∆t , where q is the emission factor of the pollutant (gNO x /veh/km), F is the dispersion factor of the pollutants (s/m 2 ) and ∆t is the simulation step [31].

Design of a Consensus-Based Control Strategy
The control strategy adopted for each TLC (nodes of the network) makes use of pollution and traffic information as well as information from neighbors. Taking into account the dynamic model considered in (2) and applying the consensus control described in (1), the control strategy is represented by: where, • λ is a parameter that refers to system stability. If λ ∈ 0, θ −1 , where θ is the maximum degree of the graph, consensus convergence is guaranteed in a connected graph [32]. • a ij is the corresponding value of the adjacency matrix.
This control law contains three components, shown in Table 2.
Feed-forward action related to local pollution data.
Feed-forward action related to local traffic data.
Consensus-based control signal that makes use of information from the neighbor of each network node.
In order to avoid large dissimilarities with the original traffic-light cycle lengths, the values of the control input ∆u i are constrained to a variation of ±50% over the initial value.

Open-Loop Simulation for Test Scenario: Pollution and Traffic-Based Control Are Switched Off
The scenario is based on an urban-like road network depicted in Figure 4. In order to simplify the description of the proposed solution, we considered a test scenario composed of four signalized traffic intersections (junctions J1, J2, J3 and J4) and interconnected TLCs. Vehicles are moving on the road network, following predefined routes randomly generated for imitating urban traffic. The vehicles included in the scenario are of the same type and use the same car-following model which is a version of the model defined by Krauß et al. [33]. In this version, different deceleration capabilities of the vehicles are handled without violating safety (the original model allowed for collisions in this case), and the formula for safe velocity is adapted to maintain safety when using the current Euler-position update rule. The parameters defined for vehicles and the car-following model are shown in Table 3.
vehicles included in the scenario are of the same type and use the same car-following model which is a version of the model defined by Krauß et al. [33]. In this version, different deceleration capabilities of the vehicles are handled without violating safety (the original model allowed for collisions in this case), and the formula for safe velocity is adapted to maintain safety when using the current Eulerposition update rule. The parameters defined for vehicles and the car-following model are shown in Table 3.  The number of trips is defined by the repetition rate (number of trips per second). The repetition rate is calculated randomly by using a normal distribution with a mean of 5 and standard deviation of 0.25. Routes were generated, ensuring a minimum straight-line distance between the start and the end edges of a 170-meter trip.
In this scenario, TLCs work with a fixed timing (Δ = 0), because there is no control system running. This initial timing ( ) is shown in Figure 5. The simulation ran 2 h (7200 s) with a simulation step size of 1 s. F (a)  The number of trips is defined by the repetition rate (number of trips per second). The repetition rate is calculated randomly by using a normal distribution with a mean of 5 and standard deviation of 0.25. Routes were generated, ensuring a minimum straight-line distance between the start and the end edges of a 170-m trip.
In this scenario, TLCs work with a fixed timing u 0i (∆u i = 0), because there is no control system running. This initial timing (u 0i ) is shown in Figure 5. The simulation ran 2 h (7200 s) with a simulation step size of 1 s. e used the SUMO simulator [34] for emulating the urban traffic network. This is a microscopic imulator which enables interaction with an external application through an interface (TraCI: Control Interface). This simulator feeds traffic information from the traffic detectors, taking llution data of vehicles and traffic-light actions. TraCI4Matlab [35] is a library of functions for tion with SUMO from the Matlab command line. It was used for linking SUMO simulator to models. ure 6a shows the traffic queues obtained at all junctions. The plotted data corresponds to the e vehicle queues at every approach to each junction in a time window of 20 s. Figure 6b shows rage value of NOx emissions of the whole scenario, also in a time window of 20 s. As can be We used the SUMO simulator [34] for emulating the urban traffic network. This is a microscop traffic simulator which enables interaction with an external application through an interface (TraC Traffic Control Interface). This simulator feeds traffic information from the traffic detectors, takin raw-pollution data of vehicles and traffic-light actions. TraCI4Matlab [35] is a library of functions f interaction with SUMO from the Matlab command line. It was used for linking SUMO simulator Matlab models. Figure 6a shows the traffic queues obtained at all junctions. The plotted data corresponds to th average vehicle queues at every approach to each junction in a time window of 20 s. Figure 6b show the average value of NOx emissions of the whole scenario, also in a time window of 20 s. As can b noted, there are no vehicles in the scenario at the beginning of the simulation. Nonetheless, after 10 s from the start of the simulation, the vehicle numbers stabilize. We used the SUMO simulator [34] for emulating the urban traffic network. This is a microscopic traffic simulator which enables interaction with an external application through an interface (TraCI: Traffic Control Interface). This simulator feeds traffic information from the traffic detectors, taking raw-pollution data of vehicles and traffic-light actions. TraCI4Matlab [35] is a library of functions for interaction with SUMO from the Matlab command line. It was used for linking SUMO simulator to Matlab models. Figure 6a shows the traffic queues obtained at all junctions. The plotted data corresponds to the average vehicle queues at every approach to each junction in a time window of 20 s. Figure 6b shows the average value of NO x emissions of the whole scenario, also in a time window of 20 s. As can be noted, there are no vehicles in the scenario at the beginning of the simulation. Nonetheless, after 100 s from the start of the simulation, the vehicle numbers stabilize.
traffic simulator which enables interaction with an external application through an interface (TraCI: Traffic Control Interface). This simulator feeds traffic information from the traffic detectors, taking raw-pollution data of vehicles and traffic-light actions. TraCI4Matlab [35] is a library of functions for interaction with SUMO from the Matlab command line. It was used for linking SUMO simulator to Matlab models. Figure 6a shows the traffic queues obtained at all junctions. The plotted data corresponds to the average vehicle queues at every approach to each junction in a time window of 20 s. Figure 6b shows the average value of NOx emissions of the whole scenario, also in a time window of 20 s. As can be noted, there are no vehicles in the scenario at the beginning of the simulation. Nonetheless, after 100 s from the start of the simulation, the vehicle numbers stabilize.

Consensus-Based Control Applied to the Test Scenario
In this subsection, the simulation of the cooperative control system in the test scenario is described. The scenario is composed of four interconnected TLCs. The system components and the interaction between them are represented in Figure 7.

Consensus-Based Control Applied to the Test Scenario
In this subsection, the simulation of the cooperative control system in the test scenario is described. The scenario is composed of four interconnected TLCs. The system components and the interaction between them are represented in Figure 7.
traffic simulator which enables interaction with an external application through an interface (TraCI: Traffic Control Interface). This simulator feeds traffic information from the traffic detectors, taking raw-pollution data of vehicles and traffic-light actions. TraCI4Matlab [35] is a library of functions for interaction with SUMO from the Matlab command line. It was used for linking SUMO simulator to Matlab models. Figure 6a shows the traffic queues obtained at all junctions. The plotted data corresponds to the average vehicle queues at every approach to each junction in a time window of 20 s. Figure 6b shows the average value of NOx emissions of the whole scenario, also in a time window of 20 s. As can be noted, there are no vehicles in the scenario at the beginning of the simulation. Nonetheless, after 100 s from the start of the simulation, the vehicle numbers stabilize.

Consensus-Based Control Applied to the Test Scenario
In this subsection, the simulation of the cooperative control system in the test scenario is described. The scenario is composed of four interconnected TLCs. The system components and the interaction between them are represented in Figure 7.  The structure of DEVS model for carrying out the study is depicted in Figure 8. MatlabDEVS Toolbox [36] is used for the implementation of the DEVS models and the DEVS simulation. This toolbox has the necessary functions and scripts related with PDEVS formalism, making use of object-oriented language. This toolbox also permits us to run the PDEVS simulator and hybrid simulations by using continuous variables within atomic models.
The structure of DEVS model for carrying out the study is depicted in Figure 8. MatlabDEVS Toolbox [36] is used for the implementation of the DEVS models and the DEVS simulation. This toolbox has the necessary functions and scripts related with PDEVS formalism, making use of objectoriented language. This toolbox also permits us to run the PDEVS simulator and hybrid simulations by using continuous variables within atomic models.  For testing the whole system, the scenario was run during 7200 s (2 h) and the control system for TLCs starts at second 100. The following parameters of the models were defined for the simulation of the control system:   Figure 9 describes the network topology and the associated adjacency matrix. The adjacency matrix represents the connections of the nodes with their neighbors. The communication topology is defined by a directed cycle graph composed of four nodes for this specific test scenario. This communication topology is a key issue for emulating the system behavior. We can extract the adjacency matrix from this representation. If a communication link exists the corresponding value is a ij = 1, otherwise a ij = 0. The structure of DEVS model for carrying out the study is depicted in Figure 8. MatlabDEVS Toolbox [36] is used for the implementation of the DEVS models and the DEVS simulation. This toolbox has the necessary functions and scripts related with PDEVS formalism, making use of objectoriented language. This toolbox also permits us to run the PDEVS simulator and hybrid simulations by using continuous variables within atomic models.  For testing the whole system, the scenario was run during 7200 s (2 h) and the control system for TLCs starts at second 100. The following parameters of the models were defined for the simulation of the control system:  For testing the whole system, the scenario was run during 7200 s (2 h) and the control system for TLCs starts at second 100. The following parameters of the models were defined for the simulation of the control system:

•
The pollutant considered in this work was NO x . The NO x produced by vehicles was taken from the HBEFA [37], assuming the vehicles were passenger cars built between 2005 and 2015 (0.35 gNO x /veh/km). • The DEVS model of "Other pollution sources" produces pollution information every 5 s from statistical data of a common urban area, without taking into account the traffic contribution to the pollution. It generates random numbers from the normal distribution with mean: µ Eo = 30.36 µgNO x /m 3 and standard deviation σ Eo = 10.48 µgNO x /m 3 . • The DEVS model "Pollution monitoring" filters the input data by using a moving average filter with a window size of 100 s and outputs a value every 10 s.

•
The execution period of TLC DEVS model is 1 s. It filters the input traffic data using a moving average filter with a window size of 100 s.

•
The value of λ was set to 0.15 to guarantee consensus stability (λ ∈ (0, 1/θ]). • At each TLC, a threshold value of variation of 1% was defined for ∆u i , in order not to send continuous new u i values to the traffic lights when the variation of u i is minimal.

•
The value of γ was estimated by applying a linear regression with values obtained via simulation. The adopted value was 12.68 [veh/% T.L. cycle].
Each TLC calculates the new values of traffic queues (based on vehicles detector sensors placed at each intersection), the consensus variable ε i and the control signal ∆u i . After that, the cycle length of each traffic light is calculated and updated as u i = u 0i + u 0i ·∆u i , where u 0i represents its initial value. Finally, the new value of u i is sent to the corresponding TLC, in order to modify the cycle length.
Once the cooperative control is activated at second 100, each TLC begins to exchange information with the neighbors and calculates the control input ∆u i . Figure 10 shows the simulation results of the interconnected systems. Figure 10a shows the evolution of the consensus variable of each TLC when the control is activated. The consensus variable achieves the same values after 40 s of execution time. Figure 10c shows the amount of vehicles in each intersection (x) while Figure 10d   The DEVS model "Pollution monitoring" filters the input data by using a moving average filter with a window size of 100 s and outputs a value every 10 s.  The execution period of TLC DEVS model is 1 s. It filters the input traffic data using a moving average filter with a window size of 100 s.  The value of was set to 0.15 to guarantee consensus stability ( ∈ (0,1/ ]).  At each TLC, a threshold value of variation of 1% was defined for Δ , in order not to send continuous new values to the traffic lights when the variation of is minimal.  The value of was estimated by applying a linear regression with values obtained via simulation. The adopted value was 12.68 [veh/% T.L. cycle].
Each TLC calculates the new values of traffic queues (based on vehicles detector sensors placed at each intersection), the consensus variable and the control signal Δ . After that, the cycle length of each traffic light is calculated and updated as = + · Δ , where represents its initial value. Finally, the new value of is sent to the corresponding TLC, in order to modify the cycle length.
Once the cooperative control is activated at second 100, each TLC begins to exchange information with the neighbors and calculates the control input Δ . Figure 10 shows the simulation results of the interconnected systems. Figure 10a shows the evolution of the consensus variable of each TLC when the control is activated. The consensus variable achieves the same values after 40 s of execution time. Figure 10c shows the amount of vehicles in each intersection ( ) while Figure 10d

Results and Discussion
The behaviour of the system is highly dependent of traffic conditions, therefore 50 runs for simulating the scenario of both open loop (TLCs work with a fixed timing or Δ = 0) and closed-loop were performed to carry the comparison. In every new simulation random vehicle routes were generated.
In order to assess the performance of the control system, two key performance indicators (KPIs) were defined, i.e., the mean absolute value of vehicle queues at all intersections and the global

Results and Discussion
The behaviour of the system is highly dependent of traffic conditions, therefore 50 runs for simulating the scenario of both open loop (TLCs work with a fixed timing or ∆u i = 0) and closed-loop were performed to carry the comparison. In every new simulation random vehicle routes were generated.
In order to assess the performance of the control system, two key performance indicators (KPIs) were defined, i.e., the mean absolute value of vehicle queues at all intersections and the global pollution during the simulation time (2 h). Both are selected because they serve to evaluate the actual behaviour of the consensus-based control system. The KPIs values are shown in Table 4. In the case of vehicle queues, the average value for all simulations was 13.48 for open-loop and 12.04 for closed-loop, representing an improvement of 10.70%. Table 4 shows smaller KPIs for closed-loop strategy than open-loop ones. It also demonstrates that vehicle queues are therefore decreased by applying the consensus-based cooperative control system for the urban traffic network. Accordingly, the effect of balancing consensus variables in every TLC produces a global reduction of vehicle queues. As shown in Figure 10b,c, the control system implements a greater decrease in the timing of intersections with larger numbers of vehicles. This makes the number of vehicles at these intersections smaller compared to the case of the open-loop system.
Regarding the key performance indicator related to global pollution, there is a small reduction when the control system is activated. In the case of the mean value of this KPI, the difference between the close-loop and open-loop performance is not as significant as in the case of the KPI related to vehicle queues at all intersections. However, despite the presence of traffic pollution and disturbances in the pollution produced by other sources, we consider that the performance of control system is appropriate since a positive effect is achieved because global pollution is slightly reduced.

Conclusions
In this work a cooperative control approach for a smart city environment based on pollution sensing and traffic information is presented. By applying a System-of-Systems engineering design paradigm, a traffic control subsystem uses information from the city pollution sensing system for adjusting the cycle length of the traffic lights. Furthermore, a consensus-based control method was developed to address specific problems related with traffic congestion and air pollution. Discrete event system specification was used to represent and simulate the whole system. This modelling paradigm serves to deal with interoperability of heterogeneous systems.
The proposed method is evaluated in a defined scenario. The study demonstrates that the proposed method is a powerful strategy to deal simultaneously with different sensing systems and for integrating information from pollution levels and traffic flows in urban traffic networks. The results are promising because the number of vehicles in queue decreased, while consensus state variable at each intersection tended towards a common value, demonstrating the validity of the proposed solution. Further research will be conducted to test the solution in larger and more complex scenario and to extend the simulation results to real-time platforms.