View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
Shimmer MATLAB Instrument Driver

3.0 | 1 rating Rate this file 40 Downloads (last 30 days) File Size: 1.5 MB File ID: #43712 Version: 2.6

Shimmer MATLAB Instrument Driver



30 Sep 2013 (Updated )

Object oriented solution for Shimmer sensor data capture directly into Matlab

Editor's Notes:

Popular File 2015

| Watch this File

File Information

Object oriented solution for Shimmer data capture directly into MATLAB. Provides for full configuration functionality to set features such as sampling rate, accelerometer range and which sensors are enabled/disabled. Also provides solutions for low battery warning and 3D orientation estimation. Allows for simultaneous data capture of both raw data and calibrated data from multiple Shimmer units. Includes example .m scripts which demonstrate the use of the ShimmerHandle class including plotting of data and writing data to a file. Includes documentation and help info.

Required Products Instrument Control Toolbox
MATLAB release MATLAB 7.14 (R2012a)
MATLAB Search Path
Other requirements Realterm version
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (6)
22 Oct 2016 gbernal bernal

I'm trying to run the example ppgheartrateexample.m and I get this error Undefined variable "com" or class "com.shimmerresearch.biophysicalprocessing.PPGtoHRAlgorithm".

Error in ppgtoheartrateexample (line 67)
com.shimmerresearch.biophysicalprocessing.PPGtoHRAlgorithm(fs,numberOfBeatsToAve,useLastEstimate); %
create PPG to Heart Rate object: Sampling Rate = 204.8Hz, Number of Beats to Average = 1 (minimum),
Repeat last valid estimate when invalid data is detected.

I'm using matlab R2016

Comment only
03 Oct 2016 shaikh hossain

I have a shimmer 3D accelerator and software that write x,y,z axis data in dat file.I want to detect, real time activities detection where 128 readings/window (2.56 sec data) and 50% overlap like the dataset for "Machine Learning Made Easy"

if ~exist('rawSensorData_train.mat','file') && ~exist('rawSensorData_test.mat','file')

%Load Train Data
load rawSensorData_train

%Display data summary
% 923(Train data) will be changed w.r to data number
plotRawSensorData(total_acc_x_train, total_acc_y_train, ...

%Create Table variable for train data
rawSensorDataTrain = table(...
total_acc_x_train, total_acc_y_train, total_acc_z_train);

%Extract features from Train raw sensor data
T_mean = varfun(@Wmean, rawSensorDataTrain);
T_stdv = varfun(@Wstd,rawSensorDataTrain);
T_pca = varfun(@Wpca1,rawSensorDataTrain);

humanActivityData = [T_mean, T_stdv, T_pca];
humanActivityData.activity = trainActivity;

%T_medn = varfun(@Wmedian,rawSensorDataTrain);
%humanActivityData = [T_mean, T_stdv, T_medn];

%classificationLearner calling,learning & export model

%Load Test Data (476 test data)
load rawSensorData_test

% Create Table variable for test data
rawSensorDataTest = table(...
total_acc_x_test, total_acc_y_test, total_acc_z_test);

% Extract features from Test raw sensor data
T_mean = varfun(@Wmean, rawSensorDataTest);
T_stdv = varfun(@Wstd,rawSensorDataTest);
T_pca = varfun(@Wpca1,rawSensorDataTest);

humanActivityData = [T_mean, T_stdv, T_pca];
humanActivityData.activity = testActivity;

%T_medn = varfun(@Wmedian,rawSensorDataTest);
%humanActivityData = [T_mean, T_stdv, T_medn];

%Using trained model(called trainedClassifier),
%Features and Test raw sensor data
%calling |*plotActivityResults| function & Show the result


Comment only
04 Mar 2016 Fan Yang

Server creation failed. Invalid ProgID how to solve it

02 Jul 2014 Shimmer Engineering Team

Changes since v2.1:

- Bridge Amplifier support for Shimmer3 (Shimmer2/2r equivalent is known as Strain Gauge)
- Improved filter implementation (using FilterClass.m)
- Functions for setting wide-range accelerometer high resolution and low power modes for Shimmer3
- Compatibility change signal names accelerometers (see User Manual section 'Differences between Shimmer2r and Shimmer3')
- Use of macros for enabling sensors
- Function specific warnings
- Revised comments
- pppgtoheartrateexample (Heart Rate from Photo Plethysmograph)
- Improved existing examples
- Firmware compatibility codes

Comment only
02 Jul 2014 Shimmer Engineering Team

Current release is v2.2.

Please note that BtStream firmware v0.4.0 or later is required for Bridge Amplifier functionality. Please download from

Comment only
24 Mar 2014 Shimmer Engineering Team

Current release is v2.1.

Please note that BtStream firmware v0.3.0 or later is required for ExG functionality. Please download from

Comment only
11 Oct 2013 1.2

- fix for BTStream (Shimmer3) and Boilerplate having the same version number
- updates to comments

16 Oct 2013 1.3

Rev 1.8
- Support for pressure sensor (Shimmer3)

21 Jan 2014 1.5

Rev 1.9
- Added support for GSR+ Expansion Board

29 Jan 2014 1.6

Removed unused scripts and folders, users should note that, BTStream firmware is required on the Shimmer device when using the Instrument Driver. Latest Version of BTStream should always be used, and is readily available on our website.

21 Mar 2014 1.7

- ExG support for Shimmer3 (including examples)
- Add battlimitwarning for Shimmer3
- Revised comments and warnings

02 Jul 2014 1.8

Please note that BtStream firmware v0.4.0 or later is required for Bridge Amplifier functionality. Please download from

02 Jul 2014 1.9

Re-uploaded rev2.2

13 Oct 2014 1.10

v2.3 - for full compatibility use with FW: BtStream v0.5.0 / LogAndStream v0.3.0.

- ExG lead-off support
- Get Expansion Board ID support
- LogAndStream FW support
- Configurable Baudrate support
- ecgtoheartrateexample (Heart Rate from ECG)

06 Mar 2015 1.11

v2.4 - for full compatibility use with FW: BtStream v0.5.0 / LogAndStream v0.3.0.
- Added resettodefaultconfiguration.
- Autoset data rates when Shimmer sampling rate is set.
- See Readme.txt for details.

15 May 2015 2.5

- Updated readfirmwareversion() for compatibility with FW versions BtStream 0.6.0 / LogAndStream 0.4.0 and higher.
- minor fixes/changes.

20 Oct 2015 2.6

v2.6 - for full compatibility use with FW: BtStream 0.8.0 / LogAndStream 0.6.0
- Improved ECGtoHR algorithm
- PC System Timestamps for sync.
- Three bytes timestamp support (BtStream 0.8.0/LogAndStream 0.6.0 and later).

Contact us