38 Adjustment of the Model of the Agent-Determinant Type in the Forecasting of Pollution on the Section of the City Road Mykhailo Susla1, Roman Pasichnyk2, Natalia Pasichnyk3, Andriy Melnyk4 Department of Computer Science, Ternopil National Economic University, UKRAINE, Ternopil, 8 Cheлhova str., email: suslamisha91@gmail.com1, roman.pasichnyk@gmail.com2, natalia.pasichnyk@gmail.com3, melnyk.andriy@gmail.com4. Abstract: The problem of constructing a dynamic model influence of the determinant so that a significant of pollution is considered. The model of pollution in the concentration of the determinant does not compensate for the form of a set of differential equations is proposed, which low concentration of the agent. A representative of models of is identified by means of difference expression with this type is the Monod model. In a number of simulated subsequent refinement using gradient methods. situations, such a generalized model is extremely effective Numerical experiments allow you to choose the model [8]. This work is devoted to the study of the possibility of that best approximates the experimental data. using models of the specified type in the simulation of Keywords: air pollution; mathematical model; set of ordinary pollution concentration. differential equations; difference expressions; Levenberg– Marquardt method. II. MODEL OF POLLUTION ON THE LOCAL SECTION OF AN URBAN ROAD I. INTRODUCTION In order to construct a model of the dynamics of pollution The rapid growth of the number of vehicles brings out the in an area where it is potentially high, we have to identify the problem of control over air pollution with motor vehicles. main variables that affect it. No significant influence of The latter affects the level of respiratory and other diseases humidity and temperature on the dynamics of pollution levels for people living in the areas of high traffic density. X has been found after the analysis of the measurements Therefore, there is a need for sufficiently accurate monitoring obtained with the help of special sensors. Instead, a of information on the level of air pollution to make significant effect of the traffic intensity R and wind speed V managerial decisions regarding the configuration of has been established. residential quarters, design and reconstruction of roads. The apparatus of differential equations is chosen to The distribution of pollution in the city is characterized by simulate the dynamics of pollution, since it’s much more significant spatial heterogeneity, since emissions to the flexible than regression relations. Numerical differentiation is atmosphere are carried out from the network of roads, and the very sensitive to random perturbations in the measurement pollution level declines rapidly as we move away from the results, so it is subjected to multiple smoothing by the pollution source [1, 2]. These features take into account the method of moving average. Land use regression (LUR) method, which combines The criterion of multiplicity of smoothing served The measurements of air pollution in a relatively small number of minimization of the correlation between the remnants of locations characterized by qualitatively different types of measurements after their elimination from the smoothed pollution, and the construction of statistical models based on values served as a criterion of multiplicity of smoothing. measurements taking into account the features of the points When constructing the differential equation of the dynamics of observation. of pollution it is taken into account that the growth of Numerous researchers use LUR to estimate the pollution is associated with an increase in the intensity of concentration of contaminants in a number of cities in pollutants, ie, the movement of vehicles. Contamination Canada, the United States and Europe [3]. However, this reduce occurs as a result of their dispersal, which is method allows you to build only stationary models. At the associated with the speed of the wind. same time, it is necessary to build dynamic models for deeper However, the speed of diffusion of contaminants depends understanding of the pollution effects using apparatus not only on the mentioned factor but also on the product of it differential equations. and of the concentration of contaminants themselves. Since Such a model, which takes into account the influence of pollution itself decomposes over time, the contaminants several key factors, should be as simple as possible and at the concentration decreases in proportion to the pollution itself. same time sufficiently precise. If we allow interaction of The above statements are established on the basis of data factors with each other, in the simplest way it is modeled analysis and confirmed during the preceding procedures of using the product of the corresponding indicators. parametric identification. As a result, we come to the The generalization of this approach is a model-type agent- following differential equation of the dynamics of pollution determinant that reflects the evolution of the agent under the on the road section ACIT 2018, June 1-3, 2018, Ceske Budejovice, Czech Republic 39 dX (t ) dynamics of processes with limiting factors is chosen as the = p1 R(t ) − ( p2 + p3V (t )) X (t ), (1) basis for the method of model (1) - (2) identification [4]. dt Since this differential equation (1) is much simpler, the X (t0 ) = X 0 . (2) identification method itself is also simplified. At the initial where 𝑋𝑋 is pollution concentration; 𝑅𝑅 is traffic intensity; V stage, we construct a system of linear equations with respect is wind speed; p 1 ,…,p 4 are model parameters. to the parameters basing on the difference relations: In an empirically constructed model, the interaction of X i + 1 − X i −1 = p1 R(t i ) − ( p 2 + p 3V (t i )) X (t i ) i = i1 , i 2 , i 3 . (5) contaminants is described by their product with a constant t i + 1 − t i −1 relative intensity of interaction. In some cases, the actual intensity of the interaction may vary with the change in the Where X i , R i , V i are the values of corresponding functions determinant characteristic, in this case, the wind speed. Often at the moment of time t i there is a variable intensity of interaction, which is lower at The ratio for constructing the initial approximations of the small values of the determinant and is obtained at the coefficients of the differential equation must reflect the most maximum value with saturation at large values of the significant features of the resulting function of the process, determinant. This intensity is fed by a multiplicand of the that is, in this case, the dynamics of pollution. The numbers Monod type of the identification points are chosen in case of the maximum absolute values of the derivatives of the pollution V (t ) concentration function. Further, the initial values of the (3) p4 + V (t ) parameters of the model are specified by the method of least squares. With its application, the model equation (1) takes the form The procedure for identifying a differential equation (4) is dX (t ) V (t ) somewhat more complicated. It includes a method for = p1 R(t ) − p2 X (t ) − p2V (t ) X (t ) (4) checking the values of a nonlinear parameter p 4 on a grid, dt p4 + V (t ) whose parameters are selected experimentally. After selecting As a result, we obtain a more complex differential equation a specific parameter value p 4 for choosing the initial values of containing an additional parameter, which is included other parameters, an analogue of the system of linear nonlinearly. To compare the effectiveness of the proposed equations (5) is used.: models, they need to be identified. X i +1 − X i −1 IIІ. THE IDENTIFICATION METHODS OF POLLUTION = p1 R (ti ) − p2 X (ti ) − ti +1 − ti −1 MODEL It is necessary to establish a method of parametric V (ti ) − p3V (ti ) X (ti ) i= i1 , i2 , i3 (6) identification of the pollution model after we have built it. p4 + V (ti ) Usually, identification is carried out by minimizing the appropriate quality functional. One of the simplest quality functional is the square root, which is used in the least IV. NUMERIC EXPERIMENTS squares method. Let us demonstrate the possibilities of the proposed Since the differential equation is nonlinear, its quality methodology on the example of modeling the daily dynamics functional has a large number of local extrema. The general of pollution on one of the streets of the city of Ternopil. approach to building a global extremum of this kind is the Discrete observations are interpolated using piecewise use of methods of random search, the method of the directing Hermite interpolation. In particular, the dynamics of wind cone of Rastrigin, in particular. However, this method speed during the day of observation is given on Figure 1. requires great amount of computing resources and the The following figures show the smoothed results of development of special procedures for locating local observations of pollution and traffic. As you can see, the extremes to find a global one. dynamics of the concentration of pollution is quite At the same time, taking into account the peculiarities of complicated. To verify the reality of the identification of the certain classes of tasks, it is possible to set up search domains proposed model, we analyze the dynamics of the left and containing a single global extremum. In particular, a whole elements of the right-hand side of the differential equation class of methods of this kind is proposed for the identification (1), given in Figure 4. of models of systems with limiting factors. It is worth noting that the components of the left parts of In these methods, the initial approximation of the values of the differential equation are brought to comparable values the models’ parameters is based on the difference ratios and with the pollution derivative by multiplication on scanning the values of one of the key parameters on the grid. corresponding scaling multipliers keeping “+” or “-” sign, The parameters of this grid are also pre-evaluated. The initial how they are included in the equation. The comparison of approximation is further specified by the gradient method. these functions reveals some similarity in their behavior, as These methods have shown their high efficiency and well as the complexity of the task of bringing their sum to therefore the corresponding method of identification of zero with the help of just three constant coefficients. systems of nonlinear differential equations modeling the ACIT 2018, June 1-3, 2018, Ceske Budejovice, Czech Republic 40 8 0.025 A 0.02 B 7 C 0.015 D 0.01 6 0.005 5 0 X (m/sec) -0.005 4 -0.01 3 -0.015 -0.02 2 -0.025 0 5 10 15 20 25 Hours 1 0 5 10 15 20 25 Hours Fig 4. The comparison of the left hand and elements of the right- hand parts of the equation (1), where a) pollution derivative; b) Fig 1. Observation of wind speed during the day traffic; c) pollution; d) wind speed and pollution product. By the criterion of the maximum of the derivative module the points 7.3, 10.7, 14.3 have been selected among the Smoothing with the least correlated residues 0.14 internal points of the time interval. As a result of the solution of the system of linear equations (3) the following values of 0.12 the parameters of the differential equation (1) are obtained: p1= 7.0958e − 4, p2= 3.0172, p3= 0.3175 . 0.1 After optimization of the initial approximation of coefficients using the gradient method of Levenberg- 0.08 Marquardt, only the first coefficient was somewhat specified cars 0.06 to the value p1 = 7.0942e − 4, which allowed to somewhat measurements decrease the average identification error. smoothing 0.04 The identification results for the equation (1)-(2) are presented on the figure 5, average identification error is 0.02 8.6%. Details of the distribution of errors in points of observation can be found using Figure 6. 0 0 5 10 15 20 25 Pollution model identification, average error = 8.3537% Hours 0.12 Fig 2. Observation of pollution during the day 0.1 Smoothing with the least correlated residues 0.08 900 800 0.06 X 700 600 0.04 500 Cars 0.02 400 measurements smoothing 300 0 0 5 10 15 20 25 200 Hours 100 Fig 5. Approximation of observed pollution using identified model (1) -(2) 0 0 5 10 15 20 25 The question arises whether we can significantly improve Hours the accuracy of identification by using a more complex model Fig 3. Observation of traffic during the day (4) - (1)? ACIT 2018, June 1-3, 2018, Ceske Budejovice, Czech Republic 41 Identification errors an ordinary differential equation, which includes observation 30 of typical daily traffic and daily forecast of wind speed. The methods of parametric identification of the constructed 25 models were proposed. The methods are based on the use of difference approximation of the differential equation in 20 specially selected points for construction of initial approximations of the model coefficients with their further refinement by the Levenberg-Marquardt method. Also, based % 15 on the use of selection of the p 4 parameter value included in the equation (4) nonlinearly in the sequence of special grids. 10 As a result of the experimental study, the proposed models established their practical identity with the accuracy of the 5 approximation of experimental data. Therefore, the simplest of them, namely the model (1) - (2), should be preferred. 0 0 5 10 15 20 25 The chosen model can serve as the basis for constructing a Hours dynamic map of pollution of the city. Fig 6. Distribution of model (1)-(2) identification errors REFERENCES We will investigate this question experimentally. The [1] К.М.Аntropov, J.I.Каzmer, А.N. Varaksin. “Assesing identification of the model (4) - (1), with the results of which spatial variability of air pollution in industial city with is shown in Figure 7, was carried out by checking the values land use regression (review)”. Ecological systems and of the parameter p 4 on the specially selected grids and the devices. Moscow, vol.1, pp. 28-41, 2010. identification procedure given by the relations (6). As a result [2] T. Bush, S. Smith, K.Stevenson, S. Moorcroft, of solving the system of linear levels (6), refining the “Validation of nitrogen dioxide diffusion tube parameters by the Levenberg-Marquardt method and methodology in the UK”, Atmospheric Environment, selecting the parameter p 4 as the basis of the performed vol. 35, 2, 2001. calculations, the criterion for minimizing average ratios is the [3] I. Voytyuk, M. Dyvak, V. Spilchuk. “Research of quality characteristics of models structure in kind of interval following values of the parameters of the differential equation (1): difference operator”. Proceedings of International Conference CADSM’2011, Polyana-Svalyava, pp. 87, = p1 6.9316= e − 4 , p2 = 2.9586, = p3 0.3683, p4 0.6810 2011. 0.12 Pollution model identification, average error = 8.3537% [4] N. Porplytsya, M. Dyvak,, I. Spivak,, I. Voytyuk, “Mathematical and algorithmic foundations for implementation of the method for structure identification 0.1 of interval difference operator based on functioning of bee colony”, 13th International Conference: The 0.08 Experience of Designing and Application of CAD Systems in Microelectronics, CADSM 2015, pp. 196- 0.06 199, 2015. X [5] N. Ocheretnyuk, I. Voytyuk, M. Dyvak, Ye. Martsenyuk, 0.04 “Features of structure identification the macromodels for nonstationary fields of air pollutions from vehicles”, Modern Problems of Radio Engineering, 0.02 Telecommunications and Computer Science - Proceedings of the 11th International Conference, 0 0 5 10 15 20 25 TCSET'2012, pp. 444. Hours [6] T. Sahsuvaroglu, A. Arain, B. Beckerman, P. Kanaroglou, Fig 7. Approximation of observed pollution using identified model J.R. Brook, N. Finkelstein, M.M. Finkelstein, (4) -(2) N.L.Gilbert, B. Newbold, M.Jerrett. “A LUR model for predicting ambient concentrations of nitrogen dioxide in The average error of identification was 8.35%, which Hamilton, Canada”, J. Air Waste Manage. Assoc., vol. improves insignificantly significantly the result of the 56, 8, 2006. approximation of experimental data using the model (1) - (2). [7] R. Pasichnyk, M. Dyvak, N. Pasichnyk. “Identification The analysis of the distribution of errors of approximation by and modeling of limiting factors systems”. Data Stream model (4) - (2) also did not reveal any significant differences Mining & Processing (DSMP), IEEE First International with the distributions of errors in the model (1) - (2). Conference, pp. 336-34, 2016. III. CONCLUSION [8] R. Pasichnyk. “Modeling of resources accumulation and operational management in biotechnology, biomedical As a result of the conducted research, a model of pollution and web information systems”. Computational Problems on the local section of the city road was proposed in a form of of Electrical Engineering, vol. 4, 2, pp. 37-46, 2014. ACIT 2018, June 1-3, 2018, Ceske Budejovice, Czech Republic