# Data-Driven Safe Deliveries: The Synergy of IoT and Machine Learning in Shared Mobility
## 6 Conclusions and Future Work  
The proposed work introduced a comprehensive on-demand smart shared transportation system that makes use of IoT, communication protocols, cloud computing, and machine learning to enhance the safety of shared mobility systems. A framework was designed to allow shared mobility vehicles to collaboratively share information and make informed decisions. The proposed framework consists of the physical, communication, control and management, interface, operation continuity, and security layers. Through this framework, the shared mobility environment is transformed into a digitally interconnected system, allowing for real-time data processing, monitoring, and management. The presented framework was validated through a case study of a shared mobility system tailored for motorbike delivery services. In this context, the physical layer incorporated sensors and an edge computing unit for data collection and vehicle registration functions. The control and management layer consisted of the following main modules: (1) an edge monitoring program that communicated with a smartphone to monitor the rider's behavior in real time, \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Ref No.** & **Sensors Used to Detect** & **Number of** & **Maneuvers** & **Maneuver Types Identified** & **Best Average Accuracy** \\ \hline \multirow{4}{*}{[26]} & Mobile phone accelerometer & & Normal, zigzag, sleepy, turn & \\  & and gyroscope & & right, turn left, U-turn, sudden & \\  & Mobile phone accelerometer & 9 & braking, sudden acceleration, & \\  & and speed bumps & & & \\ \hline \multirow{2}{*}{[27]} & Mobile phone gyroscope & 4 & Left turn, right turn, U-turn, & \\  & Mobile phone gyroscope & 4 & and a straight path & \\ \hline \multirow{2}{*}{[28]} & Mobile phone accelerometer, gyroscope and magnetometer & 4 & Left turn, right turn, stopping, & \\  & & & and going straight & \\ \hline \multirow{4}{*}{Proposed System} & \multirow{4}{*}{Discrete accelerometer and gyroscope} & \multirow{4}{*}{9} & Acceleration on a curve, & \\  & & & acceleration on a straight line, & \\  & & & fall-like maneuver, harsh & \\  & & & braking on a straight line, & \\  & & & degraded track, fall in a curve, & \\  & & & fall in the roundabout, fall on a & \\  & & & slippery straight line, and fall & \\  & & & with leaning of the motorcycle & \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Proposed system comparison with systems reported in the literature. generate warnings, and contact emergency contacts in case of accidents; (2) cloud-based web application servers that deployed the microservices responsible for user management, vehicle management, rides management, and decision-making machine learning models; and (3) cloud-based services for the storage of data related to users, vehicles, and rides. The communication layer of the proposed system utilized MQTT and HTTP protocols to share data between the system modules. The interface layer utilized a mobile application for real-time warnings to the user and a frontend web application for the driving behavior reporting to the user and administrators. The decision making in this work was achieved through (1) the real-time processing of the data collected from the accelerometer/gyroscope, ultrasonic, and impact sensors to send the warnings to the rider's smartphone and (2) a decision tree classification model that used accelerometer and gyroscope readings to classify maneuver types. The classification model achieved a promising accuracy of 91% and an F1-score of 88%. The classification of the maneuver types was preliminarily tested in real-life scenarios, and the maneuver-type classes showed an average positive classification of 78%. Overall, this study contributes to the existing ones by bridging a significant gap in the field of shared mobility.