cancel
Showing results for 
Search instead for 
Did you mean: 

Similarity constantly at 100 using NanoEdge AI Studio.

Edzzio
Associate

Hello, 

First off, I'd like to preface that I'm still quite new to the STM32 environment as a whole, and being a student my experience in embedded systems is quite limited, so please feel free to correct me. 

I'm currently working on a Nucleo-F446RE board and wish to implement a real-time (using CMSIS-RTOS) anomaly detection method using the following, simulated (random numbers essentially, generated via a Python code, data separated by tabulations) time series data : 

Abnormal temperature data (randomly generated)Abnormal temperature data (randomly generated)

Normal dataNormal data

After which I benchmarked different models on NanoEdge, and selected the suggested model. 

Following the documentation in order to implement said detection model under STM32CubeIDE, I chose to use the knowledge used while benchmarking the different models, as I don't have a way to get real data yet : 

Model initialization with knowledgeModel initialization with knowledge

 

No errors up till here. In order to correctly determine whether my model is functionnal or not, I chose to use a random buffer of samples generated using the Python Code (just for illustration purposes, here below is an example) : 

Abnormal buffer of samples (example)Abnormal buffer of samples (example)

And thus I can try to detect anomalies using the following code : 

Anomaly detection functionAnomaly detection function

Unfortunately, whether I'm using an abnormal, normal or even an array with only constant values, the similarity was always of 100 : 

Anomaly detection resultsAnomaly detection results

 

Could I be doing something wrong ? Or are these results to be expected ? 

I have come with the following plausible causes (with my limited experience) : 

  • The signal processing step is not included inside the libneai.a file 
  • The data format is not respected (float array in my case)
  • The knowledge is not correctly integrated in the initialization phase
  • The model's execution (being 0.2 ms), might be exceeding the real-time deadline given to a task, and thus, detection is not correctly done (tried to make the prediction task of higher priority, with no change in results)

I thank you in advance for any advice anyone would be giving me.  

 

0 REPLIES 0