Implementing AI at the edge: How it works

Panasonic bypasses sensor for air pressure monitoring in e-bike by combining MCU with an edge AI development tool. The post Implementing AI at the edge: How it works appeared first on EDN.

Implementing AI at the edge: How it works

While the talk about artificial intelligence (AI) at the edge is all the rage, there are fewer design examples of how it’s actually done. In other words, how AI applications are implemented at the edge. Below is a design example of how Panasonic implemented an AI function in its e-assisted bike.

Panasonic recently launched electric assist bicycle for school commuting, TiMO A. This e-assisted bike bypasses the need for additional hardware such as a sensor for tire air pressure. Instead, it incorporates a microcontroller (MCU) alongside an edge AI development tool to create a tire pressure monitoring system (TPMS) that leverages an AI function.

Figure 1 The e-bike powertrain comprises basic units, including a power unit (with an on-board charger, junction box, inverter, and DC-to-DC converter) and a motor unit. Source: STMicroelectronics

The bike runs an AI application on the MCU to infer the tire air pressures without using pressure sensors. If necessary, the system generates a warning to inflate the tires based on information from the motor and the bicycle speed sensor. As a result, this new function simplifies tire pressure monitoring system (TPMS) design while enhancing rider safety and prolonging the life of tires.

Panasonic combined the STM32F3 microcontroller from STMicroelectronics with its edge AI development tool, STM32Cube.AI, which converts neural network (NN) models learned by general AI frameworks into code for the STM32 MCU and optimizes these models.

STM32F3 is based on the Arm Cortex-M4, which has a maximum operating frequency of 72 MHz. It features a 128-KB flash along with analog and digital peripherals optimal for motor control. In addition to the new inflation warning function, the MCU determines the electric assistance level and controls the motor.

STM32Cube.AI enabled Panasonic to implement this edge AI function while fitting into STM32F3 embedded memory space. Panasonic leveraged STM32Cube.AI to reduce the size of the NN model and optimize memory allocation throughout the development of this AI function. STM32Cube.AI optimized the NN model developed by Panasonic Cycle Technology for the STM32F3 MCU quickly and implemented it in the flash memory, which has limited capacity.

Figure 2 STM32Cube.AI, which makes artificial neural network mapping easier, converts neural networks from popular deep learning libraries to run optimized inferences on STM32 microcontrollers. Source: STMicroelectronics

This design example shows how edge AI works in both hardware and software, which can facilitate a wide range of designs in industrial and consumer domains.

“By combining the STM32F3 MCU with STM32Cube.AI, we were able to implement the innovative AI function without the need to change hardware,” acknowledged Hiroyuki Kamo, manager of the software development section at the Development Department of Panasonic Cycle Technology.

Related Content

The post Implementing AI at the edge: How it works appeared first on EDN.

What's Your Reaction?

like

dislike

love

funny

angry

sad

wow