cancel
Showing results for 
Search instead for 
Did you mean: 

Drill State Detection (Drilling, Screwing, Idle) – Filtering & Classification Stability Issues

burak_Guzeller
Associate II

Hello,

I’ve been working on a project inspired by STMicroelectronics project, where the goal is to identify different operation modes of a power drill — such as drilling, screwing, and idle — using motion sensor data.

I’m using one of ST’s development kits (e.g., STEVAL-STWINKT1B) and built my classification model using NanoEdge AI Studio.


System Overview:

  • Data Collection:
    I collected 20 signal recordings per class, each consisting of approximately 200 rows of sensor data.

  • Sensor Preprocessing:
    The raw data from the accelerometer and gyroscope is passed through multiple filters to improve signal quality:

    • Low-pass filter

    • Moving average filter

    • Kalman filter

  • Decision Mechanism (Sliding Window + Majority Voting):
    To improve classification stability in real-time, I implemented a sliding window with majority voting strategy:

    • A buffer stores the last 50 predictions from the model.

    • If at least 40 out of 50 predictions belong to the same class, that class is accepted as the current state.

    • This helps prevent noisy or sporadic misclassifications from affecting the system's output.


Problems Encountered:

  • During screwing, the system sometimes incorrectly classifies the behavior as drilling.

  • Even with multiple filters, the signals of different classes (especially drilling vs screwing) are occasionally too similar.

  • The classification model shows good offline performance, but in real-time usage, stability is not sufficient.


Looking for Advice On:

  1. How can I improve signal preprocessing to make similar behaviors (like screwing vs drilling) more distinguishable?

  2. Would you recommend specific feature engineering techniques (e.g., RMS, kurtosis, peak frequency, spectral entropy)?

  3. Is it worth exploring time-frequency domain methods like STFT, Wavelet Transform, etc., to better separate classes?

  4. Has anyone used temporal smoothing, Hidden Markov Models, or state machines to stabilize real-time classification results?


Additional Info:

  • Sensors used: Accelerometer (ACC) and Gyroscope (GYRO)  ISM330DH

  • Environment: STM32CubeIDE + NanoEdge AI Studio

  • Benchmark accuracy (offline): ~95%

  • Real-time buffer: 50 predictions, classification accepted if ≥ 40 are identical

 

I’d really appreciate any suggestions, examples, or experiences you might be able to share.
Thanks in advance!

 

burak_Guzeller_0-1754483793358.png

 

burak_Guzeller_1-1754483822423.png

 

14 REPLIES 14

Hello @burak_Guzeller,

 

I transmitted the request, but the persons in charge are in vacations.

They should contact you when they come back.

 

Have a good day,

Julian


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
SimonePradolini
ST Employee

Hello @burak_Guzeller 

Sorry for the late reply. Let me try to help you find the best solution for your use case.

The video you’re referring to isn’t using NanoEdge AI Studio, but it is about machine learning core (MLC) feature from ISM330DHCX sensor.

If you would replicate the result from the video, I can suggest a solution based on FP-SNS-DATALOG2 firmware for STEVAL-STWINKT1B with AIoTCraft or MEMS Studio tool.

Can you be interested in such an alternative solution?

 

Best regards,

Simone

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

hello 

Thank you for your feedback. What kind of projects can I do using the nanoedge AI with the sensors in your kit? Are there any source codes available for comparison?
 
 
 
 
 
 

hello 

Thank you for your feedback. What kind of projects can I do using the nanoedge AI with the sensors in your kit? Are there any source codes available for comparison?

Hello @burak_Guzeller 

I can suggest you a couple of ready-to-use demos:

  • FP-AI-MONITOR1 is an STM32Cube function pack for ultra-low power STM32 with artificial intelligence (AI) monitoring application based on a wide range of sensors
  • FP-AI-PREDMNT2 expands the demo from MONITOR1 by using STEVAL-STWINWFV1 Wi-Fi adapter board also for predictive maintenance application based on artificial intelligence (AI)

Here and here instead you can find some other ideas, tutorials and examples that are based on NanoEdge AI technology.

 

Best regards

Simone

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.