
2  THE METHODOLOGY  
We try to spot regularities within the EMG data and 
to associate them to one of three classes: i) Non-
Fatigue, ii) Transition-to-Fatigue, and iii) Fatigue. 
Each class indicates the state of the muscle at a 
particulate time. 
The system works in two main stages: i) 
Training, where the system learns to match different 
signals’ characteristics with different classes, and ii) 
Testing, where the system applies what it has learnt 
to classify unseen data. 
In the training phase, the system processes 
filtered EMG signals and performs two major 
functions: i) Segmentation of the signals based on 
their statistical features, and ii) Classification of the 
identified segments based on their types (i.e., Non-
Fatigue, Transition-to-Fatigue, or Fatigue). For these 
tasks, GP has been supplied with a language that 
allows it to extract statistical features from EMG. 
Table 1 reports the primitive set of the system. 
Table 1: Primitive Set. 
Primitive Set  Input 
Median, Mean, Avg_dev, Std, 
Variance, Signal size, Skew, 
Kurtosis, Entropy, Zero crossings 
Vector of real 
number 
+, -, /, *, Sin, Cos, Sqrt 
Real Number 
 
The system starts by randomly initialising a 
population of individuals using the ramped half-and-
half method (Poli, Langdon & McPhee 2008). Each 
individual has a multi-tree representation. In 
particular, each individual is composed of one 
splitter tree, and two feature-extraction trees. (Multi-
tree representations of this kind are common in GP, 
and have been used, for example, for data 
classification in (Estevez & Pablo 25-28 September 
2007) ).  
2.1  Splitter Tree 
The main job of splitter trees is to split the EMG 
signals in the training set into meaningful segments, 
where by “meaningful” we mean that each segment 
indicates the state of a muscle at a particular time. 
The system moves a sliding window of size L 
over the given EMG signal with steps of S samples. 
At each step the splitter tree is evaluated. This 
corresponds to applying a function, f
splitter
, to the data 
within the window. The output of the program is a 
single number, λ, which is an abstract representation 
of the features of the signal in the window. The 
system splits the signal at a particular position if the 
difference between the λ’s in two consecutive 
windows is more than a predefined threshold θ. The 
threshold θ has been selected arbitrarily (θ = 10). 
Once the data have been divided into blocks, the 
system labels each block with one of the three 
identified classes based on the number of zero 
crossings in the raw EMG signal, i.e., the number of 
times the signal crosses the zero-amplitude line 
(details are in section 2.3). A good splitter tree 
should be able to place block boundaries at the 
transitions between three types of muscle states: i) 
Non-Fatigue, ii) Transition-to-Fatigue, and iii) 
Fatigue.  
Preliminary tests showed that an average EMG 
signal in our set has 50% of non-fatigue, 10% 
transition-to-fatigue and the remaining 40% is 
fatigue. Thus, the splitter tree can be considered to 
be good if it divides the signal into the three types of 
blocks with both meaningful proportions (i.e., 
fatigue > non-fatigue > transition-to-fatigue) and 
meaningful sequence (non-fatigue should appear 
before transition-to-fatigue and fatigue). Splitter 
trees that violate these conditions are discouraged by 
penalizing their fitness value (see section 2.4).  
2.2  Feature-Extraction Tree 
The main job of the two feature-extraction trees in 
our GP representation is to extract features using the 
primitives in  Table 1 from the blocks identified by 
the splitter tree and to project them onto a two 
dimensional Euclidian space, where their 
classification can later take place.  
We used a standard pattern classification 
approach on the outputs produced by the two 
feature-extraction trees to discover regularities in the 
training signals. In principle, any classification 
method can be used with our approach. Here, we 
decided to use K-means clustering to organise blocks 
(as represented by their two composite features) into 
groups. With this algorithm, objects within a cluster 
are similar to each other but dissimilar from objects 
in other clusters. The advantage with this approach is 
that the experimenter doesn’t need to label the 
training set. Also, the approach does not impose any 
constrains on the shape of the clusters. Once the 
training set is clustered, we can use the clusters 
found by K-means to perform classification of 
unseen data.  
In the testing phase, unseen data go through the 
three components of the evolved solution. Blocks are 
produced by the splitter tree and then projected onto 
a two-dimensional Euclidean space by the two 
DETECTING LOCALISED MUSCLE FATIGUE DURING ISOMETRIC CONTRACTION USING GENETIC
PROGRAMMING
293