betaFeedback

WorksComputer Science

Design of the Secure Smart Scooter with Automatic Lane Detection

Abstract

The authors present a prototype of an electric scooter that uses computer vision to determine driving lanes and automatically modify vehicle configuration. Scooters steer on sidewalks, bike paths, or car lanes. The government imposes speed limits on the lanes in which electric scooters drive. Featuring computer vision, electric scooters can determine driving lanes and automatically modify vehicle configuration. However, such systems' safety is still a concern, and research into such vehicle systems' safety and security aspects is proceeding. First, we will present our vehicular setup. Then, we will present our implemented scooter with safety constraints. Finally, we present our security prototype for such an electric scooter.

Introduction

The transportation systems are evolving day by day with integrated technologies such as adaptive cruise control, lane detection, positioning, artificial intelligence and low power wireless communication. One of the goals of an Intelligent Transportation System (ITS) is to support different modes of transportation and traffic management in order to provide users with more relevant information and a safer, more coordinated and ”smarter” use of the transportation network.

The scooter itself, has computing devices that are responsible for the control of the vehicle, and enhanced mobility features such as automatic lane detection. A popular means of transportation in urban areas is the electric scooter, which coupled with other public transportation options can improve mobility and reduce the need for personal mobility devices [3, 6, 7, 12]. E-scooters, however, need to be revisited due to the legal framework for these vehicles, and the technology used in them must be adapted to the vehicle technology requirements and the legal framework. The direct interaction of the vehicle and pedestrian lane makes it challenging to design and implement such a mobility medium’s safety and security requirements. According to the legal frameworks of Germany, electric scooters can only drive at a defined maximum speed in pedestrian, cycling, and car lanes. For example, the scooter is limited to 6 KM/H in the pedestrian lanes. Driver assistance systems and autonomous vehicles require lane detection to form the driving settings. One of the primary tasks of autonomous driving is detecting the road or drivable portion of an unstructured road. Only colour cameras can detect the road or drivable portion in such a muddled road. The literature has discussed road and lane detection for more than four decades, and many promising solutions exist for automobiles today. The authors of [1] explored road and lane detection methods. Lanes and roads can be perceived in several ways, but monocular vision is the most common. Although most works do not discuss it directly, they acknowledge it as a viable choice. Our scooter is cost-effective and delivers reliable performance thanks to a similar approach, which incorporates computer vision. By the way, our discussion of computer vision performance will not take place in this paper, and this paper concentrates on the secure design of such a scooter.

A cruise control advanced driver assistance system known as an adaptive cruise controller (ACC) automatically adjusts the vehicle’s speed and distance from the vehicle ahead to preserve a reasonable safety span. Control depends on device information from vehicle sensors [9, 11, 13]. Such systems may use a measuring instrument, an optical device, or a camera device. This allows the vehicle to brake when it detects that it is approaching another vehicle and to accelerate again when traffic permits. Similarly, we determine the vehicle’s maximum speed based on the computer vision component. We enforce the top speed based on the lane detected by our prototype from the visual component to the motor controller. We smoothly transition from the current speed to the desired speed by logarithmic increasing or decreasing the speed in a two-second time window [4]. This is critical for maintaining smooth acceleration to ensure the safety of the system [5, 8, 10, 14].

In our prior work [4], we have presented the safety requirements of an electric scooter and the implementation of those safety requirements. This paper discusses the system’s security requirements to maintain functional, control and safety applications secure. To our collective knowledge, this paper is the first paper that presents the requirements for the secure design of electric scooters. Our design can also be extended to other motor controllers, such as autonomous driving systems. The rest of the paper will present the vehicular setup, security requirements of vehicular devices, and our proposed design of the secure scooter.

Vehicular Setup

Motor controllers (MC), Main Control Unit (MCU), sensors, and actuators are the four main components of a scooter.

Sensors include, for instance, driver commands, gyroscopes, accelerometers, and so on. The actuators are electric motors, displays, lights, and so on. With the additional camera and Main Control Unit (MCU), lanes can be detected and the maximum speed applied based on the detected lane.

Motor controllers (MC), Computer Vision (CV), sensors, and actuators are the four main components of a scooter. Sensors include, for instance, driver commands, gyroscopes, accelerometers, and so on. The actuators are electric motors, displays, lights, and so on. With the additional camera and Main Control Unit (MCU), lanes can be detected, and the maximum speed applied is based on the detected lane. In addition to modelling most control processes, the control loop represents the policies we apply to control the vehicle system. Figure 2 shows the motor controller’s control loop. Sensors read the state of systems from their processes (zkz_k). Motor controllers receive sensor readings (YkY_k) from sensors. The motor controller processes sensor readings, the vehicle’s space is updated, and actuator commands (uku_k) are sent to the actuators. Actuators apply actuation commands (vkv_k) to update the system’s state. Motor Controllers send sensor readings to the Main Control Unit (MCU) to measure the system’s state. MCUs can perform several advanced state estimations rather than MCs due to the high computing power available there. Lastly, the MC applies the motor controller’s policies (pkp_k).

The control loop of the motor controller

Figure 2. The control loop of the motor controller. The Main Control Unit receives a copy of sensor readings (yky_k) and processes them. The high-level control policies will be implied by pkp_k to the Motor Controller.

Implemented Scooter

Here are the major components of our prototype: 1) Main Control Unit (MCU) 2) Human-Machine Interface (HMI)

  1. Motor Controller (MC) 4) Environmental Recognition (ER) 5) Battery Management System (BMS) 6) Cellular Communication. The main control unit is responsible for processing and decision-making of inputs received from sensors and the MQTT Broker. The MCU applies the required actions to actuators and MCs. The emergency is connected to a camera and is responsible for detecting the current lane and classifying it into three categories: pedestrian, cycle or automobile lanes. It includes a Google Coral Edge TPU that facilitates deep learning and computer vision algorithms. The HMI consists of 64 × 64 LEDs, which indicate the current

status of the scooter, with pedestrian traffic, bicycle or Cellular communication is an NB-IoT connection from Waveshare, including the SIM7080G chip. The Figure 1 represents the overall scooter setup, together with other ITS technologies such as satellite communication (GPS), mobile communication (NB-IoT), and environmental recognition.

Figure 1. ITS transportation standards together with our electric scooter.

A CAN bus connects the motor controller to other scooter components. A Raspberry Pi 4 Model B MCU has been attached with a CAN controller, a Coral USB Accelerator, an LED display, and an LED driver. An edge TPU coprocessor, the Google Coral TPU edge enables high-speed machine learning for various systems, mainly for image processing. Here are a few snapshots of our prototype scooter 4a. Designed to enable flexible, efficient, and reliable power supply systems, the Motor Controller is a modified version of VESC. The VESC program provides researchers with resources to help them achieve their goals more quickly. Various engineering challenges arise in VESC environments, ranging from small to large complex vehicle systems. A BLDC motor controller controls the motors directly.

In the same way that brushed DC motor controllers perform a similar function and apply similar styles, BLDC motor controllers also perform a similar job. Their arrangement and execution still differ in some abstract ways. Motor controllers regulate the speed and torque of BLDC motors as well as start, stop, and reverse their rotation. Finally, the scooter is connected to an MQTT broker to send information such as debugging notifications and, when required, positioning pieces of information.

Security Design

Here, we describe the features we included in our security design for the electric scooter. As depicted in Figure 3, these features are read-out protection, secure boot, memory protection unit, SSL protocol, secure storage, and secure firmware upgrade. We will describe each function in this section.

Figure 3. The overall security design of the electric scooter.

Read-out Protection

Read Out Protection (RDP) is a global read-protection feature for flash memory. The RDP protects the embedded firmware code against copying, reverse engineering, dumping using debug tools or other intrusive attacks. The user should set this protection after loading the binary code into the embedded Flash memory. We used the RDP to protect our secret key that is used during the secure boot.

Secure Storage

Secure Key Storage is available in most general-purpose micro-controller series. This specification orders that it should be feasible to store general-purpose info and key material that assures the confidentiality and integrity of the stored data. The key storage should also provide the atomicity of the operations that modify the storage. Atomicity here means that the entire operation completes successfully or no write is done.

Secure Boot

The Secure Boot (Root of Trust services) is an immutable code, always executed after a system reset. It will check the MCU’s static protections, activate MCU run-time protections and then verify the authenticity and integrity of the user application code. This feature will be run before every execution to ensure that invalid or malicious codes will not run. The integrity of the image will be verified against the secret key that is stored in the secure storage.

Secure Firmware Update

The Secure Firmware Update application receives the firmware image via a communication interface and checks its authenticity. It also checks the integrity of the code before lodging it. The firmware update is done on the complete or only on a portion of the firmware image. It can provide single firmware image configuration to maximize firmware image size and dual firmware image configurations to ensure safe image installation. Similar to the secure boot, the integrity of the image will be verified against the secret key that is stored in the secure storage.

Memory Protection Unit

The MPU makes the motor controller more robust and secure by prohibiting the controller applications from corrupting data used by critical tasks (such as the real-time OS). It also defines the SRAM memory region as a non-executable (execute never XN) to prevent code injection attacks. In addition to those features, MPU can change the memory access attributes. The MPU can protect up to sixteen memory regions, while the MPU is an optional component for memory protection. Including the MPU in the microcontrollers (MCUs) makes them more robust and reliable.

SSL

MQTT is an IoT communication protocol which is a lightweight publish-subscribe and a machine-to-machine network protocol for Message queue/Message queuing service. It was designed for connections with distant locations that have appliances with resource constraints or restricted network bandwidth.

Transport Layer Security (TLS) and Secure Sockets Layer (SSL) are two main methods to provide a secure communication channel between a client and a server. TLS and SSL are cryptographic protocols which use a handshake instrument to negotiate various parameters and to create a secure link between the client and the server. The MQTT features the SSL protocol to ensure the confidentiality and integrity of the messages in IoT devices.

Future Work

In the future, we will implement our security design and integrate security features into the current scooter controller. We also measure the overall overhead and costs of such a secure design of motor controllers.

Discussion

We classify the attacker as internal and external attackers. The attacker’s target can be the software (firmware), communication between the components, or the physical components. We consider the physical attacks that an attacker can physically damage the device out of the scope of this work. We assume that an attacker gains access to the scooter and tries to manipulate the control units of the scooter.

Software Integrity

The attacker that targets the software integrity can be classified into two types of the attacker. An insider attacker found a vulnerability in the control software and had access to the MCU. The outsider attacker would try to attack the software integrity via communication channels or install a USB-based JTAG (Joint Test Action Group) that communicates with the MCU from outside the running software on the MCU.

Outsider attacker

The attacker that has access to the MCU from its peripherals would attempt to read the sensitive data and tamper with the control software of the MCU. The attacker’s goal is to install malicious firmware or pieces of software and alter the normal cyber-physical behaviour of the scooter, such as speeding the scooter higher than the maximum allowed speed. Our implementation has a secure boot and secure storage function. An outsider attacker attempting to read the sensitive data would fail due to the presence of secure storage that features read-out protection on both the motor controller and the main control unit. Hence, the attacker can not read the secret key stored inside the MCU.

The attacker would try to install malicious software inside the MCU, compromising the software integrity or even up-loading new firmware. However, the software integrity will be verified during the secure boot, and the new software or pieces of code will not be loaded during the boot process.

Insider attacker

The attacker that has full access to the MCU and its memory and the attacker would attempt to read the sensitive data and tamper with the control software of the MCU. The attacker’s goal is to install malicious firmware or pieces of software and alter the normal cyber-physical behaviour of the scooter, such as speeding the scooter higher than the maximum allowed speed. The main control unit incorporates the TEE that divides the functions to secure and non-secure zones. The attacker’s attempt to read sensitive data stored inside the secure storage would fail due to the isolation concept of the TEE implementation.

The insider attacker with full access to the MCU and its memory can read the sensitive data stored in the motor controller due to the lack of the isolation concept in the MCU. Hence, an attacker that already took access to the MCU, for example, due to a software vulnerability, can read the secret key and generate a correct signature to bypass the secure boot. Nevertheless, such an attack is very complicated and requires a sophisticated strategy of security offensive.

Communication Integrity

The communication mediums of the scooter are internal and external communications. The main control unit is connected to the MQTT broker, and the connection is protected via the SSL protocol. The attacker that might try to alter the communication between the main control unit and the MQTT broker would fail due to the authentication of the client certificate with the SSL protocol or authentication of the client identity with a password.

The internal communication between the scooter devices is via the CAN bus. Due to the lack of message encryption and authentication, the attacker can manipulate internal communications if the attacker gains access to the CAN bus. Nevertheless, we assume the attacker can not attach external devices to the scooter. In any case, CAN communication is not secure, as discussed in the literature.

Three electric scooter displays showing pedestrian, bike, and car lanes

Figure 4. (a) The maximum possible speed in the pedestrian lane is 6km/h, and also, we requested the maximum gas from the motor controller, the implied policies from MCU maintained the speed at 6km/h. (b) The maximum possible speed in the bike lane is 15km/h, and also, we requested the maximum gas from the motor controller, the implied policies from MCU maintained the speed at 15km/h. (c) The maximum possible speed in the car lane is 45km/h, and also, we requested the maximum gas from the motor controller, the implied policies from MCU maintained the speed at 15km/h.

Conclusion

We presented our security design of an electric scooter with enhanced safety functionalities, such as detecting the lanes, including pedestrian, bike and car lanes. The scooter consists of two major computing components: the motor controller and the main control unit. The main control unit can use powerful computing resources with advanced security features, such as Trusted Execution Environment. However, the motor controller is usually a real-time controller that lacks advanced security features. We maximized our protection in both components to harden the overall system’s security. Thanks to such a security design, we can connect our scooter to the communication networks by using the MQTT protocol and providing ITS features to the current scooters.

Acknowledgment

This project was funded by the Federal Ministry of Education and Research (BMBF) under the collaborative project of the Kamäleon [2] between HFC Human-Factors-Consult GmbH, Berlin, Constin GmbH, Berlin, Orange-Bike Concept GmbH, Karlsruhe, TÜNKERS, Ratingen, Karlsruhe Institute of Technology, Karlsruhe, Technical University of Braunschweig, Braunschweig, Aachen University of Applied Sciences, Aachen, and CISPA Helmholtz Center for Information Security, Saarbrücken.

References

  1. [1]A. Bar Hillel, R. Lerner, D. Levi, and G. Raz. Recent progress in road and lane detection: a survey. Machine vision and applications, 25(3):727–745, 2014.
  2. [2]BMBF. Kamaeleon Project. https://www.interaktive-technologien.de/projekte/kamaeleon-1, 2022. [Online: accessed 10-01-2022].
  3. [3]K. Button, H. Frye, and D. Reaves. Economic regulation and e-scooter networks in the usa. Research in transportation economics, 84:100973, 2020.DOI
  4. [4]G. Hamid Reza and T. Nils Ole. Smooth transition of vehicles’ maximum speed for lane detection based on computer vision. In Proceedings of 2022 IEEE 96th Vehicular Technology Conference, pages 1–5, 2022.
  5. [5]N. Haworth, A. Schramm, and D. Twisk. Comparing the risky behaviours of shared and private e-scooter and bicycle riders in downtown brisbane, australia. Accident Analysis & Prevention, 152:105981, 2021.
  6. [6]J. Jiao and S. Bai. Understanding the shared e-scooter travels in austin, tx. ISPRS International Journal of Geo-Information, 9(2):135, 2020.
  7. [7]B. Laa and U. Leth. Survey of e-scooter users in vienna: Who they are and how they ride. Journal of transport geography, 89:102874, 2020.
  8. [8]Q. Ma, H. Yang, A. Mayhue, Y. Sun, Z. Huang, and Y. Ma. E-scooter safety: The riding risk analysis based on mobile sensing data. Accident Analysis & Prevention, 151:105954, 2021.
  9. [9]G. Marsden, M. McDonald, and M. Brackstone. Towards an understanding of adaptive cruise control. Transportation Research Part C: Emerging Technologies, 9(1):33–51, 2001.
  10. [10]L. J. Mayhew and C. Bergin. Impact of e-scooter injuries on emergency department imaging. Journal of medical imaging and radiation oncology, 63(4):461–466, 2019.
  11. [11]V. Milanés, S. E. Shladover, J. Spring, C. Nowakowski, H. Kawazoe, and M. Nakamura. Cooperative adaptive cruise control in real traffic situations. IEEE Transactions on intelligent transportation systems, 15(1):296–305, 2013.
  12. [12]D. Schellong, P. Sadek, C. Schaetzberger, and T. Barrack. The promise and pitfalls of e-scooter sharing. Europe, 12:15, 2019.
  13. [13]L. Xiao and F. Gao. A comprehensive review of the development of adaptive cruise control systems. Vehicle system dynamics, 48(10):1167–1192, 2010.
  14. [14]H. Yang, Q. Ma, Z. Wang, Q. Cai, K. Xie, and D. Yang. Safety of micro-mobility: Analysis of e-scooter crashes by mining news reports. Accident Analysis & Prevention, 143:105608, 2020.

Paper details

vlnc:W_f464aw3j
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents