element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Experimenting with Vibration Sensors
  • Challenges & Projects
  • Design Challenges
  • Experimenting with Vibration Sensors
  • More
  • Cancel
Experimenting with Vibration Sensors
Blog Vibration Sensor - Impulse Design?
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Events
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: ralphjy
  • Date Created: 22 Jan 2021 7:02 PM Date Created
  • Views 1097 views
  • Likes 4 likes
  • Comments 2 comments
  • experimenting_with_vibration_sensors
  • kemet vibration sensor
  • edge impulse
  • wio terminal
  • footstep detection
Related
Recommended

Vibration Sensor - Impulse Design?

ralphjy
ralphjy
22 Jan 2021

I did not obtain sufficient data (both in quality and quantity) to construct an impulse (model), but I thought it would be worthwhile to review what I was trying to achieve by comparison to an impulse that I have successfully deployed using Edge Impulse.

 

I created and deployed a keyword spotting impulse on an Arduino Nano 33 BLE Sense board that detects the words "On" and "Off".  I demonstrated that impulse in a previous post: Wio Terminal Sensor Fusion - TinyML Keyword Spotting Part 1 .   I should note that I was also able to deploy and run this impulse on the Wio Terminal, but it had poor accuracy.  The Wio Terminal only has an analog microphone, so I was using ADC captured data with an impulse trained using PDM microphone data.  The sample rate was the same, but the spectral response may have been different.

 

Impulse comparison

 

Data acquisition

For the keyword spotting impulse, I was able to find an online database and therefore had access to a large amount of training data.  I used 4 labels with 1500 one second samples per label.  The samples were split with 80% for training data and 20% for test data.

image

 

For footstep detection, I only managed to get data for 2 labels with 50 five second samples per label.  I used the same 80%/20% data split.

I had planned on capturing 4 labels of data with 200-300 samples per label which I had hoped would be sufficient.

image

Create Impulse

Creating an impulse requires 3 basic elements to process the data and train the impulse (model).  Here is the set up for the keyword spotting.

image

 

Data type

The data type for both the keyword spotting data and the vibration data is Time Series.  The vibration data has a longer sample window (5 seconds vs 1 second), so window size needs to be adjusted.  The window increase is the amount of overlap between sample windows.  A smaller value creates more overlap and generates more data which might help with a small data set.

image

 

Processing block

The keyword spotting impulse used the MFCC (Mel Frequency Cepstral Coefficient) audio processing block to do the feature extraction from the microphone data.

image

 

The extracted feature set.

image

 

I'm not actually sure what processing block would work best with the vibration data.  Here are the standard choices that are available:

image

 

I think from the available choices that the Spectral Analysis would be the best.  From reading papers about footstep detection, a good custom block might be one that could detect the spacing (time difference) between the 3 highest amplitude peaks.  Of course, at this point I have no idea how to create a custom block (Edge Impulse does provide a tutorial and an example written in Python).  So, I'll try Spectral Analysis.  The parameters are just a guess.  The Filter Cut-off frequency seems to have the most effect.

image

 

The extracted feature set.

Since in this case I'm just detecting whether there are any footsteps (idle vs person1), there is reasonable feature separation.  I'm not sure how well this would do separating person1 vs person2.

image

 

Learning block

The Learning block used with keyword spotting is a Neural Network Classifier.  It is shown below after training.  The Confusion matrix shows reasonable accuracy (85.8%).

image

 

Here are the standard Learning block options that I could use for footstep detection:

image

 

The recommended block is the same type as for the audio data, a Keras Neural Network.   Most of the footstep detection papers that I have seen use the Support Vector Machine (SVM) algorithm for classification.  I don't see the option to add a custom block and I haven't found a good SVM example, so I'm going to use the NN Classifier.

Here are the results after training:

image

 

As expected, even with limited data, it has reasonable accuracy (81.3%) because there are only two classes that are reasonably distinct.

 

    

Summary

I wasn't able to achieve my goal of creating and deploying an impulse, but I gained insight into TinyML especially in context of the Edge Impulse tools.

 

 

 

Links to my other blogs for this challenge

Person Identification using Footstep Vibration Patterns

Vibration Sensor Setup

Vibration Sensor - First Look

Vibration Sensor - Data Capture Setup

Vibration Sensor - Data Capture Program

Vibration Sensor - Upload to Edge Impulse

Vibration Sensor - Evaluating the data

  • Sign in to reply

Top Comments

  • fmilburn
    fmilburn over 4 years ago +2
    Hi Ralph, You really dug deeply into this. I have read some of the examples, but haven't used TinyML so I don't have a feeling for what it can (and importantly can't) do. Regarding footsteps, the ability…
  • ralphjy
    ralphjy over 4 years ago in reply to fmilburn +2
    Hi Frank, It's pretty straightforward to run and modify the existing examples for supported boards and sensors on Edge Impulse. I've found that when I needed to port their examples that I was in a bit…
  • ralphjy
    ralphjy over 4 years ago in reply to fmilburn

    Hi Frank,

    It's pretty straightforward to run and modify the existing examples for supported boards and sensors on Edge Impulse.  I've found that when I needed to port their examples that I was in a bit over my head.  I should have started with getting a better foundation in TensorFlow Lite.  I think that TinyML is a tool that I'll use in a lot of future projects, so I guess I should spend some time getting comfortable with it.  Seems like there is a big emphasis on introducing new hardware for edge applications (RPi Pico - can't believe so many board variants are already available).

    Ralph

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • fmilburn
    fmilburn over 4 years ago

    Hi Ralph,

    You really dug deeply into this.  I have read some of the examples, but haven't used TinyML so I don't have a feeling for what it can (and importantly can't) do.  Regarding footsteps, the ability to distinguish different persons is interesting.  I imagine it could be fooled by tiptoeing around, skipping, taking big steps, etc.  It will be interesting to see what uses might end up in commercial products.

    Frank

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube