2023-07-30 11:29 AM
I want to implement air gesture recognition using accelerometer and gyroscope data.
With different movements you should be able to make settings on the handheld device.
Movements to be recognized are, for example, tipping twice or moving up and down twice.
My findings so far:
My biggest problem is, that I don't want to detect continuous signals, but specific time discrete events. I had Qeexo AutoML trained with segmented signals. Nevertheless, it triggers with just one tilt and not with two tilts. Apparently there are difficulties with the time window to be examined.
My next consideration is to find a possible solution with NanoEdge AI or STM32 Cube.AI.
Can anyone tell me what is the best solution to reliably detect time discrete events using 6 DOF accelerometer and gyroscope data?
Solved! Go to Solution.
2023-08-01 02:01 AM
Hi @Pointes ,
when dealing with specific time discrete events, the way to go is the FSM, so your first try was right =)
If you would like to increase the reliability, I would suggest to use the LSM6DSOX, so that you can filter data with MLC before using the FSM to detect the event
you can refer to this Application Note and to this code example, to understand the process
If this answers your question, please, mark this as "best answer", by clicking on the "accept as solution" to help the other users of the community
Niccolò
2023-07-30 05:19 PM
Interesting project, "pattern recognition":
https://www.instructables.com/Secret-Knock-Detecting-Door-Lock/
Quite possible to extend on 2D or 3D
2023-07-30 11:31 PM
Thank you very much for your suggestion. I assume that this is the code for it.
https://github.com/darkomen/Arduino/blob/master/Ejemplos/secret_knock_detector/secret_knock_detector.pde
The solution path for this problem is very similar to the finite state machine (FSM) of the LSM6DSO. There is a defined event (first knock) which triggers the recording of the knocks. Then the knock pattern is evaluated. (Number of knocks, timeout, ...)
But what if the first knock was unintentional and I still knocked the right pattern afterwards? Then, unfortunately, this solution does not work. For my motion detection, this has to work. Especially because there is no suitable start event.
For the motion detection a machine learning approach is necessary.
2023-07-31 02:23 AM
Obviously, there should not be any start/stop events, simply capture input signal with regular time base and analyze "window" - 3-5 seconds max password (pass-gesture) length. Pass cann't be too long, since pattern recognition needs to be run after each sample taken.
Analytics may not necesserely tun in time domain only, frequency another side, same way as voice recognition.
I have no comments on machine learning, have no idea how does it work no I want to, but I have completed similar project using arduino.
Cross correlation two patterns (one is composed or recorded) better works if data high-pass filtered, more on topic in this book "The Scientist and Engineer's Guide to Digital Signal Processing"
2023-08-01 02:01 AM
Hi @Pointes ,
when dealing with specific time discrete events, the way to go is the FSM, so your first try was right =)
If you would like to increase the reliability, I would suggest to use the LSM6DSOX, so that you can filter data with MLC before using the FSM to detect the event
you can refer to this Application Note and to this code example, to understand the process
If this answers your question, please, mark this as "best answer", by clicking on the "accept as solution" to help the other users of the community
Niccolò
2023-11-01 04:16 AM
Hi @niccolò,
thank you very much for your advice.
I still have some challenges with it.
I try to detect every back and forth movement in the xy plane, no matter in which direction. To do this with FSM, I set a limit value for the amplitude of the acceleration in the x and y directions. But if the movement is between the x and y axes, it is more difficult to reach one of the x or y limits.
Can the LSM6DSOX calculate sqrt(x²+y²)?
Or can it only do sqrt(x²+y²+z²) with V?
My other question is whether it is possible to measure the distance traveled using built in FSM? Because you can also measure the rotated angle.
2023-11-01 05:43 AM
Hi,
I still have some challenges with it.
I try to detect every back and forth movement in the xy plane, no matter in which direction. To do this, I set a limit value for the amplitude of the acceleration in the x and y directions. But if the movement is between the x and y axes, it is more difficult to reach one of the x or y limits.
Can the LSM6DSOX calculate sqrt(x²+y²)?
Or can it only do sqrt(x²+y²+z²) with V?
My other question is whether it is possible to measure the distance traveled? Because I can also measure the rotated angle.
2023-11-02 06:27 AM
Hi @Pointes ,
I'm sorry, but it is not possible to use only x and y in the sqrt(), and also to process the distance traveled by the board.
for the latter, you can try to use an algorithm developing fw/sw, but it is more difficult to go from acceleration to space, than from angular velocity to angular space.
Niccolò
2023-11-02 07:19 AM
Hi @niccolò ,
thank you for your message.
The user cannot distinguish between x, y and inbetween and therefore the difference does not feel good.
So I need this functionality.
Can I use the Finite State Machine (FSM) and Machine Learning Core (MLC) and send the raw data to the microcontroller at the same time?
Or should I do all the evaluations on a microcontroller in this case?
2023-11-02 08:13 AM
Hi @Pointes ,
sure, you can read data while running the FSM/MLC with no problem, just look into the output registers =)
Niccolò