<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>ECO-TrackDrive: a tracking system for energy-eficient driving ⋆</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Sameh Ben-Aoun</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Meriem Belguidoum</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Ahmed Hadj-Kacem</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>University of Constantine 2-Abdelhamid Mehri, LIRE Laboratory</institution>
          ,
          <addr-line>BP : 67A, Constantine</addr-line>
          ,
          <country country="DZ">Algeria</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>University of Sfax, ReDCAD Laboratory</institution>
          ,
          <addr-line>BP 1088, 3018 Sfax</addr-line>
          ,
          <country country="TN">Tunisia</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Driving habits have a crucial role in road safety. They contribute significantly t o t he e missions of greenhouse gases and other air pollutants. Several studies have been conducted to provide possible solutions, including systems and mobile apps. Researchers have developed several systems for ecodriving and proposed new strategies to improve driving behaviour. However, there is still a lack of such systems to be scrutinized and exploited on the ground, particularly in the Maghreb, to improve real-time eco-driving. This paper presents ECO-TrackDrive; a driver-oriented mobile application. The Proposed approach is based on an IoT design methodology extended with the microservice-based architecture. the requirement specification is based on the modelling language SysML which is very suitable for IoT applications. The paper aims at improving the driver's behaviour, reduce CO2 emissions and save energy. This study intends to achieve the goal without distracting drivers from safe driving.</p>
      </abstract>
      <kwd-group>
        <kwd>IoT</kwd>
        <kwd>Microservices</kwd>
        <kwd>SysML</kwd>
        <kwd>EcoDrive</kwd>
        <kwd>Mobile application</kwd>
        <kwd>Energy eficient driving</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        Road transportation is a significant pollutant since it consumes much fuel, and as result, it
contributes massively to global CO2 and other pollutant emissions. This issue has started
worldwide concern about global warming and the depletion of fossil fuels. For instance, according to
the Statista Research Department, transport produced roughly 7.3 billion metric tons of CO2
emissions, with passenger automobiles being the main contributor, accounting for 41% of all
transportation-related emissions [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. That percentage urged many countries to take action on
energy preservation and initiatives to reduce carbon dioxide emissions [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], such as adopting an
environmentally responsible driving style, as well as managing the rise in fuel consumption
and carbon dioxide emissions.
      </p>
      <p>
        The methods used to reduce fuel consumption and CO2 emissions vary, with promising
results using data collected via smartphone or car sensors. The authors of [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] have developed a
system for studying driver behavior by installing the necessary sensors in the vehicle and using
the Predictive Control Data Analysis Algorithm (MPC). Also, in 2019, under the BeSmart [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]
project, authors collected information from smartphone sensors to analyze data. The authors of
[
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] used Carla smartphone sensors to improve driver behavior by classifying driving behavior
into categories under diferent external conditions, results compare the diferent methods
applied and demonstrate a practical ability to detect driving behavior.
      </p>
      <p>
        There has been great need for a system that contributes to improve real time driving in practice at
the lowest possible cost. This can be achieved because of the advantages ofered by smartphone
sensors to TrackDrive. This application is designed based on a combination of microservices [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]
and recommendations aspect. As part of this work we have made SysML system [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] to
model hardware elements, and microservices for the architectural side in order to reuse and
maintenance services. In order to reduce energy consumption and CO2 emissions and improve,
consequently, driver behavior. Unlike other initiatives that rely solely on simulation or do not
rely on real time, TrackDrive relies on real time data study and processing and then provides
the driver with the necessary recommendations to implement them. Eco-driving appears to be
an efective way to save energy, reduce emissions in the transportation industry and reduce
risky behaviour.
      </p>
      <p>This study is organized as follows: Section 2 presents the related work, and the proposed
platform is discussed in Section 3. The conception and the proposed platform are discussed
in Section 4. Section 5 details the implementation. Finally, the article has been concluded in
Section 7.</p>
    </sec>
    <sec id="sec-2">
      <title>2. Related work</title>
      <p>
        Several eforts have been made to improve fuel economy and reduce emissions from road
vehicles, including more stringent vehicle emissions standards [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. Most of these eforts focused
on determining drivers’ behavior to rationalize environmental driving.
      </p>
      <p>
        For example, authors at the University of Southampton, UK [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] proposed a system that
uses real-time data from GPS and automotive radar to perform predictive optimization of a
vehicle’s speed profile and guide the driver toward fuel-saving and CO2-reducing behavior. The
fuel-eficient speed profile is determined with nonlinear Model Predictive Control algorithm
(MPC) optimization, leveraging GPS and long-range automotive radar measurements to learn
road geometry and upcoming trafic. The action layer’s visual human-machine interface (HMI)
is modeled on «eco-speedometers». For the development of this system, the authors applied
two tests: on the simulator and on the road. The repeated measures study conducted in the
ifxed-base driving simulator indicated an overall reduction of 6.09% in fuel consumption. Despite
the success of this study, its exploitation and use are limited to certain types of vehicles as these
sensors and techniques used are expensive.
      </p>
      <p>
        As part of the BeSmart project, Kontaxi et al. [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] have developed an innovative smartphone
application to assess and improve driver behavior and safety by studying the efect of detailed
lfight characteristics on the frequency of extreme acceleration and braking. It is divided into
two phases; The first consists of identifying the drivers’ natural driving characteristics, whereby
participants receive no feedback from the app about their driving behavior. In the second,
participants receive personal feedback, allowing them to identify critical deficiencies and dangerous
behaviors. The application is based on recording the driver’s behavior using smartphone sensors
to read and store sensor data. According to the results, the frequency of intense acceleration
and braking is closely related to the maximum speed, the percentage of time spent at speed, and
the total duration of the flight. One of the most critical limitations of this study is not to interact
with the driver in real-time but after specific experiments, reducing their efectiveness ratios.
      </p>
      <p>
        Another exciting initiative [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] and in the context of providing low-cost solutions to many fleet
management and monitoring problems, Hakim et al. proposed a study consisting of collecting
data sensors via the Carla simulator available in smartphones (accelerometer, gyroscope, GPS)
to classify driver behavior. Then, after integrating pivotal data from multiple sensors, it applies
diferent machine learning algorithms to classify the time series to evaluate which algorithm
leads to the highest performance. The results demonstrated the ability of both machine and
deep learning models to achieve greater than 88% accuracy in detecting the driving profile of a
one-minute trip. Despite the promising results obtained, these results remain limited. Although
simulation essentially mimics real-life attitudes, the efectiveness of this study remains limited
only by simulation because the focus on real-life data collection remains more important, as
results ratios can change between reality and simulation.
      </p>
      <p>The above discussions highlight the extent to which researchers are interested in contributing
to the improvement of driver behavior. However, most of these systems do not deal with
realtime data processing. For example, all these systems are just mobile app software. It has never
been mentioned that it deals with modeling using the SysML system or the architectural side’s
microservice aspect in favour of reusing services. Also, the studies discussed do not use wheel or
road type as settings. Table 1 summarizes the above methods based on these parameters. In this
work, we focused on optimizing the vulnerabilities of previous models with all relevant details
and implementation. Therefore, we focus on developing an application that works in real-time
by taking advantage of smartphone sensors. First, the user may indulge in driving without
being distracted. At the same time, he will learn the details of his trip through recommendations.
Secondly, this application will help him reduce his carbon consumption, in addition to avoiding
road accidents. We also make this app use microservices for the architectural aspect to reuse
the services and maintainability, or add microservices without changing the application. To
have many microservices, we may have to add or modify them instead of creating a direct
application. Anytime it enables us to add components to things or add some kind of sensor.</p>
    </sec>
    <sec id="sec-3">
      <title>3. Proposed approach</title>
      <p>This research presents an eco-driving mobile application that works in real time, tracks the
trajectories of cars to collect data using mobile sensors, and then uses them to reduce carbon
consumption and carbon dioxide emissions as well as being alert to avoid road accidents. Under
this work we have made SysML system to model hardware elements (many schemes allow to
describe the conceptual aspect), and microservices for the architectural aspect in order to reuse
the services and their maintenance. Microservices make it easier to add or modify services
rather than reintroducing a live application. Basically, this application focuses on the Maghreb
countries, where it will be tested and applied according to the microservice architecture designed
lfexibly through the IoT methodology.</p>
      <p>This app collects information through the global positioning system (GPS) to detect the
car’s location, road, and movement, as well as the accelerometer and gyroscope to acquire the
necessary information about acceleration and sudden braking. Regarding the other information
(type of vehicle, type of wheels, etc.) the driver has to fill it in manually. Based on the
available information, the system will process and analyze this data and will then send real time
recommendations to the driver about speed, acceleration, and unnecessary braking, allowing
users to adopt an ecological and economical driving style. This approach will help decrease
the possibility of accidents because driving style is a critical factor in road safety. The driver’s
journey ends with a sum of points for calculating user profiles and knowing how safe their
behaviour is. All data will be recorded on the cloud.</p>
    </sec>
    <sec id="sec-4">
      <title>4. Design methodology</title>
      <p>
        One of the main challenges in the IoT domain is the lack of methods specifically designed for
IoT applications as it depends on a large number of intermediate factors that must be considered
in advance at the design stage. In this regard, Arshdeep Bahga and Vijay Madisetti in [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]
proposed an IoT system development methodology based on the IoT-ARM reference model [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ].
In this work we used this methodology where we combined some language schemes to model
the system (requirements, usage status, identification block, activity charts) in a few steps
of the methodology so that we can represent the diferent aspects of the system. SysML is
the most popular tool for model-based development, it allows the model of physical aspects.
To take advantage of the microservice facilities, we have improved this methodology.
Therefore, instead of identifying services, we will use the microservice structure (Step E). See Figure 1.
      </p>
      <p>In this paper, we will focus on the first phase, the requirements phase using SysML
diagrams which are the use case diagram and the requirements diagram, the definition phase of
the microservices architecture, and the final phase of application development.</p>
      <sec id="sec-4-1">
        <title>4.1. Purpose and requirements analysis</title>
        <p>Applying the first step to our system, the purpose is to monitor drivers through the capture
of data by smartphone sensors, process them, then send recommendations to inform, notify
and motivate drivers in real-time to improve their driving styles, and finally store the data
in the cloud. So the system consists of four microservices that interact with each other : the
microservice for capturing data via smartphone sensors, the microservice for processing data to
translate it into actionable information, and the microservice for sending recommendations in
real time, and the data storage microservice.</p>
      </sec>
      <sec id="sec-4-2">
        <title>4.2. Requirements specification</title>
        <p>In this section, we can summarize the first step with the use case diagram and extract the
functional requirements. System requirements diagrams describe the main system requirements
as well as the sub-requirements needed to achieve them.</p>
        <p>Figure 2 shows the use case diagram for the « ECO-TrackDrive » system.</p>
        <p>Figure 3 illustrates the requirement diagram for the « ECO-TrackDrive », each
requirement has a name, identifier and description. The diagram (see Figure 3) shows that the «
ECO-TrackDrive » system consists of the requirements: ManageVehicle, AddNewRoad,
CalculationSpeed, ViewRecommendations, SaveRoadAndStart, and ViewHistory: ManageVehicle
consists of the requirement LocateVehicle (that is, display the position of the vehicle), of
ModifyInformation which allows changing the car information if necessary.</p>
      </sec>
      <sec id="sec-4-3">
        <title>4.3. Definition of the microservices architecture</title>
        <p>At this stage, we decompose the system into microservices that interact with each other to
meet the system requirements. From a technical point of view, a microservice is realized as an
independent process that can be designed, developed, deployed, and operated autonomously.
We distinguish between two types of microservice, functional, which realizes the actual
business capabilities, or infrastructure, e.g. configuration, etc. Figure 4 shows the microservices
architecture of the system. A specific functional microservice realizes each domain.</p>
        <p>The functional microservices are represented with blue cubes (see Figure 4). Multiple
instances of a single microservice can be started simultaneously to be autonomous for scalability
and fault tolerance, and each microservice has its database to enable autonomy.</p>
        <p>Figure 4 the system is also composed of microservices that provide the architecture with
infrastructure capabilities: the first one is « ConfigurationMicroservice » represented with a
yellow cube, allowing to centralize the configuration (a file that contains all the necessary
configurations for all the microservices). At startup time, each microservice connects to the «
Gateway Microservices » represented by a pink cube (see figure 4) to register (with its primary
information) and then periodically gives its sign of life (heartbeat every 30 seconds). The «
Gateway Microservices » allows the location of each microservice. Then, the front end does not
directly attack the functional microservices. It goes through the « Gateway Microservices »,
which receives the requests. It sends the request back to the requested microservice to do the
necessary processing.</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>5. Implementation</title>
      <p>We implemented a prototype using Flutter, and then we collected and processed data about
the driver through mobile sensors.</p>
      <p>In terms of front-end development, we used Flutter, a framework for building platform
interface; Dart as a text language and interface design. To process and analyze the data,
we will use python. The prototype has not yet been fully developed and is currently in the
implementation phase. The following forms illustrate how essential steps in the application
work.</p>
      <p>In the first phase, when creating a new account, the user must enter data about his car and
register it. Suppose he has an account, in this case, the car data is displayed directly in his
profile. The user can locate his car. The user can view their trip report at the end of each trip.
The report includes recommendations and tips for the driver, along with the trip duration, the
recommended speed, the maximum speed he reached, and the number of kilometers traveled.</p>
      <p>In this search, we will focus on key user interfaces. Figure 5 shows the home page interface,
where we find a dashboard where the user can consult trip history (rides, period, distance) and
see some information about his car. He can also update some information about his account.
Figure 6 illustrates the localisation interface enables the user to know his location and the type
of road he takes. Figure 7 shows the recommendations, we find recommendations for the user
to check his behavior.</p>
    </sec>
    <sec id="sec-6">
      <title>6. Acknowledgement</title>
      <p>This work was partially supported by the LABEX-TA project MeFoGL: « Méthodes Formelles
pour le Génie Logicie ».</p>
    </sec>
    <sec id="sec-7">
      <title>7. Conclusion</title>
      <p>ECO-TrackDrive is able to detect acceleration, braking, and overspeed instances by integrating
smartphone sensors and GPS data. As well as exploiting the type of car wheels and the type of
road used. Considering that we are in a master’s, we made SysML to model the hardware stuf,
the microservices for the architecture aspect for the interest of reuse and maintainability of
services. As a future attempt, we are going to add an AI approach. Insurance companies also
can make profit of such applications to ensure driver continuity in environmental driving and
to overcome some misconceptions when driving. We aim, also, to benefiting from microservices
at the level of service reuse and the possibility of maintaining them (adding or modifying).</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1] statista,
          <source>Global transport co2 emissions breakdown</source>
          <year>2020</year>
          ,
          <year>2020</year>
          . URL: https://www.statista. com/statistics/1185535/transport-carbon
          <article-title>-dioxide-emissions-breakdown.</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>N.</given-names>
            <surname>Xu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Li</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Q.</given-names>
            <surname>Liu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Zhao</surname>
          </string-name>
          ,
          <article-title>An overview of eco-driving theory, capability evaluation, and training applications</article-title>
          ,
          <source>Sensors</source>
          <volume>21</volume>
          (
          <year>2021</year>
          )
          <fpage>6547</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>J.</given-names>
            <surname>Fleming</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Yan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Allison</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Stanton</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Lot</surname>
          </string-name>
          ,
          <article-title>Real-time predictive eco-driving assistance considering road geometry and long-range radar measurements</article-title>
          ,
          <source>IET Intelligent Transport Systems</source>
          <volume>15</volume>
          (
          <year>2021</year>
          )
          <fpage>573</fpage>
          -
          <lpage>583</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>A.</given-names>
            <surname>Kontaxi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Ziakopoulos</surname>
          </string-name>
          , G. Yannis,
          <article-title>Trip characteristics impact on the frequency of harsh events recorded via smartphone sensors</article-title>
          ,
          <source>IATSS research 45</source>
          (
          <year>2021</year>
          )
          <fpage>574</fpage>
          -
          <lpage>583</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>S. B.</given-names>
            <surname>Brahim</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Ghazzai</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Besbes</surname>
          </string-name>
          ,
          <string-name>
            <surname>Y. Massoud,</surname>
          </string-name>
          <article-title>A machine learning smartphone-based sensing for driver behavior classification</article-title>
          ,
          <source>arXiv preprint arXiv:2202</source>
          .
          <year>01893</year>
          (
          <year>2022</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>J.</given-names>
            <surname>Sorgalla</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Rademacher</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Sachweh</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Zündorf</surname>
          </string-name>
          ,
          <article-title>On collaborative model-driven development of microservices</article-title>
          ,
          <source>in: Federation of International Conferences on Software Technologies: Applications and Foundations</source>
          , Springer,
          <year>2018</year>
          , pp.
          <fpage>596</fpage>
          -
          <lpage>603</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>P.</given-names>
            <surname>Roques</surname>
          </string-name>
          , Modélisation de systèmes complexes avec SysML, Editions Eyrolles,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>S.</given-names>
            <surname>Friedenthal</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Moore</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Steiner</surname>
          </string-name>
          ,
          <article-title>Omg systems modeling language (omg sysml) tutorial</article-title>
          , in: INCOSE Intl. Symp, volume
          <volume>9</volume>
          ,
          <year>2006</year>
          , pp.
          <fpage>65</fpage>
          -
          <lpage>67</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>A.</given-names>
            <surname>Bahga</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Madisetti</surname>
          </string-name>
          ,
          <article-title>Internet of Things: A hands-on approach</article-title>
          , chapter
          <volume>5</volume>
          , pages
          <fpage>99</fpage>
          -
          <lpage>115</lpage>
          . Arshdeep Bahga and Vijay Krishna Madisetti,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>M.</given-names>
            <surname>Bauer</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Bui</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. D.</given-names>
            <surname>Loof</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Magerkurth</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Nettsträter</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Stefa</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. W.</given-names>
            <surname>Walewski</surname>
          </string-name>
          ,
          <article-title>Iot reference model</article-title>
          , in: Enabling Things to Talk, Springer, Berlin, Heidelberg,
          <year>2013</year>
          , pp.
          <fpage>113</fpage>
          -
          <lpage>162</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>