Skip to main content
1-Visitor
April 26, 2017
Solved

How to show Fast Fourier transform for a set of readings from accelerometer in mash up?

  • April 26, 2017
  • 2 replies
  • 5623 views

Hi,

I have a set of readings from accelerometer. These readings are acceleration of vibrations. How can I use these readings and draw FFT and show it on mash up?

Thanks,

Azim

Best answer by ankigupta

change the seriesType1 property of the xy widget to line to get a line.

2 replies

5-Regular Member
April 26, 2017

Hi Azim, have you already connected the accelerometer to ThingWorx? How are you currently getting and storing the data in ThingWorx?

ahawaldar1-VisitorAuthor
1-Visitor
April 26, 2017

Hi Sushant,

I have not connected yet. I am thinking of using JAVA SDK and connect accelerometer  to SDK and from SDK push the data to thingworx platform. I am a newbie to thingworx. Can you help me how should I achieve this?

Thanks,

Azim

5-Regular Member
April 26, 2017

Azim, I'm not sure what sort of device it is but you can consider using ThingWorx's C SDK or ThingWorx WS EMS for streaming the reading data to ThingWorx. Both of these SDKs are suitable for supporting the devices which inherently lack the computation power. Indeed you can use the ThingWorx Java SDK if you see that fit for your scenario.


If you are starting afresh with the connectivity I would recommend you to go through the Homepage - Developer Zone : ThingWorx   and check the Connectivity section it include the learning labs and other must have information for you. If you are connecting your device to something like RaspberryPi or Arduino you can try referencing this great postUsing the C SDK to Deliver Data to ThingWorx from a Raspberry PI

Once you are decided on which SDK to go with, reading data could be logged to a ValueStream, i.e. if you are looking to continue monitoring the readings every n number of seconds/minutes. I think you will also need a custom JS script for implementing the algorithm on processing the reading which you are getting from the accelerometer before you can log that onto any widget, again this part will depend how you are post processing the data you are receiving from the device.

5-Regular Member
April 26, 2017

Hi azim hawaldar​,

You can use the gauge widget to show the current acceleration and if you are logging the readings from accelerometer; you can use Time Series chart to show the variation.

Do let us know if you have any specific question on implementation.

ahawaldar1-VisitorAuthor
1-Visitor
April 26, 2017

Hi Ankit,

In FFT there is no concept of time. So time series will not work. I should plot amplitude versus frequency.

Thanks,

Azim

5-Regular Member
April 26, 2017

You can use xy chart to plot amplitude versus frequency on Mashup