2025-02-24 08:08 AM - edited 2025-02-24 08:14 AM
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)
Normal 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 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)
And thus I can try to detect anomalies using the following code :
Anomaly 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 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) :
I thank you in advance for any advice anyone would be giving me.