Post Processing Slam Stick Recording Files: Matlab
Post Processing Slam Stick Recording Files: Matlab
The Slam Stick Lab offers a Slam Stick user a very easy to use free software tool for simple data analysis. Its
greatest strength is its ability to provide a quick overview of a particular dataset. There are some limitations with
this software package for post processing data recordings. Midé’s .IDE file format is optimized for efficiency on
the device and to describe all the sensor data that the Slam Stick is capable of recording (at varying time rates
and start times). But this optimization on the device creates some inefficiencies when loading and analyzing the
data.
The .IDE file format is based on Extensible Binary Meta Language (EBML), a structured binary format; recordings
are not stored in simple arrays which requires some parsing of recording files to generate arrays for post
processing. Midé offers two command line utilities which parse through an .IDE recording file to generate more
user friendly files with simple sensor arrays.
Midé also offers some example MATLAB scripts and Python scripts for completing this analysis. MATLAB is a
programing language designed specifically for technical computing and analysis. MATLAB arguably has a higher
processing capability and can generally complete an analysis in less time than a comparable Python script. But
MATLAB costs over $2,000 for a commercial license (only $150 for a home license). If cost is a concern,
Python offers an excellent alternative because it is open source and free! Their SciPy library offers a collection
of analysis toolboxes with similar functionality to MATLAB.
The following sections will go through some examples with the car engine vibration recording detailed as part of
the how-to video series: http://www.mide.com/pages/slam-stick-how-to-videos
The command prompt will begin in the default location, typically the Windows user directory in the C: drive. If
the utility is located in another drive, change the drive by entering the drive letter followed by a colon as shown.
Then change the directory by entering cd followed by the folder location as shown. Some additional basic
instructions for entering and using the command line can be found here.
The utility can export .TXT and .MAT files as well; but we’ll look at the .CSV for this example. Running ide2csv.exe
–h will bring up the help menu as shown below that has some more information.
It took 5 times longer (50 seconds) to generate the calibrated .CSV files of that vibration recording. Three
separate files are generated because there are three sensors. You’ll notice the data files are quite a bit larger
than the .IDE recording file because the data is no longer stored in a binary format and it isn’t 16-bit raw integer
data.
When split files are loaded in Slam Stick Lab, blank space may appear before the start of the accelerometer data.
This visual gap does not indicate a loss of data. This occurs when temperature/pressure data appears before
accelerometer data. To accommodate this, the recording’s starting time is shifted back, overlapping the end of
the previous file. The time of the first accelerometer sample will be correct relative to the last accelerometer
sample.
SSL_Converter
This function uses the command line utility raw2mat to take an .IDE file and convert it to .MAT, then calls the
SSL_Analyzer function to apply calibration and plot the data. This function then goes on to save the calibrated
data in a .MAT file with all sensor data. In a subdirectory the script also saves separate .MAT files for each sub-
This function takes a little longer compared to running the raw2mat directly in the command prompt but still
completes the conversion, plotting/analysis, and saving calibrated data in just over 20 seconds.
The following are a few screen shots showing the functions that are available to you in this package. We went
through a double integration example to compute the velocity and displacement of the car engine data. That
SSL_Converter function saves .MAT files in the two column format which makes it easier to load these files to
use with the vibrationdata GUI.
Load_Plot_RMS_FFT_Spectrogram
Midé provides an example Python script named Load_Plot_RMS_FFT_Spectrogram.py that can be run from the
command line. The script, shown below, prompts the user for a two column CSV file (time is the first column,
second represents data of interest), and plots the data. It then goes on to compute the moving RMS levels, and
an FFT and spectrogram of the entire dataset and plots these.
The plots generated from this script analyzing the car engine data are shown below.