See discussions, stats, and author profiles for this publication at: https://www.researchgate.
net/publication/340091940
Software System for Road Condition Forecast Correction
Preprint · March 2020
CITATIONS READS
0 99
2 authors, including:
Evgeny Burnaev
Skolkovo Institute of Science and Technology
396 PUBLICATIONS 4,626 CITATIONS
SEE PROFILE
Some of the authors of this publication are also working on these related projects:
ABC: A Big CAD Model Dataset For Geometric Deep Learning View project
eSports Project View project
All content following this page was uploaded by Evgeny Burnaev on 22 March 2020.
The user has requested enhancement of the downloaded file.
Software System for Road Condition Forecast Correction
Dmitrii Smolyakova and Evgeny Burnaeva
a
Skoltech, Bolshoy Boulevard 30, bld. 1, Moscow, Russia
ARTICLE HISTORY
Compiled March 22, 2020
ABSTRACT
In this paper, we present a monitoring system that allows increasing road safety by
predicting ice formation. The system consists of a network of road weather stations
and intelligence data processing program module. The results were achieved by
combining physical models for forecasting road conditions based on measurements
from stations and machine learning models for detecting incorrect data and forecast
correction.
KEYWORDS
Anomaly detection, road weather information systems, machine learning, gradient
boosting
1. Introduction
Road safety is a complex issue that includes many aspects. Some of them depend on
human behavior; others depend on infrastructure conditions. For example, in many
regions of the Russian Federation, spring and autumn temperatures can fluctuate near
0◦ C, which in combination with rains and high humidity could lead to ice formation
on the roads. Detection of these conditions is essential for road safety.
Online monitoring allows preventing road accidents by early maintenance; for ex-
ample, we can use video monitoring of roads’ conditions. Machine learning techniques
enable detecting ice formation automatically. For instance, in Zhao, Wu, and Chen
(2017), the authors used data collected from stationary cameras to distinguish be-
tween five different conditions of the road pavement. In Roychowdhury, Zhao, Wallin,
Ohlsson, and Jonasson (2018), authors proposed to collect video from vehicle front
cameras instead of static cameras, and to use a more accurate classification technique
based on convolutional neural networks.
Despite all their advantages, video monitoring with ordinary cameras struggles with
black ice detection. In order to fix this problem we can use multispectral cameras Gre-
goris, Yu, and Teti (2004), NIR cameras Jonsson, Casselgren, and Thörnberg (2014),
or measure depth with Kinect sensor Abdalla, Iqbal, and Shehata (2017). These tech-
niques are more expensive than ordinary cameras; however, they can provide better
results.
A video monitoring system is costly. It can be reasonable to use sensors that col-
lect other characteristics of road conditions like temperature, humidity, pressure, and
others. Stations collecting this sort of data are called road weather information sys-
tems (RWIS). They can be located on the sides of roads or even inside the pave-
ment Tabatabai and Aljuboori (2017).
By processing historical information on road conditions, we can predict ice forma-
tion. We can group forecasting algorithms into two major categories. The first category
uses physical models Barber (1957); Dai, Zeng, Dickinson, Baker, Bonan, Bosilovich,
Denning, Dirmeyer, Houser, Niu, et al. (2003); Feng and Feng (2012); Sass (1997) or
their combinations like in Chunlei and Changyou (2009). The authors combine results
of the physical models Common Land Model (CoLM) and BJ-RUC FAN, CHEN,
ZHONG, and ZHENG (2009), which allowed increasing the accuracy. Later in this
paper, we take a closer look at the physical model METRo. It performs exception-
ally well in countries like Czech Republic Sokol, Zacharov, Sedlák, Hošek, Bližňák,
Chládová, Pešice, and Škuthan (2014), Canada Crevier and Delage (2001), USA Rutz
and Gibson (2013), China FAN et al. (2009).
Despite impressive track records, physical models have several problems. The main
disadvantage is their computational complexity since they require the numerical solu-
tion of partial derivative equations. Another challenge is the deterministic nature of
their forecasts. These algorithms provide forecast values but struggle with delivering
a level of confidence. It is possible to solve this issue with the Mont-Carlo simulation
Berrocal, Raftery, Gneiting, and Steed (2010); Chapman (2012), but it significantly in-
creases computational complexity. Another challenge for this kind of models is anthro-
pogenic factors, which are extremely difficult to estimate. There are some approaches
with an additional prior assumption about anthropogenic factor behaviour Khalifa,
Marchetti, Bouilloud, Martin, Bues, and Chancibault (2016), but still, they cannot
deal with stochastic effects and increase already significant computational complexity.
Another big group of techniques uses machine learning and statistical approaches
to road conditions forecast. Even a simple linear regression allows to get reasonable
forecasting accuracy; however, usually, people use these methods as part of more com-
plex solutions Diefenderfer, Al-Qadi, Reubush, and Freeman (2003); Liao, Chen, Chen,
and Huang (2009); YANG, PENG, and LIU (2010). Using more sophisticated machine
learning algorithms like deep neural networks allows getting even better forecast accu-
racy Gensler, Henze, Sick, and Raabe (2016); Zaytar and El Amrani (2016). However,
this family of methods is not a silver bullet and has its problems. For example, a lack
of physical assumptions in modeling leads to a lack of interpretability and a constant
need for additional refitting to work in a new environment.
It seems that both physical and machine-learning-based techniques have their prob-
lems; this is why we decide to build a hybrid system that would combine advantages of
both types of models. Another challenge is the quality of the data in such big systems
of sensors; it is pretty standard that some devices become malfunctioning, and it is
crucial to detect these broken sensors as soon as possible.
In this paper, we describe algorithmic techniques and software system, which al-
lows achieving the stated goal. To build an intelligence system for analyzing RWIS
data, we create a software system that takes the data from the sensors, validate if
this data correct. For the validated data, a forecasting model provides forecast of road
conditions, and these predictions are used to decide on further maintenance actions.
We concentrate on the correction of weather forecasting using machine learning and
anomaly (outlier) detection. Also, we briefly describe the implementation of the soft-
ware system.
In section 2, we discuss an approach for weather forecasting. We propose an algo-
rithm that combines classical energy balance based model and correction of residuals
2
with Gradient Boosting on Decision Trees. In the section 3 we present an approach for
detecting broken RWIS sensors. In section 4, we demonstrate achieved performance
on real-world data collected from RWIS. And finally, in section 5, we discuss some
technical details about software system implementation.
2. Road Weather Condition Forecasting
In this section, we present a new approach for road weather condition forecasting
based on a combination of an energy balance model and machine learning. Both of
them have their pros and cons. So a combination of these techniques allows increasing
the accuracy of forecasting.
2.1. METRo
We choose METRo (Model of the Environment and Temperature of Road) as a primary
weather forecasting model Crevier and Delage (2001). This approach already demon-
strated great performance in various cases around the globe. Initially, this model was
tested on Canadian roads; climate similarity between Canada and Russia makes this
model a good candidate for the final approach.
The core idea behind the model is to decompose temperature weave in several parts
R = (1 − α)S + εI − εσTs4 − H − La E ± Lf P + A,
here (1 − α)S is an absorbed incoming radiation flux, εI is the absorbed incoming
infrared radiation flux, σT 4 is an emitted flux, H is a turbulence flux, La E is the
latent heat flux, Lf P is a water phase changing flux, finally A is an anthropogenetic
flux.
We skip the detailed explanation of calculating these parts and coefficients selection,
see the original paper for details Crevier and Delage (2001). For us, the anthropogenic
part is the most interesting. A partial derivative equation cannot model this component
because it is highly non-deterministic and so it introduces additional forecasting error.
However, we can fix the error produced by this factor by using a machine learning
algorithm.
2.2. Forecast improvement with gradient boosting
To correct the METRo forecast, we predict the difference between its result and the
real values of road parameters. Here we illustrate this approach using four parameters
predicted by the METRo model: air, road, and under road temperatures and humidity.
Let yt be one of the target variables at time t, ytM ET Ro be the value predicted by the
METRo model. We build an approximation of the difference between the real value
and predictions ∆yt = yt − ytM ET Ro .
We construct an approximation function ∆yt ≈ F (xt ), where xt is a feature vector
that represents road condition at time t. These features can be grouped into three
classes:
(1) Historical features collected from Road Weather Information Systems. They in-
clude information about air, road, and underground temperatures, etc.
3
(2) Information about year season and time of the day. Since these features have a
cyclic nature, we encode them by using trigonometric functions. Number of days
since the beginning of the year d produces two values sin(d/365) and cos(d/365)
or sin(d/366) and cos(d/366) in case of a leap year. Hour of the day h is trans-
formed into pair sin(h/24) and cos(h/24).
(3) Previous predictions from METRo equations.
We build an approximation function F (x) by minimizing a specified loss function
L(·, ·), which characterizes forecast accuracy:
T
X
F̂ = arg min L(F (xt ), ∆yt ).
F
t=1
To find this optimal F̂ , we use the Gradient Boosting algorithm Friedman (2002).
Its main idea is to build a sequence of regression models, a combination of which
provides a good approximation. At step N , the approximation has the form:
N
X
F̂N (x) = αi hi (x),
i=1
where hi is a regression model with weight αi . On step N +1 we solve the optimization
subproblem to get the model hN +1 :
T
X
QN +1 = L(F̂N (xt ) + αN +1 hN +1 (xt ), ∆yt ) → min .
αN +1 ,hN +1
t=1
To get hN +1 we solve the subproblem:
T T
X ∂L(z, ∆yt )
hN +1 = arg min ((−∇QtN +1 )−h(xt ))2 , [∇QtN +1 ]Tt=1 = .
h ∂z z=F̂N (xt ) t=1
t=1
To find optimal αN +1 value, we solve the following optimization problem by the
linear search:
T
X
αN +1 = arg min L(F̂N (xt ) + αhN +1 (xt ), ∆yt ).
α
t=1
As a loss function we use the Mean Absolute Error:
T
1X
M AE = |∆yt − F̂ (xt )|.
T
t=1
For constructed F̂ (x) the final prediction is:
ŷt = ytMETRo + F̂ (xt ).
4
We construct 12 different regression models to predict air, road, underground tem-
peratures, and humidity for the forecast horizons of 1, 2, and 3 hours.
3. Broken Sensors Detection
Accuracy of road condition forecasting depends on the quality of the data. It is crucial
to detect malfunction sensors as soon as possible. Wrong data could lead either to
conducting maintenance actions for no reason or, even worse, to miss the dangerous
road conditions.
Malfunctioning sensors generate abnormal data, and so we can detect broken sensors
by detecting anomalies in data. By anomaly, we consider the observation that deviates
from others so much that we could suspend that it came from another source Hawkins
(1980). To find these values, we build an anomaly detector, i.e., the function such that:
(
1 if yt is normal,
f (yt ) =
−1 if yt is anomaly.
To construct the anomaly detector we
(1) predict a future value ŷt of the target variable,
(2) compare it with the actual value yt of the target variable.
If the difference ∆t = |yt − ŷt | is big, this could mean that something drastically has
changed, and this could be a symptom of a broken sensor. The anomaly detection
function takes the form
(
1 if ∆t ≤ ∆,
f (yt ) = (1)
−1 if ∆t > ∆.
Accurate selection of threshold ∆ is very important: we have to reliably distinguish
between cases of just random fluctuations and anomalies due to malfunctioning sen-
sors.
Usually, the value of ∆ is selected based on a holdout set or using the cross-validation
procedure Friedman, Hastie, and Tibshirani (2001). However, for that we need labeled
data. Since broken sensors are not frequent events, even such a significant amount of
data like we have does not contain enough examples of anomalies. Moreover, labeling
is a tedious task. Therefore, we propose to use artificially generated anomalies to select
the threshold. We group all anomalies into three different categories:
(1) Single anomalies, which can result in some deviation. They are modeled with
uniform distribution, see Fig. 1.
(2) Short-term anomalies modeled as a Poisson noise with random parameters see
Fig. 2.
(3) Long-term anomalies, which can be results of some significant dis-functioning in
sensors or networks. They were modeled with a Gaussian noise, see Fig. 3.
To find threshold ∆, we select a subset of data, add these artificial anomalies, and
find the value of ∆, which provides the optimal F1 score:
precision · recall
F1 = , (2)
precision + recall
5
Figure 1. Single Anomaly
Figure 2. Short Term Anomaly
where recall is the fraction of correctly identified anomalies, while precision is the
fraction of anomalies we are able to find.
4. Results
4.1. Forecasting Correction
This section discusses the experimental results of road condition forecasting based on
a combination of the METRo model and gradient boosting residual correction.
We collected data for seven years from 2012 till 2019 from 120 RWIS, located in
different regions of Russia. This data was split into two parts. We fit the model based
on data for the period 2012 – 2017 years. We also split data based on different RWIS
locations. So, in the end, we have the test data from a later period of time, and from
RWIS that were not used while building a model. We measured the Mean Average
Error between the predicted value and the real one.
We compare our results with and without additional residual corrections. Example
of prediction are presented in Fig. 4. Table 1 demonstrates that additional machine
learning post-processing allows for increasing the accuracy of the final forecast.
4.2. Anomaly Detection
This section discusses experimental results of predicting broken sensors of RWIS. Let
us consider experimental settings, metrics and final accuracy indicators.
6
Figure 3. Long Term Anomaly
Table 1. Forecasting Improvements
Value Model 1 hour 2 hours 3 hours
METRo with anomalies 0.69 1.01 1.25
Air Temperature ◦ C METRo only 0.63 0.97 1.18
METRo + Correction 0.53 0.78 0.93
METRo with anomalies 0.93 1.69 2.8
Road Temperature ◦ C METRo only 0.84 1.66 2.41
METRo + Correction 0.48 0.89 1.28
METRo with anomalies 1.45 1.7 1.94
Underground Temperature ◦ C METRo only 1.39 1.62 1.81
METRo + Correction 1.16 1.48 1.79
We select 59 RWIS stations from various regions of the Russian Federation. We use
data from 50 stations for training models and data from 9 stations for testing the
quality of the resulting model. The training set was split into two parts. Data from
35 RWIS was used to build a model; data from another 15 RWIS was used to tune
threshold value based on artificially generated anomalies.
We labeled data (normal/anomaly) from the 9 test stations manually. Final results
were evaluated by using F1 score.
We compare our approach with other anomaly detection techniques like Elliptic En-
velope Butler, Davies, and Jhun (1993), Isolation Forrest Liu, Ting, and Zhou (2008),
OneClassSVM with Gaussian kernel Schölkopf, Smola, Williamson, and Bartlett
(2000). We also test different regression algorithms to construct approximation F̂ (x)
beside gradient boosting over regression trees, specifically ridge regression Marquardt
and Snee (1975) and multi-layer perceptron Murtagh (1991). Results of the compari-
son are presented in Table 2. We can see that the proposed approach based on gradient
boosting outperforms all other algorithms in terms of the F1 score, see formula 2. Ta-
ble 1 demonstrates that if before making predictions with METRo model we remove
anomalous data, we can significantly improve forecasting accuracy. Note that when
detecting anomalies we did not use METRo model for estimating ∆t in formula 1.
7
Figure 4. Road Temperature Forecasting Example
Table 2. Anomaly Detection Results
Algorithm LOF Ell.Env OCSVM IForest Ridge MLP Boosting
Recall 0.513 0.719 0.904 0.395 0.668 0.637 0.753
Precision 0.502 0.482 0.130 0.252 0.758 0.738 0.797
F1 -score 0.507 0.577 0.227 0.308 0.710 0.684 0.774
5. Implementation
Initially, company MinMax941 has already installed a system for road condition fore-
casting, which consists of the METRo module and decision-making module connected
to the MongoDB. We developed a system that could be easily added to this existed
infrastructure.
To do this, we developed two web services based on python library Flask and put
them into a docker container. They communicate with the outer world by HTTP
requests.
The dataflow is presented in Fig. 5. So the whole work process can be descrived as
follows: data from RWIS goes into the database, then the data is sent to the Anomaly
Detection Module. The module generates labels (normal/anomaly) for each observa-
tion. If there are many anomalies, we don’t use information from these sensors before
they would be checked and fixed. Information about which observations are anomalous
is saved in the database.
If the data is normal we send it to the METRo module, which builds predictions. The
results are sent to the Residuals Correction module. Results of this module are sent
back to the database, and finally, they are passed into the decision-making module,
which decides if the road needs maintenance or not.
Models for Anomaly Detection and Residuals Corrections are constructed in ad-
vance. We collect historical data in CSV format, as described in section 4. Then we
use the lightgbm library Ke, Meng, Finley, Wang, Chen, Ma, Ye, and Liu (2017) to
build these predictive models. The whole process takes around 30 minutes on a desktop
computer with the Intel Core i7 processor and 32Gb RAM.
1 https://mm94.ru
8
Figure 5. Data Flow
6. Conclusion
We proposed a novel approach to improve road surface condition forecasting. It allows
for combining the advantages of both energy-balanced and machine learning-based
models. Numerical results demonstrate that despite the very impressive accuracy of
the METRo model, it is still possible to improve accuracy by correcting residuals of
predictions. We describe details of the implementation of these algorithms as a part
of the software system for road condition forecasting.
References
Younis E Abdalla, MT Iqbal, and M Shehata. Black ice detection system using kinect. In
2017 IEEE 30th Canadian Conference on Electrical and Computer Engineering (CCECE),
pages 1–4. IEEE, 2017.
Edward S Barber. Calculation of maximum pavement temperatures from weather reports.
Highway Research Board Bulletin, (168), 1957.
Veronica J Berrocal, Adrian E Raftery, Tilmann Gneiting, and Richard C Steed. Probabilis-
tic weather forecasting for winter road maintenance. Journal of the American Statistical
Association, 105(490):522–537, 2010.
RW Butler, PL Davies, and M Jhun. Asymptotics for the minimum covariance determinant
estimator. The Annals of Statistics, pages 1385–1400, 1993.
Lee Chapman. Probabilistic road weather forecasting. In Proceedings of the Standing Inter-
national Road Weather Conference (SIRWEC12), 2012.
Meng Chunlei and Liu Changyou. Summer road temperature disaster forecast of expressway
in beijing [j]. Journal of Institute of Disaster-Prevention Science and Technology, 3, 2009.
Louis-Philippe Crevier and Yves Delage. Metro: A new model for road-condition forecasting
in canada. Journal of applied meteorology, 40(11):2026–2037, 2001.
Yongjiu Dai, Xubin Zeng, Robert E Dickinson, Ian Baker, Gordon B Bonan, Michael G
Bosilovich, A Scott Denning, Paul A Dirmeyer, Paul R Houser, Guoyue Niu, et al. The
common land model. Bulletin of the American Meteorological Society, 84(8):1013–1024,
2003.
Brian K Diefenderfer, Imad L Al-Qadi, Stacey D Reubush, and Thomas E Freeman. Devel-
opment and validation of a model to predict pavement temperature profile. In TRB 2003
Annual Meeting, pages 1–21. Citeseer, 2003.
Shui-yong FAN, Min CHEN, Ji-qin ZHONG, and Zuo-fang ZHENG. Performance tests and
evaluations of beijing local high-resolution rapid update cycle system [j]. Torrential Rain
and Disasters, 2, 2009.
Tao Feng and Shide Feng. A numerical model for predicting road surface temperature in the
highway. Procedia Engineering, 37:137–142, 2012.
9
Jerome Friedman, Trevor Hastie, and Robert Tibshirani. The elements of statistical learning.
Springer series in statistics New York, 2001.
Jerome H Friedman. Stochastic gradient boosting. Computational statistics & data analysis,
38(4):367–378, 2002.
André Gensler, Janosch Henze, Bernhard Sick, and Nils Raabe. Deep learning for solar power
forecastingan approach using autoencoder and lstm neural networks. In 2016 IEEE inter-
national conference on systems, man, and cybernetics (SMC), pages 002858–002865. IEEE,
2016.
Dennis Gregoris, Simon Yu, and Frank Teti. Multispectral imaging of ice. In Canadian
Conference on Electrical and Computer Engineering 2004 (IEEE Cat. No. 04CH37513),
volume 4, pages 2051–2056. IEEE, 2004.
Douglas M Hawkins. Identification of outliers, volume 11. Springer, 1980.
Patrik Jonsson, Johan Casselgren, and Benny Thörnberg. Road surface status classification
using spectral analysis of nir camera images. IEEE Sensors Journal, 15(3):1641–1656, 2014.
Guolin Ke, Qi Meng, Thomas Finley, Taifeng Wang, Wei Chen, Weidong Ma, Qiwei Ye, and
Tie-Yan Liu. Lightgbm: A highly efficient gradient boosting decision tree. In Advances in
neural information processing systems, pages 3146–3154, 2017.
Abderrahmen Khalifa, Mario Marchetti, Ludovic Bouilloud, Eric Martin, Michel Bues, and
Katia Chancibault. Accounting for anthropic energy flux of traffic in winter urban road
surface temperature simulations with the teb model. Geoscientific Model Development, 9
(2):pp–547, 2016.
Chi-Chou Liao, Bo-Ruei Chen, Shun-Hsing Chen, and Wei-Hsing Huang. Temperature pre-
diction model for flexible pavements in taiwan. In Performance Modeling and Evaluation of
Pavement Systems and Materials: Selected Papers from the 2009 GeoHunan International
Conference, pages 82–89, 2009.
Fei Tony Liu, Kai Ming Ting, and Zhi-Hua Zhou. Isolation forest. In 2008 Eighth IEEE
International Conference on Data Mining, pages 413–422. IEEE, 2008.
Donald W Marquardt and Ronald D Snee. Ridge regression in practice. The American
Statistician, 29(1):3–20, 1975.
Fionn Murtagh. Multilayer perceptrons for classification and regression. Neurocomputing, 2
(5-6):183–197, 1991.
Sohini Roychowdhury, Minming Zhao, Andreas Wallin, Niklas Ohlsson, and Mats Jonasson.
Machine learning models for road surface and friction estimation using front-camera images.
In 2018 International Joint Conference on Neural Networks (IJCNN), pages 1–8. IEEE,
2018.
Jonathan J Rutz and Chris V Gibson. Integration of a road surface model into nws operations.
Bulletin of the American Meteorological Society, 94(10):1495–1500, 2013.
Bent H Sass. A numerical forecasting system for the prediction of slippery roads. Journal of
Applied Meteorology, 36(6):801–817, 1997.
Bernhard Schölkopf, Alex J Smola, Robert C Williamson, and Peter L Bartlett. New support
vector algorithms. Neural computation, 12(5):1207–1245, 2000.
Zbyněk Sokol, Petr Zacharov, Pavel Sedlák, Jiřı́ Hošek, Vojtěch Bližňák, Zuzana Chládová,
Petr Pešice, and Miroslav Škuthan. First experience with the application of the metro model
in the czech republic. Atmospheric research, 143:1–16, 2014.
Habib Tabatabai and Mohammed Aljuboori. A novel concrete-based sensor for detection of
ice and water on roads and bridges. Sensors, 17(12):2912, 2017.
Qinghong YANG, Jiuhui PENG, and Yuanyuan LIU. The atmospheric physical quantity and
radar echo characteristic of a strong convective weather [j]. Journal of Arid Meteorology, 3,
2010.
Mohamed Akram Zaytar and Chaker El Amrani. Sequence to sequence weather forecasting
with long short-term memory recurrent neural networks. International Journal of Computer
Applications, 143(11):7–11, 2016.
Jiandong Zhao, Hongqiang Wu, and Liangliang Chen. Road surface state recognition based on
svm optimization and image segmentation processing. Journal of Advanced Transportation,
10
2017, 2017.
11
View publication stats