# Event Detection of Muscle Activation Using an Electromyogram
## 1 Introduction  
Electromyography (EMG) is a method used to record electrical signals generated by muscular activities. EMG is related to muscle contraction and extension which can easily be recorded from the surface of the skin. Owing to these features, EMG is widely studied in various research fields, such as biomechanics, rehabilitation, and clinical diagnosis [1; 2; 3; 4; 5]. These applications require muscle activity information related to contraction or extension, and this information can be obtained by confirming the activation of EMG signals. Therefore, the muscle activity detection through EMG signal is a basic but crucial part of EMG applications [5; 6].  
The muscle activity detection aims to obtain both the onset and offset timing of EMG activity. The onset is defined as the beginning of a muscle contraction or extension, while the offset represents the end of a muscle contraction or extension. An easy technique to detect muscle activity is through visual inspection [7; 8]. However the visual inspection by experts is accurate but complex. Thus, various methods for automatic onset and offset detection have been studied [9; 10; 11; 12; 13; 14; 15; 16; 17].  
Most automatic detection methods are based on a threshold [9; 10; 11; 12]. These methods detect the event timing by comparing the mean of EMG signals in a sliding window with a certain threshold. The onset detection using the generalized likelihood ratio test has been studied [9; 10]. A single threshold is used for the onset detection only during a series of rapid upper limb movements [11]. Further, the onset detection based on Teager-Kaiser Energy method has been studied [12]. [PERSON] introduced a double threshold method where two thresholds were used to detect onsets of muscles from eight different locations under the waist [13]. Unlike the single threshold method, this method reduces the false alarm rate. Furthermore, other double threshold-based methods have been developed to increase the robustness to a noise level using EMG recorded from the upper and lower limbs [14; 15; 16; 17]. In addition, [PERSON] selected threshold based on the likelihood ratio test [10] where the optimal threshold was calculated via a likelihood ratio test. [PERSON] has attempted to achieve parameter optimization and then proposed an extended double threshold algorithm as a variant of the double threshold method [13]. However,these methods require optimization and an additional training process for parameter selection, thereby increasing the complexity of algorithm. Moreover, these conventional threshold-based algorithms are unable to accurately detect the offset timing.  
In this study, we proposed a novel method used to detect the precise onset and offset timing of muscle activity, during hand-close and hand-open movements. The adaptive threshold was determined using the constant false alarm rate (CFAR) algorithm, and the EMG signal is refined by morphological hole filling that closes up and fills out the missing information. To evaluate the performance, we calculated the estimated error of the onset and offset timing. Furthermore, the results were compared with the two conventional methods based on the double thresholds. The experimental results indicate that the estimated errors for both onset and offset detection are lower than those occurring in the two conventional methods. In addition, the proposed method does not require a training process unlike conventional training-based methods.