ProEMG 1.1 Documentation - Motion Lab Systems, Inc.

52 downloads 115 Views 889KB Size Report
available in the ProEMG Stand-Alone as plug-ins accessible from the Vicon Nexus and Vicon Workstation pipelines. The actual data capture is done with the  ...
ProEMG 1.1 Documentation  Author: Lasse Roren Released: June 2010

Contents  Introduction ...................................................................................................................................... 2 Installation......................................................................................................................................... 3 Dependencies.......................................................................................................................... 3 ProEMG Vicon Plug-ins ................................................................................................................... 4 ProEMG Lite ...................................................................................................................................... 5 ProEMG Stand-Alone Application ................................................................................................ 6 Using the Session View ............................................................................................................ 7 Using the Channel View ......................................................................................................... 7 Using the Live Controls ............................................................................................................ 8 Using the Graph View ...........................................................................................................10 Using the Processing Window......................................................................................................10 Defining a Pipeline.................................................................................................................11 Amplitude Normalization......................................................................................................16 Time Normalization ................................................................................................................16 Interacting with the Graph...................................................................................................18 Undo/Redo .............................................................................................................................18 Event Generation Schemes.........................................................................................................18 Running an Event Generation Scheme .............................................................................21 Parameter Generation Schemes................................................................................................22 Running a Parameter Scheme ............................................................................................24 Saving and Exporting....................................................................................................................24 Saving ......................................................................................................................................24 Exporting..................................................................................................................................25 Exporting to Microsoft Word ........................................................................................................25 Configuring the Word Template .........................................................................................25 ProEMG Documentation 

Page 1 

Setting up an Automatic Processing Scheme .........................................................................27

Introduction  The ProEMG software is designed to make the acquisition and processing of EMG signals easy. Regardless of whether you are using a system connected to a Vicon analog-to-digital converter (such as the MX Control, MX Ultranet HD or MX Giganet), or you are using an off-the-shelf analog-to-digital converter from National Instruments or Data Translation, the ProEMG software provides functionality that satisfy routine and advanced EMG processing needs. There are three versions of ProEMG: 1. ProEMG Lite. This version lets you capture data and export to Excel or an ASCII file. You can then process the data further using your own processing algorithms. 2. ProEMG Stand-Alone. This version has all the capture functionality of the Lite version, but adds advanced processing functionality, pipeline processing, automatic processing workflows and read/write support for C3D files. 3. ProEMG Vicon Plug-ins. This implements all the advanced processing functions available in the ProEMG Stand-Alone as plug-ins accessible from the Vicon Nexus and Vicon Workstation pipelines. The actual data capture is done with the Vicon software. Your licence may let you run any combination of the above three. Please contact Prophysics if you wish to extend your licence. The advanced processing functions include: •

Pipeline processing of the EMG signal. Available processing options include lowand high-pass Butterworth filters, notch filters, RMS/Moving average smoothing, Fast-Fourier transform, scaling and rectification.



Amplitude normalization based on calibration trials (such as maximum voluntary contraction trials).



Time normalization based on events. These can be specified in ProEMG or automatically imported from the Vicon Nexus software.



Data export from one or more trials direct to Microsoft Excel or Word.



Full read/write support for C3D files.



Full integration in the Vicon Nexus or Workstation processing pipelines.



Automatic generation of signal events such as the onset of muscle activity. Such events can be generated based on configurable thresholds.



Automatic calculation of key parameters, such as the muscle onset time as percentage of the gait cycle or integrated EMG.

There are two ways to access the ProEMG software: ProEMG Documentation 

Page 2 



Via the plug-in interfaces of Vicon Nexus or Vicon Workstation software.



Via the ProEMG stand-alone application.

Installation  The installation consists of two files, “Setup.exe” and “ProEMGApplicationInstaller.msi”. You can double-click on either of these and simply follow the instructions. The installer will, by default, install the software in the “C:\Program Files\” folder on your hard drive (or the equivalent in the local language for non-English Windows, for example “C:\Programme\” in German). The software has only been tested installed to this location, and may not work properly if you install to a different location. The installer will add a new folder called “Prophysics”, as well as a subfolder to called “ProEMG” where all the actual software is installed. NB: if you have Vicon software already installed on your PC, it is very important that you install the ProEMG software in the same root location. For example, if your Vicon software is installed at “C:\Program Files\Vicon”, then you must install ProEMG at “C:\Program Files”. The installer will then add a plug-in to the “Vicon” folder. If you do not have any Vicon software on your PC, the plug-in will still be installed, but cannot be used until Vicon software has been added.

Dependencies  •

Windows XP or Windows 7 operating system.



The ProEMG software depends on a software library from Microsoft called “.NET 3.5” (dot-Net 3.5). This library must be installed on your PC. The installer will automatically detect whether this is necessary, and the installation of .NET will start automatically. However, this is a very large installation, several hundred megabytes, so make sure that you leave enough time and/or have a fast enough internet connection. Check the Microsoft web site for more details on .NET.



Export to Excel requires Excel 2003 or later.



Export to Word requires Word 2007 service pack 2 or later.



The use of National Instruments or Data Translation analog-to-digital boards requires the latest drivers, available for download from the Web. Note that these drivers support a wide range of different boards with varying capabilities (capture rates, number of channels, resolution, etc.) The software should work with all boards supported by the drivers, but has not been tested with all of them. Please contact Prophysics Support if you have further questions.

ProEMG Documentation 

Page 3 

ProEMG Vicon Plug‐ins  The ProEMG plug-ins for Vicon software are available for both Vicon Nexus and Vicon Workstation. The installation program installs the necessary files for both software packages, even if only one of the two is installed on your PC. The plug-ins are called “ProEMG Automatic Processing” and “ProEMG Processing Window”. In Vicon Workstation, they appear in the list of plug-ins in the pipeline dialog, whereas in Nexus they appear in the list of available plug-ins under the “Workstation Operations” tree node. Both plug-ins work on data that has been loaded into the Vicon application. Therefore, unless you are using the plug-ins in batch processing mode, always load a trial before using the plug-ins. Please refer to the Vicon documentation for information on how to set up analog channels and how to capture the EMG data. This documentation assumes that a trial which has EMG or other analog data has been loaded. IMPORTANT! The ProEMG plug-ins need to know the name of the analog channels on which processing will be done. For technical reasons, the plug-ins can only discover the names of the channels when the plug-in is run. This means that when you first set up a pipeline, the plug-ins’ options dialogs cannot know the names of the currently available channels. Therefore, prior to setting up the options for a new pipeline, please run the plug-in once. The analog channel names will be cached, and you will subsequently be able to configure the options. Once a pipeline has been set up and saved, you will not have to redo this step. The ProEMG Processing Window allows access to all functions of ProEMG, and is intended for users who want full control and visibility of what is being done to the data. It exposes the following functions: •

View data graphically.



Set up ProEMG pipelines and inspect how the different processing methods affect the data.



Establish time and amplitude normalization values.



Add or edit events.



Set up automatic event generation schemes, to run such schemes, and to see how these perform on the data.



Set up automatic parameter calculation schemes, to run such schemes, and to view the data after it has been calculated.



Export data to ASCII files, or directly to Excel or Word.

Before the plug-in is run, you should set the Options, which simply specify which channels you would like to see in the Processing Window. This allows you to ignore analog channels that you do not wish to process, for example force plate channels.

ProEMG Documentation 

Page 4 

When the plug-in is run, the Processing Window will appear. This dialog is fully documented in the section “Using the Processing Window” on page 10. The ProEMG Automatic Processing plug-in is used to run a pre-configured automatic processing scheme. The scheme contains one or more processing steps, all of which can also be performed in the ProEMG Processing Window. However, as the name suggests, the automatic processing scheme performs operations automatically, and does not allow you to change parameters during execution. The concept is that one or more such schemes can be set up once, and then used for day-to-day routine processing to make the task of preparing, processing and reviewing the EMG data and the results as easy and streamlined as possible. Please refer to the section “Setting up an Automatic Processing Scheme” on page 27 for details on how to set the Options.

ProEMG Lite  The ProEMG Lite application lets you capture data from a National Instruments or Data Translation analog-to-digital converter, and to export the captured raw data to an ASCII file or to Microsoft Excel.

The ProEMG Lite version share all the functionality of the ProEMG Stand-Alone application, except that you cannot do any processing on the data, and you cannot ProEMG Documentation 

Page 5 

save the data as a C3D file. Please see the following section for instructions on how to use the interface.

ProEMG Stand‐Alone Application  You can use the ProEMG application to capture, store and process EMG data when your EMG system is connected to an off-the-shelf National Instruments or Data Translation analog-to-digital converter. Please make sure that you contact Prophysics Support for recommendations on what exact models to purchase if you have not done so already. You can also use the ProEMG application to load, process and save previously captured data either in the raw ProEMG format or in C3D format, even if no analog-todigital converter is connected. The software is straightforward to use. Once it has been started, the main window will appear. The window looks like this:

The window divides into the following sections: 1. Top left is the Session View which lists the trials in the current session. 2. Top middle is the Channel View which lists the channels in the currently open trial or the currently connected analog-to-digital system. ProEMG Documentation 

Page 6 

3. Top right is the Live Controls which contains the settings for data acquisition. 4. Bottom is the Graph View which shows a single channel of live or recorded data.

Using the Session View  The Session View lists all the trials in the current session. A session is simply a folder on your hard drive where the trial files are kept. You can change the session folder by clicking on the button labelled “…” to the right of the session folder path. The Session View lists the following information for each trial: •

Trial Name. This is also the stem of all the file names relating to the trial in the session folder.



Files. The pink A symbol represents the raw data, the green P symbol a C3D file containing processed data.



Trial Type. This is simply the trial type used when recording the trial.



Mark. This column allows you to mark a trial for export or automatic processing. Double-clicking in this column will result in a little tick mark being shown for the selected trial.



Description. Simply a user-entered string that describes the trial, for reference purposes only.

The session view allows you to run an automatic processing scheme directly from the ProEMG main window. This requires you to first set up the scheme by clicking the “Edit” button at the bottom right hand corner of the Session View, and following the instructions in the section “Setting up an Automatic Processing Scheme” on page 27. Once you have set up one or more Automatic Processing Schemes, they will appear in the drop-down menu at the bottom of the Session View. To run a scheme for one or more trials, simply double-click the trials “Mark” column to mark the trial for processing, select the desired scheme and click the “Run” button to execute the scheme. You can also edit the trial’s Description by double-clicking the “Description” column and editing the text box. Finally, you can quickly export the raw data to either an ASCII file or Excel by first marking the trials you wish to export, and then clicking either the “Excel” or “ASCII” button just below the list of trials. Note that the ASCII export results in a CSV (Comma Separated Value) file being generated, which has the same file stem name as the original trial.

Using the Channel View  The Channel View allows you to select which trial to show in the Graph View. The Channel View lists all the available channels either from the currently open trial, or from the currently connected analog-to-digital system. The background colour of the Channel View reflects whether the current list is from a trial or from the system.

ProEMG Documentation 

Page 7 

The button labelled “Process” at the top of the Channel View opens a separate Processing window, which allows you to do advanced processing of the data. This window is described in the section “Using the Processing Window” on page 10.

Using the Live Controls  Assuming that you have connected the analog-to-digital system, and that all drivers are correctly installed, ProEMG will automatically detect the system and initialize it. The background colour of the Live Controls section of the console will reflect this. By default, if the system is working properly, the background colour will be light green, whereas if it is not connected, the background colour will be light red. Click the button labelled “Show Live Channels” to activate the Live Controls. The first thing you need to do is to set up a Trial Type. A Trial Type lets you select which of the available channels to capture, what to name the channels, what voltage range to use, what colour to associate with the signal, and what scale factor, offset and unit the signal has. To set up a Trial Type, click the “Edit” button next to the trial type drop-down menu. A dialog box appears:

The dialog box lists all the available channels. To create a new Trial Type, click on the button next to the “Trial Type Name” drop-down menu. The text in the drop-down will change to “Type Name + ”. You must then type in a relevant name for the trial type and press the Enter key. Once you have done this, you can edit the trial type as follows: •

Double click in the “Channel Name” column to edit the name of the channel. For example, if you intend to use “Channel0” on the Left Hamstring, you could

ProEMG Documentation 

Page 8 

change the name to “Left Hamstring” so that it is easier to locate the relevant data once data has been captured. •

Double click the “Number” column to toggle whether a channel should be captured or not.



Double-click the “Range” column to select the channel range. The available choices are +/- 10V, +/- 5V, +/- 2.5V and +/- 1.25V. IMPORTANT: depending on the capabilities of your actual analog-to-digital hardware, these ranges may not all be available. Some devices support only a limited number of ranges, whereas others are more flexible. Please consult the documentation for your particular device to see what ranges are available.



Double-click the “Colour” column to change the colour associated with the signal. This is the colour that will be used when graphing the signal in ProEMG.



Double-click the “Scale”, “Offset” and “Unit” columns to specify the calibration factors and unit of the signal. If, for example, you are setting up an accelerometer, the manufacturer of the accelerometer will supply calibration values that transform the signal from the recorded voltage to an acceleration.



You can also change the sample frequency and set a maximum duration for the trial at the bottom of the dialog.



In order to save the changes to the Trial Type, make sure you click the Save button in the top right hand corner before you close the dialog.

Once you have your Trial Type(s) set up, you can choose which one to use in the dropdown menu in the Live Controls. Additionally, you can choose a name for the next trial to capture, and optionally a description. The trial duration and sample frequency will be taken from the Trial Type, but you also have the option to override this on a trial-by-trial basis using the Live Controls. Once you have everything set up for capturing a trial, you can click the “Start” button. The “Start” button will, once it has been pressed, change to become a “Stop” button. If you have not selected a maximum duration for the trial, the system will capture the trial until either you manually press the “Stop” button, or the hard disk is full. It is highly recommended to press the “Stop” button. If you prefer NOT to complete the capture, for example if something goes wrong in the middle of the capture, you can cancel the capture by pressing the “Cancel” button, and try again. Once the trial has been captured, it will immediately appear in the Session View. If you want to review the data straight away you can click on it, and using the Channel View select the channel you wish to inspect. Then click on the “Show Live Channels” button again when you are ready to capture the next trial.

ProEMG Documentation 

Page 9 

Using the Graph View  The Graph View is mostly for display purposes, and will always show the data from the graph that is selected in the Channel View, regardless of whether it is from a trial or from the Live System. A live graph will scroll from right to left, so that the most recent data is always added to the right hand side of the graph. Graphs from captured trials show the whole data set. When viewing a live graph, you can change the number of seconds of historical data shown in the graph by typing the number of seconds into the “Graph Window Time Base” edit box and the clicking the “Set” button. By default, the Y-axis on the graph will scale to fit the data. However, if you prefer a fixed scale, you can tick the “Fixed Range” tick box and enter a Y-axis range, in Volts, in the text box just to the right. The Y-axis will be scaled centred around zero, from minus to plus your entered value. You can also apply a Processing Scheme to the captured data, if you wish. The “Processing Scheme” drop-down allows you to do this, assuming you have set up processing schemes already. For more information on how to set up processing schemes, see the section ”Defining a Pipeline” on page 11. If you wish to see the raw data, make sure that this drop-down menu reads “NONE”. The following lists the interactions you can perform on a graph view: •

Zoom on axis. Press and hold the left mouse button anywhere in the axis area of the horizontal or vertical axis. Move the mouse left/right for the horizontal or up/down for the vertical axis, and you will see an outline rectangle between where you pressed and the current mouse position. Release the left mouse button to zoom in on the outlined area.



Zoom on graph. Press and hold the left mouse button anywhere in the graph area. Move the mouse in any direction and an outline rectangle will be shown between the current point and the originally pressed point. Release the mouse, and both axes will zoom to show the outlined area of the graph.



Zoom out on axis. Click the right mouse button on either the horizontal or vertical axis to zoom to the previous zoom position.



Restore axis. Double-click the right mouse button on either the horizontal or vertical axis to restore the original axis and show the entire data set.

Using the Processing Window  The Processing Window is displayed when you do the following: •

In the ProEMG stand-alone application, you click the “Process” button just above the Channel View.



In either Vicon Nexus or Vicon Workstation, when you process the plug-in named “ProEMG Processing Window”. NB! Note that the Processing Window described

ProEMG Documentation 

Page 10 

here is not the Options dialog for this plug-in. The dialog appears when you process the plug-in in a pipeline. The Processing Dialog looks like this:

Defining a Pipeline  A pipeline is simply a collection of mathematical functions, and the relevant parameters, that will be applied to the data. For example, a pipeline could perform low- and high-pass Butterworth filtering and smoothing of the data, with specific options, all in one single operation. NB! Note that if you are running ProEMG from within Vicon Nexus or Vicon Workstation, the ProEMG pipeline is separate from the Vicon software’s pipeline. In this case, the ProEMG pipeline effectively becomes a pipeline within the Vicon pipeline. The three buttons to the right of the “Pipeline” drop-down menu are for creating, editing, and saving a pipeline. To create a new one, click on the leftmost button of the three. You will be asked to name the pipeline. Once this is done, you can click the middle button to edit. When editing, use the “Add” button to add a new operation. A shortcut menu appears which contains all the available processing options. You can choose between:

ProEMG Documentation 

Page 11 



Butterworth low-pass filter. This is a standard low-pass filter used to remove the higher frequency components from a signal.



Butterworth high-pass filter. This is a standard high-pass filter used to remove the lower frequency components from a signal.



Notch filter. The notch filter is used to remove frequencies in a narrow band at a specific part of the spectrum. If, for example, your signal has been contaminated by interference from the mains at 50Hz, you can use this filter to “rescue” the data. However, note that the notch filter will affect neighbouring frequencies, and also remove the components at this frequency from your original signal.



Centre on Zero. Calculates the average value of the signal and subtracts this value from every data point.



Rectify only. This takes all the negative values in the signal and makes them positive.



Moving average smoothing. Rectifies the signal and then applies a standard moving average with the window width specified in the options.



Root mean square smoothing. Rectifies the signal and then applies a standard root mean square smoothing with window width specified in the options.



Differentiator. Numerically differentiates the signal using, optionally, a 3-point or a 5-point differentiator.



Scale Signal. Allows you to specify a scale factor and an offset to apply to the signal.



FFT Window. Using a selectable Fast Fourier Transform (FFT) window width, this function moves the window across the entire data series, and calculates the mean, median or power spectrum for each possible point. This allows you to graph how these values change over time. NB! This function can take a long time to complete, especially if there are very many data points and/or if the window width is large.



Fast Fourier transform. Transforms the signal from the time-domain to the frequency domain, showing the signal’s frequency components at different frequencies. You can use this to analyse the raw signal, or to see how different filters affect the frequency components of the signal. The output graph will split in two, the top half showing the signal and the bottom half showing the frequency spectrum, with the mean and median frequencies marked. The top half will also show the window actually used to calculate the FFT. Note that this window has to be of size 2^N where N is an integer. Clicking on, and dragging, the window in the top graph lets you move the FFT window and automatically updates the frequency spectrum shown below.

You can add as many processing steps as you like. To remove a processing step, click on it and click the “Remove” button. You can also re-order the processing steps by clicking on a step and dragging it to its desired position.

ProEMG Documentation 

Page 12 

The following Processing steps have options dialogs enabling you to set the processing options.

Butterworth High/Low-Pass Filter



Cutoff frequency. This follows the standard definition of a Butterworth filter’s cutoff frequency.



Establish DC level. This allows you to specify that the first few frames will be used to establish the DC level of the signal. This assumes that the first few frames does not contain any actual signal.



Reverse Filtering. Ticking this option means that the Butterworth filter will be run both forwards and backwards on the data. Running the filter one-way only introduces a phase shift, so this is the simplest way to get around this problem.



Filter order. Allows you to select either a 2nd or a 4th order filter. The 4th order filter has a faster attenuation rate at the cutoff frequency.

Moving Average/Root Mean Square Smoothing

Specify the smoothing window size in milliseconds.

ProEMG Documentation 

Page 13 

Notch Filter

The frequency is the frequency around which the notch is centred. The steepness factor controls how steep the cut-off towards the centre frequency is. The higher the number, the less neighbouring frequency will be affected. It is recommended that you use a Fast Fourier Transform to check the filter’s impact in the frequency domain at different steepness factors.

Differentiator

Select “3 Points” for a differentiator using only the points either side when calculating the curve’s slope. Select “5 Points” to use two points either side. When you change parameters and settings in the processing pipeline, you can immediately observe the effects on the data set in the graph at the bottom of the Processing Dialog. Once you are happy with you settings, make sure you click the “Save” button (the right hand one of the three next to the Processing Scheme drop-down).

Scale Signal

Type in the desired scale factor and offset to apply to the signal.

ProEMG Documentation 

Page 14 

FFT Window

The top half lets you specify the desired window width used when calculating the FFT. The bottom half lets you choose whether to calculate the mean or median frequency, or the power spectrum.

Fast Fourier Transform

This simply lets you specify the window width used when calculating the frequency spectrum using the Fast Fourier Transform (FFT) algorithm.

ProEMG Documentation 

Page 15 

Amplitude Normalization  Amplitude normalization is based on defining a voltage per channel which is used as a reference voltage. This voltage is then used for the rest of the capture session to normalize the EMG signal for that particular channel. To define a normalization voltage for a particular channel, you can either type the value in manually, or you can extract it from the currently shown graph. To extract it from the graph, you choose the Processing Scheme you want to use, choose the channel you wish to normalize from the Channels list and then press the “Get Value” button in the “Amplitude Normalization” group. The software will automatically extract the peak value from the current graph and show it in the “Normalization Value” edit box. Note that if your normalization trial has several “bursts” of muscle activity and that you prefer, for whatever reason, a “burst” that has a smaller amplitude than another, you can simply zoom in on this section of the data and then click “Get Value” again. For details on interacting with the graph, see the section below. Also note that if a normalization value has already been defined for a channel, the voltage as well as the point at which it was taken will be shown on the graph as two orange lines intersecting in the normalization value.

Time Normalization  Time Normalization is done using events. An event defines a single point in time, and is normally associated with some physical event, for example heel contact or toe off during walking, but you can use these events to define any significant occurrence you want. Events can either be defined in the Processing Dialog, or they can be imported from the Vicon Workstation or Vicon Nexus software packages, if the Processing Window is accessed via a plug-in to these. If you are using the ProEMG stand-alone application, all event definition happens in the Processing Dialog. You can do the following types of event editing in the Processing Window: 1. Add event. To add an event all you need to do is to choose the type and context of the event, and then double-click on the horizontal axis (the timeline) in the graph at where you would like to add it. There are three types of event: Contact, Off and General. There are also three types of contexts: Left, Right and General. Choose the type and the context using the drop-down menus in the “Add Event” group box below the graph. Note that as soon as you have doubleclicked on the horizontal axis, the event will be shown, by default, in red for left context, green for right context and blue for general context. The event will be shown as a vertical line, with a symbol defining the event’s type at the bottom. 2. Edit event. You can change an event’s position on the time bar simply by clicking on its symbol just below the horizontal axis and dragging it to its new position. 3. Delete event. Delete an event simply by double-clicking on the event’s symbol. ProEMG Documentation 

Page 16 

The ProEMG time normalization is based on Time Normalization Schemes. These schemes can be defined by clicking on the “Edit Schemes” in the “Time Normalization” group box. If you do this, the following dialog will appear:

A time normalization scheme is based on a Start Event and an End Event, which together define the normalization cycle. Furthermore, you can optionally define a Next Scheme which defines which type of normalization follows. For repetitive trials, such as a walking trial which has several gait cycles in it, this will normally be the same scheme. However, other studies, for example in sports, may be require a different scheme to follow. To create a new scheme, click the “New” button and type in a relevant name for the scheme. When you do this, the controls in the lower half of the dialog will become active, and you can select the context and type for each event. Once you are finished, click the “Save” button. If you wish to edit an existing scheme, select it in the list and click the “Edit” button. Finally, the “Delete” button deletes the chosen scheme from the list. Once you have defined the required Time Normalization Schemes, you can start using them in the main Processing Dialog. When you select a Scheme, it will be applied to all the variables that are currently selected (and therefore graphed). You must therefore first select the variables and then select the scheme you wish to apply from the dropdown menu. When a scheme is applied, and assuming events have been defined, the graph will show the normalization cycles for each variable as a line with two arrows between the two events that define each cycle.

ProEMG Documentation 

Page 17 

You can now choose to show the data time normalized by selecting the “Timebase” check box from the “Normalize” group box in the lower left hand corner of the Processing Dialog. Additionally, if you have defined multiple normalization cycles, you can choose to show either the average, with the standard deviation, of the cycles, or you can choose to overlay them. Select this option from the “Multiple Cycles” group box below the graph.

Interacting with the Graph  The basic methods for interacting with the graph are described in the section “Using the Graph View” on page 10. Additionally, in the Processing Window’s graph, you can: •

Add event. Double-click on the horizontal (time) axis to add an event of the type specified by the drop-down menus in the “Add Event” group box.



Edit event. Click and drag the event symbol just below the horizontal axis to change the event’s position in time.



Delete event. Double-click on the event’s symbol to delete it.



Delete normalization cycle. When you apply a normalization scheme to a channel, all possible cycles will be identified. However, if you would like to remove one of the cycles, for example if it contains data you do not trust, you can do this by double-clicking on the double-headed arrow that shows the cycle. The operation is undoable (see below). If you re-apply the normalization scheme, any individually deleted cycles will reappear. If you save the trial, the cycles that have been deleted will remain so.

Undo/Redo  Operations that change the underlying data are undoable. You can undo an operation by clicking the Undo button on the toolbar ( ), or you can use the shortcut ctrl-Z. If you want to redo something you have just undone, you can click the Redo button ( ), or use the shortcut ctrl-Y.

Event Generation Schemes  The Event Generation Scheme functionality in ProEMG is designed to make the automatic generation of key timing events, such as muscle onset, quick and easy. To define an Event Generation Scheme, click the button labelled “Edit Schemes” in the group “Event Generation Schemes” at the bottom of the “Processing” dialog. The following dialog will be shown:

ProEMG Documentation 

Page 18 

Direct after installing ProEMG, only the example schemes are available from the dropdown menu at the top. You can either choose one of them and select the “Edit” button ( ) to the right of the drop-down, or you can click the “New” button ( ), type in a name for the scheme, press the Enter button on your keyboard and then click the “Edit” button. This lets you edit the Event Generation Scheme. Add an event by clicking the “Add” button. You can now use the lower half of the dialog to specify how this event will be generated. The lower half reads left-to-right and top-to-bottom. First, you specify the type of event you wish to generate. There are two types of events: •

Standard. Choose from the three standard events: Contact, Off and General, in the three standard contexts: Left, Right and General. The Standard events are used to define the time normalization cycles defined by the Time Normalization Scheme. Important! These events are synchronised with the Vicon software, if you are running the plug-in version of ProEMG. In other words, any events of the Standard type that is generated with ProEMG will, when saved, be transferred back to Vicon Nexus or Vicon Workstation.



User Defined. This event type is not pre-defined, and you are free to define whichever type of event you like. Typically, this is used for events that are specific

ProEMG Documentation 

Page 19 

to a particular EMG channel as opposed to common for the whole trial. Examples are muscle onset and muscle off events, the timing of which is unique to the channel being processed. You can edit the user defined events by clicking the “Edit” button. Next you can define the condition for the generation of the event. First, you must specify which channel the event relates to – you can choose “ALL CHANNELS” to generate the event for all the available channels or you can specify the channel name explicitly. The event is generated when the data in the channel satisfies a specific condition. The available conditions are: •

Goes above. The event will be generated at the first sample where a data point for the channel is above a threshold, when previously having been below.



Drops below. The events will be generated at the first sample where a data point for the channel is below a threshold, when previously having been above.



Attains maximum value. The event is generated at the sample where the graph has its maximum value in the timing context.



Attains minimum value. The event is generated at the sample where the graph has its minimum value in the timing context.

The first two conditions, “goes above” and “drops below”, also depend on a threshold. This is defined in the next two controls. First, a text box lets you enter a value – this value is directly related to your choice in the drop-down control immediately to its right: •

Volts. The threshold is an absolute value specified in volts.



% of maximum value. The threshold is calculated as a percentage of the signal’s maximum value. For example, if you enter 20 in the text box, and the maximum value of the signal is 1.4 volts, the threshold value will be 20% of 1.4 volts = 0.28V.



% of range. The threshold is calculated as a percentage of the signal’s range, in other words the difference between the signal’s maximum and minimum values. For example, if you enter 10 in the text box and the maximum value of the signal is 3V and the minimum 1V, then the range is 2V and the threshold becomes 10% of this on top of the minimum value = 1.2V.



x baseline noise stdev. The threshold is calculated from the standard deviation from the signal’s baseline noise. The threshold is put at the number in the text box times the baseline noise. The baseline noise calculation has an extra two parameters that you can set: the number of samples from which to calculate it, and whether to use processed or raw samples. The calculation is straightforward: the channel data is searched for the continuous group of samples with the lowest standard deviation. The group size is the one you specify, for example 100 continuous samples. If you choose raw samples, then whatever processing (filters, smoothing, etc) you are using on the data will be ignored, so you get the real baseline standard deviation. It is important to make sure that the raw data has “quiet” periods where there is no signal, just noise, longer than the number of

ProEMG Documentation 

Page 20 

samples you use for the baseline calculation, otherwise the baseline will also contain some of the actual signal and will be larger than just the noise. Finally, you must specify the timing of the event. First, you can specify the Minimum Duration of the condition signified by the event. For example, if your event determines a muscle onset, you can specify here that the muscle has to be on for at least a number, say 100, milliseconds. This means that the event will only be generated when the muscle crosses the threshold and then stays above the threshold for at least 100ms. The main purpose of this is to avoid false events caused by noise in the signal where the signal hovers around the threshold. Then you can select when the event will be generated. This depends on what normalization schemes you have applied to your trial. You have three choices as to when the event will be generated, every time, the first time, and the last time the event generation condition happens, and then four choices for the time span, the whole channel, every cycle, the first cycle and the last cycle. If you have no normalization scheme applied to your channel, you should only use the whole channel choice. Depending on your choice in the first drop-down, the event will then be generated either whenever the condition is satisfied for all the data in the channel, or the first time, or the last. If you generate a maximum or a minimum event, only one event will be generated. If you do have a normalization scheme, and one or more normalization cycles are defined for the channel, the choices every cycle, the first cycle and the last cycle allows you to specify exactly when you would like your events to be generated. For example, if you add an event when the maximum value is attained, but you choose to do for every cycle, the local maximum for each cycle will be identified. Finally, you can add a dependency on the existence of other events. This can be extremely useful to avoid unwanted events to be generated, as it lets you specify, for example, that a “Muscle Off” event can only ever follow directly behind a “Muscle Onset” event. To activate this function, tick the “but only if” tick box, and specify another event type that has to happen either before or after this event. For example, the muscle off event could have a condition that it must happen after a muscle onset event, and vice versa. Once you have selected your event generation condition, and supplied the timing information, for all the events you wish to generate with the current scheme, click the Save button next to the Event Generation Scheme drop-down ( ) before exiting the dialog, or your changes will be lost.

Running an Event Generation Scheme  To run an event generation scheme, you have to choose the scheme you wish to run from the drop-down in the “Event Generation Schemes” group in the main Processing window, and click the “Run” button. As soon as you click this, you will see the results: all new events will be displayed in the graph(s) in the Processing window.

ProEMG Documentation 

Page 21 

Occasionally, the event generation scheme may generate false events that you may wish to get rid of. To remove these extra events, double-click on the event’s symbol in the graph window. Remember that if you make a mistake, you can always undo this. If you wish to clear all events that you generated, you can use the “Event Handling” group just below the graph, and click the “Erase events from: Channel” button. This will erase all the events relating to the currently visualized channel(s). The “Erase events from: Trial” button, on the other hand, will erase all events that relate to the whole trial (such as events defining the normalization cycles).

Parameter Generation Schemes  Parameter Generation Schemes allow you to quickly configure and calculate key parameters. The concept is similar to the other schemes used in ProEMG – you set up the scheme once and then use it repeatedly to obtain your results. To display the Parameter Generation Scheme dialog, click the “Edit Schemes” button in the “Parameter Schemes” group at the bottom of the Processing dialog. The following dialog will be displayed:

Using the dialog will be familiar: •

Click the New button ( ) to create a new scheme, enter a name for the scheme and hit the Enter key on your keyboard.



Click the Edit button (



Click the “Add” button to add a new parameter to the scheme currently being edited.



Click the Save button ( ) once you have finished editing to save your changes.

) to edit the currently selected scheme.

To set up a parameter you must do as follows: ProEMG Documentation 

Page 22 

1. Enter a name for the parameter. You can type whatever you want here, but it is highly recommended to choose a parameter name that reflects what is being calculated. 2. Choose what the parameter will calculate. You have the following choices: a. The time of First Event as percentage of Normalization Cycle. The parameter calculates the timing of the First Event, as specified in the relevant drop-down box, as a percentage of the normalization cycle in which the event is found. This could for example be the timing of the muscle onset of a specific muscle as a percentage of the gait cycle. b. Time from First Event to Second Event as percentage of Normalization Cycle. This calculates the time between two events as a percentage of the total time of the normalization cycle that contains them. For example, this could be the percentage of the gait cycle which a muscle is “firing”. c. Time from First Event to Second Event in seconds. This is the same as the parameter above, except in seconds rather than as a percentage. This parameter does not require any normalization scheme. d. Integrated from First Event to Second Event. This calculates the area under the graph from the timing of the First Event to the Second Event. e. RMS from First Event to Second Event. Calculates the RMS value for the samples between the first and second events. f.

Median Frequency from FFT, window centred on First Event to Second Event. Calculates the median frequency of the frequency spectrum from a Fast Fourier Transform based on a power-of-2-number of samples, where the sample window is centred on the samples between first and second events.

g. Mean Frequency from FFT, window centred on First Event to Second Event. As above, but returns the mean rather than median frequency. h. Total Power from FFT, window centred on First Event to Second Event. As above, but returns the total power of the frequency spectrum. 3. If applicable, choose the pipeline to use with the data prior to the calculation of the parameter. If your parameter is based on the results of an FFT, the pipeline must also include the FFT process. 4. Choose the timing. Depending on your choice in the previous step, you will have to choose the type of the First Event, the type of the Second Event, and – if a normalization scheme applies – what the scheme is. For the scheme, you have the choice of choose the Assigned Scheme which is simply the scheme which is currently assigned to the variable in question, or you can also choose the variable to adopt a specific scheme for the purpose of the parameter calculation. 5. Choose the channel(s) for the parameter calculation. The default is “ALL CHANNELS”, which means that the parameter will be calculated for all channels ProEMG Documentation 

Page 23 

where the relevant events have been defined. However, if you would like to calculate a parameter that is based on only a single channel, or perhaps information from two different channels (for example the timing of one muscle onset to another), you can specify using the drop-down menus in the “Timing” section.

Running a Parameter Scheme  Once you have set up one or more parameter schemes, you can execute the schemes simply by selecting the relevant scheme in the drop-down menu in the “Parameter Schemes” group below the graph in the Processing window, and clicking the “Run” button. A dialog box will pop up, showing you the channel name, the name of the parameter calculated for this channel, the normalization cycle number, and the parameter’s calculated value. Note that the parameters are calculated for all channels, and for all available normalization cycles and events for each channel. If you expected more parameters to be calculated than the ones shown in the dialog, this could be due to the following reasons: •

The channel may not have a suitable normalization scheme applied to it.



The channel may not have suitable events to define the different normalization cycles.



The channel may not have the correct events within the normalization cycles to calculate the parameter.

If you run multiple schemes, parameters will be added to the parameter storage. If you would like to clear the storage, you can click the “Clear” button, and you can also click the “Show” button to display the currently stored parameter at any time.

Saving and Exporting  Saving  When you are finished calculating events and parameters, you can save the trial by clicking on the Save button on the toolbar ( ). This will write the data back to the open trial if you are running ProEMG as a plug-in from the Vicon software, or it will save the trial to disk if you are using ProEMG stand-alone. Important! When you save from ProEMG plug-in, the “save” operation does not write a data file to the hard disk. You still have to save from within Vicon Workstation or Vicon Nexus before the data is actually saved. When you save from ProEMG stand-alone, a C3D file is written to the hard disk, or an existing one is overwritten with new data. This C3D file is compatible with most software that reads/writes C3D file, including all Vicon software packages.

ProEMG Documentation 

Page 24 

Exporting  There are three main data export options in ProEMG, all available from buttons on the toolbar. •

Export to Excel ( ). This will open Microsoft Excel in the background, transfer all the data from the current trial into a new Worksheet, and then let you choose whether to continue exporting data from a different trial (into the same Workbook, but a new Worksheet), or to release the Workbook and show Excel.



Export to ASCII ( ). This writes a Comma-Separated Value (CSV) file to disk, with the same file name as the trial, and in the same session folder.



Export to Word ( ). This lets you export data to a pre-defined Microsoft Word template, allowing you to generate a report automatically. Please see the chapter “Exporting to Microsoft Word” on page 25 for more details.

Exporting to Microsoft Word  Requires Microsoft Word 2007 Service Pack 2 or later! The functionality enabling you to export data from ProEMG to Microsoft Word is designed to let you generate a printable report quickly and easily. The workflow for setting up the template is as follows: 1. Create a new Word Template, or edit an existing one, to include one or more charts in which one or more channels will be exported. 2. Load the Word Template into the Word Setup dialog in ProEMG. 3. Specify what data should go into what charts in the template, and the appearance of the individual traces. 4. Save the template. 5. Use the template routinely to quickly generate printable Word reports containing EMG data.

Configuring the Word Template  To configure an existing Word Template, click on the symbol on the ProEMG processing window’s main toolbar. The following dialog will be displayed:

ProEMG Documentation 

Page 25 

As always in ProEMG, the workflow is left-to-right and top-to-bottom. Therefore, you start at the top by selecting the Word Template you would like to edit. ProEMG automatically scans the ProEMG\WordTemplates folder and displays all .dotx files found in this folder in the drop-down list. To add a new Word Template, either create a brand new one using Microsoft Word, or copy an existing one, and make sure that the .dotx file is saved in the WordTemplates folder. Once you have selected the desired template from the drop-down, click the “Load” button to load the template. ProEMG will at this point scan the template and look for chart objects (graphs). Each object it finds will be added to the “List of Graphs in Word Template” list, and each chart will be identified with an index as well as the graph’s caption. To edit what data should be exported to what graph, you need to click on one of the charts. If this has already been customized, you will see one or more channel names appear in the “Traces” section of the “Properties of Selected Graph” group box. You can add a new trace by clicking the “Add” button, or remove an existing one by clicking the “Remove” button. You can also choose whether the trace should be exported to Word time and/or amplitude normalized by ticking the relevant option. Using the “Selected Trace Properties” group box, you can set the exact appearance of the exported trace, such as colour, line thickness and style, as well as the pipeline to be applied to the data prior to export, and whether to export average or standard deviation of the data for time normalized data series. ProEMG Documentation 

Page 26 

Finally, if you wish to export several trials to the same Word Template, you can also choose to change the appearance of the trace depending on either the description of the trial (from the data management) or the export order number of the trial. Select either “all selected trials”, “only trial exported as number”, or “only trial(s) with description” from the “Export from” drop-down menu, and select the relevant export parameter from the drop-down immediately to the right. Finally, once you have configured the Word Template for export, make sure you click the “Save” button. You can also click the “Edit” button if you wish to have a look at the empty Word Template.

Setting up an Automatic Processing Scheme  The Automatic Processing Scheme is the easiest way to use ProEMG. The idea is that one or more automatic processing schemes can be set up, and then subsequently used routinely to perform day-to-day tasks without being exposed to the whole range of functionality within ProEMG. In other words, it allows a simpler, more streamlined user interface that lets the user do pre-configured tasks. To set up an Automatic Processing Scheme, either click the “Edit” button in the main ProEMG stand-alone application window, or configure the Options of the pipeline operation “ProEMG Automatic Processing”. If you are using the “ProEMG Automatic Processing” plug-in, you first have to select which channels are relevant to the task. This allows you to ignore all channels you know you will not need, for example the force plate channels. The following dialog is displayed:

Once you have selected the relevant channels in the above dialog, or if you are using ProEMG stand-alone, you will see the following dialog:

ProEMG Documentation 

Page 27 

This dialog lets you set up a “to-do” list of different tasks that should be performed. The following tasks are available: •

Run Pipeline. This runs the selected pipeline on the selected channels.



Time Normalize. Specifies that the selected channels should be time normalized.



Assign Time Normalization Scheme. Assigns the specified time normalization scheme to the selected channels, but does not time normalize the data.



Amplitude Normalize. Specifies that the selected channels should be amplitude normalized.



Run Event Scheme. Executes the specified event scheme on the current data.



Run Parameter Scheme. Executes the specified parameter scheme on the current data.



Export to Excel. Exports the current data to Microsoft Excel.



Save Trial. Saves the current data. In ProEMG stand-alone, this will save a C3D file. In ProEMG Vicon Plug-in, this will write the data back to Vicon Nexus or Vicon Workstation, but will not save the data until that operation is done in the host software.



Export to Word. Exports the current data to Microsoft Word.



Show Data for QA. This breaks the automatic workflow to allow the user to manually verify the data. This lets the workflow incorporate a step where the user reviews the data, and possibly corrects mistakes made by the automatic

ProEMG Documentation 

Page 28 

processing. In particular, if the automatic event generation algorithm has made a mistake, this step will let the user correct these mistakes before further processing, such as parameter calculation, is done. To add or remove steps to the workflow, use the “Add” and “Remove” buttons at the bottom of the dialog. All operations can be edited simply by clicking on the operation and changing the relevant parameters. For example, if you want to update the pipeline that is run by a “Run Pipeline” operation, simply click on this step and select a new pipeline from the list on the right. Similarly, if you wish to update the actual channels on which an operation is applied, select the operation and change the highlighted channels on the right. Use the “Move Up” and “Move Down” buttons to re-arrange the order in which operations are performed. Finally, use the Edit buttons in the top right hand corner to review or edit the individual schemes and pipelines on which the automatic processing schemes rely. When you have configured and set up everything, make sure you click the Save button before exiting the dialog!

ProEMG Documentation 

Page 29