ST AEKD-AICAR1 Скачать руководство пользователя страница 1

Introduction

The 

AEKD-AICAR1

 is a versatile deep learning system based on a long-short term memory (LSTM) recurrent neural network

(RNN). It is able to classify the car state:

car parked

car driving on a normal condition road

car driving on a bumpy road

car skidding or swerving

The main idea is to define an AI-car sensing node ECU with an embedded artificial intelligence processing.
The system hosts an SPC58EC Chorus 4M microcontroller, which is able to acquire discrete acceleration variations on a
three-axis reference system.
The 

AIS2DW12

 motion sensor mounted on the 

AEK-CON-SENSOR1

 board retrieves inertial data. The acquired data are

transmitted to the LSTM RNN, which classifies the car state. The classification result is shown on the 

AEK-LCD-DT028V1

 LCD

touch display.
The LSTM RNN has been implemented and trained using the TensorFlow 2.4.0 framework (Keras) in the Google Colab
environment. The AI-SPC5Studio plug-in has been used to convert the resulting trained neural network into an optimized C
code library, which can run on an MCU with limited power computing resources.

Figure 1. 

AEKD-AICAR1 evaluation kit

The LSTM RNN training has been performed with several time-series acceleration waveforms recorded on a real vehicle in
motion. The resulting prediction accuracy, calculated by the confusion matrix, is about 93%. Field tests carried-out under all road
conditions with a sedan confirm the adherence of the computed results compared with the real road conditions.

Note:

The 

AEKD-AICAR1

 is an evaluation tool for R&D laboratory use only. It is not destined for use inside a vehicle.

Getting started with the AEKD-AICAR1 evaluation kit for car state classification

UM3053

User manual

UM3053

 - 

Rev 1

 - 

September 2022

For further information contact your local STMicroelectronics sales office.

www.st.com

Содержание AEKD-AICAR1

Страница 1: ...ented and trained using the TensorFlow 2 4 0 framework Keras in the Google Colab environment The AI SPC5Studio plug in has been used to convert the resulting trained neural network into an optimized C...

Страница 2: ...ty The bias is the measure of assumption made by the form of the output This architecture is typical for deep learning processes like data classification and pattern recognition neural networks 1 2 Lo...

Страница 3: ...rk able to keep the information received is the long short term memory LSTM recurrent network Unlike traditional artificial neural networks LSTM has feedback connections It can process not only single...

Страница 4: ...ms related to the classification problem A significant amount of computing power is required to implement sufficiently robust and efficient models For initial tests we can rely on a standard machine A...

Страница 5: ...r large multidimensional arrays and matrices along with a large collection of high level mathematical functions to operate on these arrays import numpy as np Tensorflow Open source software library fo...

Страница 6: ...speech recognition system It consists of a neural convolution kernel as an input layer able to elaborate a convolution function with the input vector over a temporal dimension The input vector is a ti...

Страница 7: ...rs define the AI car sensing node network model These parameters are related to the LSTM RNN topology chosen 2 4 2 Model training The AI car sensing node network training has been performed by acquiri...

Страница 8: ...nables the acquisition mode In this mode the application sends each acceleration sample read from the sensor to a serial port with a baud rate set to 38400 The serial data stream can be read through a...

Страница 9: ...hree columns contain the acceleration values measured on the X Y and Z axis respectively without the gravity offset To prepare the file for the network training you have to Compute the acceleration va...

Страница 10: ...eady to use dataset Diff_profile csv has been created to train the network for the car state classification 2 4 2 2 Neural network training with Google Colab Import the training dataset contained in t...

Страница 11: ...ts_diff_Az i cnt 1 Note The cnt variable contains the number of available window waveforms according to the dataset acquired during each specific car status 2 4 3 Model fitting and compilation Firstl...

Страница 12: ...it but faster than the training phase A confusion matrix performs the model accuracy evaluation This is a technique to summarize the algorithm classification performance As the datasets have differen...

Страница 13: ...three have been confused with bumpy Figure 11 Confusion matrix The LSTM RNN accuracy for the AI car sensing node is about 93 The miss classification for the skid state impact the calculated accuracy v...

Страница 14: ...ient ANSI C library to be compiled installed and executed on SPC58 microcontrollers You can easily import pretrained neural networks in the SPC5 STUDIO AI from the most widely used deep learning frame...

Страница 15: ...2 Insert http ai spc5studio com in the Work with field Figure 13 Install new software Step 3 Click on Select all and Next Step 4 Install SPC5 STUDIO AI UM3053 SPC5 STUDIO AI plugin UM3053 Rev 1 page 1...

Страница 16: ...n based on the SPC58ECxx platform Figure 14 Creating a new SPC5 STUDIO application Step 2 Import the following components AutodevKit Init Package SPC58ECxx Init Package Component RLA Step 3 Select SPC...

Страница 17: ...ect SPC5 AI Component RLA Figure 17 Selecting SPC5 AI Component RLA 3 1 2 How to import the pretrained LSTM neural network The following procedure shows how to import the pretrained LSTM neural networ...

Страница 18: ...option Step 4 Configure the parameters for the LSTM AI car sensing node Figure 20 Configuring the parameters Step 4a Enable the network initialization data Step 4b Put a valid neural network name Ste...

Страница 19: ...M neural network To analyze the pretrained LSTM neural network for the AI car sensing node follow the procedure below Step 1 Select Analyze in the Outline tab Figure 21 Selecting Analyze UM3053 SPC5 S...

Страница 20: ...components spc5_ai_component_rla cfg model_name model_car_sts model_hash 10794f1c230799b2a1cda67171827db2 input input_0 150 items 600 B ai_float FLOAT32 50 1 3 inputs total 600 B output dense_1_nl 4...

Страница 21: ...eprocessor on how to configure properly the dimension and allocation of the neural network data structure Table 1 List of defines C language define Description AI_SENSING_NODE_NETWORK_MODEL_NAME A C s...

Страница 22: ...the ai_sensing_node_network_destroy function should be called to release the possible allocated resources ai_sensing_node_network_init ai_bool ai_sensing_init ai_handle network const ai_network_params...

Страница 23: ...AICAR1 uses the AEK MCU C4MLIT1 evaluation board to process discrete acceleration variations acquired from the three axis IMU system in order to run a pretrained neural network Moreover the board dri...

Страница 24: ...follow the procedure below Step 1 Go on SPC58ECxx Platform Component RLA in the project explorer and add a new AEK CON SENSOR1 Component RLA from the list Step 2 Press on the allocation button to mak...

Страница 25: ...el_data PIXFMT_RGB_565 aek_ili9341_drawString AEK_LCD_DEV0 102 160 PARKING color font24pt 4 3 2 High level software This layer includes IMU middleware AI sensing node network middleware LCD display mi...

Страница 26: ...AICAR1 application has three operating working modes Acquisition Real time calculation default Offline calculation 4 3 3 1 Acquisition This working mode is used to perform an LSTM neural network train...

Страница 27: ...s Table 2 Test conditions and results Test condition Number of tests Number of failures Failure percentage Normal road 10 0 0 Bumpy road 10 0 0 Skid normal road 10 2 detected as bumpy road 20 Skid bum...

Страница 28: ...CON SENSOR1 AEK LCD DT028V1 and STEVAL MKI206V1 You can find their detailed schematic diagrams at the related web pages AEK MCU C4MLIT1 schematic diagrams AEK CON SENSOR1 schematic diagrams AEK LCD DT...

Страница 29: ...K CON SENSOR1 AEK LCD DT028V1 and STEVAL MKI206V1 You can find their detailed schematic diagrams at the related web pages AEK MCU C4MLIT1 bill of materials AEK CON SENSOR1 bill of materials AEK LCD DT...

Страница 30: ...the authority of an FCC license holder or must secure an experimental authorization under part 5 of this chapter 3 1 2 Notice for Innovation Science and Economic Development Canada ISED For evaluatio...

Страница 31: ...ame_size x a i i frame_size db_x append x db_y append Y_LABELS label db pd read_csv Diff_profile csv sep print db keys states db Status value_counts scaler MinMaxScaler ts_status db Status ts_diff_Ax...

Страница 32: ...egorical_crossentropy metrics accuracy model fit x_train y_train epochs 1000 model summary import matplotlib pyplot as plt import seaborn as sns matplotlib inline Y_pred model predict x_test y_pred np...

Страница 33: ...csv module csv_writer writer write_obj Add contents of list as last row in the csv file csv_writer writerow list_of_elem s sr Serial COM31 38400 Write header named_tuple time localtime get struct_tim...

Страница 34: ...Revision history Table 3 Document revision history Date Revision Changes 20 Sep 2022 1 Initial release UM3053 UM3053 Rev 1 page 34 39...

Страница 35: ...using the standard importing procedure 16 3 1 2 How to import the pretrained LSTM neural network 17 3 1 3 How to analyze the pretrained LSTM neural network 19 3 2 SPC5 STUDIO AI API 21 4 AI car sensin...

Страница 36: ...Revision history 34 List of tables 37 List of figures 38 UM3053 Contents UM3053 Rev 1 page 36 39...

Страница 37: ...List of tables Table 1 List of defines 21 Table 2 Test conditions and results 27 Table 3 Document revision history 34 UM3053 List of tables UM3053 Rev 1 page 37 39...

Страница 38: ...plete model generation 12 Figure 11 Confusion matrix 13 Figure 12 Installing the plugin 14 Figure 13 Install new software 15 Figure 14 Creating a new SPC5 STUDIO application 16 Figure 15 Selecting the...

Страница 39: ...s and ST assumes no liability for application assistance or the design of purchasers products No license express or implied to any intellectual property right is granted by ST herein Resale of ST prod...

Отзывы: