Driving Pattern Analysis, Gear Shift Classification, and Fuel Efficiency in Light-Duty Vehicles: A Machine Learning Approach Using GPS and OBD II PID Signals

This study proposes an automatic gear shift classification algorithm in M1 category vehicles using data acquired through the onboard diagnostic system (OBD II) and GPS. The proposed approach is based on the analysis of identification parameters (PIDs), such as manifold absolute pressure (MAP), revol...

Full description

Saved in:
Bibliographic Details
Main Authors: Juan José Molina-Campoverde, Juan Zurita-Jara, Paúl Molina-Campoverde
Format: Article
Language:English
Published: MDPI AG 2025-06-01
Series:Sensors
Subjects:
Online Access:https://www.mdpi.com/1424-8220/25/13/4043
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1849427498435084288
author Juan José Molina-Campoverde
Juan Zurita-Jara
Paúl Molina-Campoverde
author_facet Juan José Molina-Campoverde
Juan Zurita-Jara
Paúl Molina-Campoverde
author_sort Juan José Molina-Campoverde
collection DOAJ
description This study proposes an automatic gear shift classification algorithm in M1 category vehicles using data acquired through the onboard diagnostic system (OBD II) and GPS. The proposed approach is based on the analysis of identification parameters (PIDs), such as manifold absolute pressure (MAP), revolutions per minute (RPM), vehicle speed (VSS), torque, power, stall times, and longitudinal dynamics, to determine the efficiency and behavior of the vehicle in each of its gears. In addition, the unsupervised K-means algorithm was implemented to analyze vehicle gear changes, identify driving patterns, and segment the data into meaningful groups. Machine learning techniques, including K-Nearest Neighbors (KNN), decision trees, logistic regression, and Support Vector Machines (SVMs), were employed to classify gear shifts accurately. After a thorough evaluation, the KNN (Fine KNN) model proved to be the most effective, achieving an accuracy of 99.7%, an error rate of 0.3%, a precision of 99.8%, a recall of 99.7%, and an F1-score of 99.8%, outperforming other models in terms of accuracy, robustness, and balance between metrics. A multiple linear regression model was developed to estimate instantaneous fuel consumption (in L/100 km) using the gear predicted by the KNN algorithm and other relevant variables. The model, built on over 66,000 valid observations, achieved an R<sup>2</sup> of 0.897 and a root mean square error (RMSE) of 2.06, indicating a strong fit. Results showed that higher gears (3, 4, and 5) are associated with lower fuel consumption. In contrast, a neutral gear presented the highest levels of consumption and variability, especially during prolonged idling periods in heavy traffic conditions. In future work, we propose integrating this algorithm into driver assistance systems (ADAS) and exploring its applicability in autonomous vehicles to enhance real-time decision making. Such integration could optimize gear shift timing based on dynamic factors like road conditions, traffic density, and driver behavior, ultimately contributing to improved fuel efficiency and overall vehicle performance.
format Article
id doaj-art-5ac9a5652adf40eda5bdb31a8ea09661
institution Kabale University
issn 1424-8220
language English
publishDate 2025-06-01
publisher MDPI AG
record_format Article
series Sensors
spelling doaj-art-5ac9a5652adf40eda5bdb31a8ea096612025-08-20T03:29:02ZengMDPI AGSensors1424-82202025-06-012513404310.3390/s25134043Driving Pattern Analysis, Gear Shift Classification, and Fuel Efficiency in Light-Duty Vehicles: A Machine Learning Approach Using GPS and OBD II PID SignalsJuan José Molina-Campoverde0Juan Zurita-Jara1Paúl Molina-Campoverde2Grupo de Ingeniería Automotriz, Movilidad y Transporte (GiAUTO), Carrera de Ingeniería Automotriz-Campus Sur, Universidad Politécnica Salesiana, Quito 170702, EcuadorGrupo de Ingeniería Automotriz, Movilidad y Transporte (GiAUTO), Carrera de Ingeniería Automotriz-Campus Sur, Universidad Politécnica Salesiana, Quito 170702, EcuadorGrupo de Ingeniería Automotriz, Movilidad y Transporte (GiAUTO), Carrera de Ingeniería Automotriz-Campus Sur, Universidad Politécnica Salesiana, Quito 170702, EcuadorThis study proposes an automatic gear shift classification algorithm in M1 category vehicles using data acquired through the onboard diagnostic system (OBD II) and GPS. The proposed approach is based on the analysis of identification parameters (PIDs), such as manifold absolute pressure (MAP), revolutions per minute (RPM), vehicle speed (VSS), torque, power, stall times, and longitudinal dynamics, to determine the efficiency and behavior of the vehicle in each of its gears. In addition, the unsupervised K-means algorithm was implemented to analyze vehicle gear changes, identify driving patterns, and segment the data into meaningful groups. Machine learning techniques, including K-Nearest Neighbors (KNN), decision trees, logistic regression, and Support Vector Machines (SVMs), were employed to classify gear shifts accurately. After a thorough evaluation, the KNN (Fine KNN) model proved to be the most effective, achieving an accuracy of 99.7%, an error rate of 0.3%, a precision of 99.8%, a recall of 99.7%, and an F1-score of 99.8%, outperforming other models in terms of accuracy, robustness, and balance between metrics. A multiple linear regression model was developed to estimate instantaneous fuel consumption (in L/100 km) using the gear predicted by the KNN algorithm and other relevant variables. The model, built on over 66,000 valid observations, achieved an R<sup>2</sup> of 0.897 and a root mean square error (RMSE) of 2.06, indicating a strong fit. Results showed that higher gears (3, 4, and 5) are associated with lower fuel consumption. In contrast, a neutral gear presented the highest levels of consumption and variability, especially during prolonged idling periods in heavy traffic conditions. In future work, we propose integrating this algorithm into driver assistance systems (ADAS) and exploring its applicability in autonomous vehicles to enhance real-time decision making. Such integration could optimize gear shift timing based on dynamic factors like road conditions, traffic density, and driver behavior, ultimately contributing to improved fuel efficiency and overall vehicle performance.https://www.mdpi.com/1424-8220/25/13/4043GPSKNNK-meansOBD IIstopping timesPID
spellingShingle Juan José Molina-Campoverde
Juan Zurita-Jara
Paúl Molina-Campoverde
Driving Pattern Analysis, Gear Shift Classification, and Fuel Efficiency in Light-Duty Vehicles: A Machine Learning Approach Using GPS and OBD II PID Signals
Sensors
GPS
KNN
K-means
OBD II
stopping times
PID
title Driving Pattern Analysis, Gear Shift Classification, and Fuel Efficiency in Light-Duty Vehicles: A Machine Learning Approach Using GPS and OBD II PID Signals
title_full Driving Pattern Analysis, Gear Shift Classification, and Fuel Efficiency in Light-Duty Vehicles: A Machine Learning Approach Using GPS and OBD II PID Signals
title_fullStr Driving Pattern Analysis, Gear Shift Classification, and Fuel Efficiency in Light-Duty Vehicles: A Machine Learning Approach Using GPS and OBD II PID Signals
title_full_unstemmed Driving Pattern Analysis, Gear Shift Classification, and Fuel Efficiency in Light-Duty Vehicles: A Machine Learning Approach Using GPS and OBD II PID Signals
title_short Driving Pattern Analysis, Gear Shift Classification, and Fuel Efficiency in Light-Duty Vehicles: A Machine Learning Approach Using GPS and OBD II PID Signals
title_sort driving pattern analysis gear shift classification and fuel efficiency in light duty vehicles a machine learning approach using gps and obd ii pid signals
topic GPS
KNN
K-means
OBD II
stopping times
PID
url https://www.mdpi.com/1424-8220/25/13/4043
work_keys_str_mv AT juanjosemolinacampoverde drivingpatternanalysisgearshiftclassificationandfuelefficiencyinlightdutyvehiclesamachinelearningapproachusinggpsandobdiipidsignals
AT juanzuritajara drivingpatternanalysisgearshiftclassificationandfuelefficiencyinlightdutyvehiclesamachinelearningapproachusinggpsandobdiipidsignals
AT paulmolinacampoverde drivingpatternanalysisgearshiftclassificationandfuelefficiencyinlightdutyvehiclesamachinelearningapproachusinggpsandobdiipidsignals