Part A: Basic Template Matching

Step 1: Collecting cyclical data

The template matching scripts are designed to show you the user where a particular pattern in the data occurs, even if its not a perfect match.  For this tutorial we will place a sensor on the L TA muscles, near the shin, and walk in a straight line for several steps.  Refer to the Acquisition body map to determine correct placement of the sensor.  Place the sensor, begin data acquisition, and take at least 10 steps in a straight line monitoring the acceleration from all 3 axes of the Trigno sensor.

 

Step 2: Determine template

The template can either be automatically detected, or user specified (see the documentation for the Template Finder script for more information on automatic detection).  We will specify our own template.  The template should envelope one distinct pattern, and be slightly shorter than one full cycle long.  See the selected template below.

 

Step 3: Run Calculation

This template extends from about 14.9 seconds to 16.6 seconds.  This will be the parameter Template Width

 

Step 4: Add second channel

Notice that in the results above, there are three sections that appear to be matches, but are not. Whether it was noise, not a good enough match, or a different reason, the calculation did not deem these good enough to specify a match..  In this case, a good way to improve the accuracy of matches is to use Multichannel Template Matching.  The Multichannel Template Matching calculation will look at a template from the same specified time, but in a different data series, and use its correlation as well to determine matches.  For instance, we are using the X accelerometer channel for the L TA, we could add in a different axis of the accelerometer, since it should have been seeing directly correlated events in the same times we are looking at. In this case we will use the Y axis.

Step 4: Run Multi Channel Calculation

The Multichannel Calculation is run the same way as the regular template matcher, except that an additional channel needs to be specified.  The calculation will perform a correlation between the additional channel and a template taken from the additional channel in the same time interval as the template specified.  This correlation data is used in conjunction with the correlation data from the input with the specified template to determine where matches occur.

Step 5: Display the Results

As seen in the results, this calculation resulted in all the matches being found.