NanoEdge AI Anomaly Detection library for ISPU

Revision as of 15:35, 29 July 2022 by Registered User

1. What is NanoEdge AI Library for anomaly detection?

NanoEdge™ AI Library is an Artificial Intelligence (AI) static library originally developed by Cartesiam, for embedded C software running on Arm® Cortex® microcontrollers.

When embedded on microcontrollers, it gives them the ability to easily "learn" and "understand" sensor patterns, by themselves, without the need for the user to have additional skills in Mathematics, Machine Learning, or data science.

The NanoEdge AI static library for anomaly detection is the code that contains an AI model (for example, as a bundle of signal treatment, Machine Learning model, and optimally tuned hyperparameters). It is designed to gather knowledge incrementally during a learning phase to become able to detect potential anomalous machine behaviors, and possibly predict them.

Info white.png Information
  • In the free version of NanoEdgeAIStudio the NanoEdge AI library is only compatible with a selection of STM32 evaluation boards. See the full list here in the Studio documentation.

2. What is the Intelligent Sensor Processing Unit (ISPU)?

The ISPU (intelligent sensor processing unit) is an embedded programmable core that allows reading sensor data and processing it inside the ISM330ISN device and can directly provide, when necessary, the results of said processing to an external microcontroller. The ISPU can run any type of processing, from basic signal processing to AI algorithms. NanoEdgeAI Studio provide ready-to-use Anomaly Detection binary for the ispu.

3. How it works ?

As described above, NanoEdgeAI Library is designed to detect anomalies from a signal. It will run in continuous in the ISPU as it is an always-on device. A learning phase in needed to learn the nominal behavior of the monitoring device. This phase can be start and stopped sending commands from the main MCU to the ISPU. This learning phase will create the knowledge of the NanoEdgeAI Library. Considering that the ISPU does not have any on-board nonvolatile memory, the knowledge will be lost each time power to the device is removed.

Once the learning phase is done, the ISPU can be set in detection mode. The monitoring will be done in continuous. Each time a signal is detect as abnormal, the ISPU will send an interruption. If wanted, the ISPU could send the raw data of the corresponding signal.


4. Getting Started

4.1. NanoEdgeAI Studio with the ISPU

In NanoEdge Studio select the ISM330ISN in the target list.

ispu target.png
Info white.png Information

To learn how to use the Studio, please refer to the following documentation

Once a benchmark is complete, the Deployement is enable. Select the corresponding benchmark, and the measures settings as below.

ispu compile.png
Warning DB.png Important

Datarate and Full Scale must correspond with the ones used during the datalogging step.

After clicking Compile and selecting your library type, a .zip file is downloaded to your computer.

ispu zip folder.png

It contains:

  • the ispu binary NanoEdge AI ispu_neai.h

This file contains the complete binary. It should not be modify. It declares an array used in the initialization phase to flash the ISPU.

  • the ispu control source file ispu_ctrl.c
  • the ispu control header file ispu_ctrl.h
  • the shared memory file shared_mem.h

Those files are used to control the ispu. It includes all the functions to initialize, send commands, process the answers etc.

  • the NanoEdge AI Emulators (both Windows® and Linux® versions)
  • some library metadata information in metadata.json

4.2. ISPU communication

The ISPU can be connected via I2C or SPI. In both case, to simplify the use of ispu_ctrl library, ispu_write and ispu_read has to be filled with the I2C or SPI read and write functions according to the library used.


5. Fetching data

5.1. Example "Hello World!"

6. Resources

Documentation
All NanoEdge AI Studio documentation is available here.

No categories assignedEdit