Background technology
Along with the develop rapidly of microelectric technique, sensor technology and computer technology, handheld mobile device, Wearable and microcomputer are universal in people's daily life gradually.Such as, but due to the restriction of use scenes and mini-plant, traditional human-computer interaction device, the equipment such as keyboard, mouse can not meet the demand of people.Transportable miniaturization gesture identification equipment is suggested as novel human-computer interaction device.
Muscle electric signal, since being used in control field, experienced by the development of last 100 years, is always studiedly applied to medical diagnosis and bio-mechanical field.Along with the development of biomedical technology, artificial intelligence technology, the method using electromyographic signal to carry out gesture identification is suggested and constantly explores.Most gesture identification method based on muscle electric signal relates to area of pattern recognition, and traditional area of pattern recognition is absorbed in the application such as image recognition, speech recognition more.In the pattern-recognition of muscle electric signal, active segment is as the most elementary cell of pattern-recognition, and its detection method is not by too much discussion.
The detection of active segment is an important step in hyperchannel electromyographic signal gesture recognition system, due to each gesture of user along with muscle from static to change again to static process, therefore need a suitable active segment detection method change section to be extracted, then identify according to different mode identification methods.
The many uses of existing segmentation method carry out active segment detection based on the method (such as, Short Time Fourier Transform method) of frequency domain character, the method (such as, based on the method for entropy theory) of Corpus--based Method.But said method calculates comparatively complicated, cannot meet the restriction of mobile device or Wearable requirement of real-time, calculation resources and storage resources.Cause muscle electric signal Gesture Recognition to be difficult to be miniaturized, wearing.
Therefore, in the urgent need to designing the segmentation method of a kind of applicable mobile device or Wearable.
Summary of the invention
In view of this, be necessary to provide a kind of electromyographic signal identification segmentation method.
The invention provides a kind of electromyographic signal identification segmentation method, the method comprises the steps: that a. calculates its instantaneous average energy according to original electromyographic signal; B. according to instantaneous average energy obtained above, the mobile average energy in window is calculated; C. threshold values is calculated according to the mobile average energy in window obtained above; D. according to the mobile average energy in window obtained above and threshold value, identify that described window is active segment or inactive section.
Preferably, described step a specifically comprises:
By sum-average arithmetic after the original electromyographic signal differential of sequence of M passage square, try to achieve instantaneous average energy, computing method are as follows:
Wherein, k is translating step, and i is specimen number, S
nit is the sample of the n-th passage.
Preferably, described step b specifically comprises:
Arrange length of window L, due to the real-time feature of man-machine interaction, when sample frequency is F, L/F should be less than 300.Mobile average energy in window is calculated as follows:
Preferably, described step c specifically comprises:
The mobile average energy calculated during spontaneous contractions that muscle is maximum in window is multiplied by P%, calculates threshold values T, and P is empirical value.
Preferably, described steps d specifically comprises:
When the mobile average energy in the window calculated is greater than T, present segment is labeled as active segment; When the mobile average energy in the window calculated is less than or equal to T, present segment is labeled as inactive section, that is,
If
this window is active segment
If
this window is inactive section.
The invention provides a kind of segmentation method of electromyographic signal identification, use the energy feature of signal, adopting the methods combining maximum spontaneous contractions power threshold values of difference moving average, detecting the active segment in the hyperchannel electromyographic signal system for identifying.The present invention is more easy when implementing relative to additive method, and complexity is low, is more suitable for the muscle electric signal recognition system high to requirement of real-time; The present invention carries out segmentation to single passage incessantly, but the muscle electric signal of multiple passage is carried out segmentation calculating as a whole, can the strength information of Efficient Characterization multiple channel-active section wayside signaling, and effectively detected activity section and inactive section, be more suitable for being applied to the system using multiple passage to carry out the identification of muscle electric signal.
Embodiment
Below in conjunction with drawings and the specific embodiments, the present invention is further detailed explanation.
Consulting shown in Fig. 1, is the operation process chart of electromyographic signal identification segmentation method of the present invention preferred embodiment.
Step S1, calculates its instantaneous average energy according to original electromyographic signal.Specifically:
By sum-average arithmetic after the original electromyographic signal differential of sequence of M passage square, try to achieve instantaneous average energy.Computing method are as follows:
Wherein, k is translating step, and i is specimen number, S
nit is the sample of the n-th passage.
Step S2, according to instantaneous average energy obtained above, calculates the mobile average energy in window.Specifically:
Arrange length of window L, due to the real-time feature of man-machine interaction, when sample frequency is F, L/F should be less than 300.Mobile average energy in window is calculated as follows:
Step S3, calculates threshold values according to the mobile average energy in window obtained above.Specifically:
According to step S1, S2, the mobile average energy calculated during spontaneous contractions that muscle is maximum in window is multiplied by P%, calculates threshold values T.
Step S4, according to the mobile average energy in window obtained above and threshold value, identifies that described window is active segment or inactive section.Specifically:
When the mobile average energy in the window calculated is greater than T, present segment is labeled as active segment; When the mobile average energy in the window calculated is less than or equal to T, present segment is labeled as inactive section.With this, signal needing to identify and inactive signal segmentation are opened, the interference simultaneously avoiding user's no intention action to bring and by mistake identification, that is,
If
this window is active segment
If
this window is inactive section.
It should be noted that, for the selection of step-length k, used system resource should be considered.If system resource is enriched, k can choose less numerical value, to improve the precision that active segment detects; If system resource is in short supply, k should choose larger numerical value, to meet real-time.1 < k < L in the present embodiment.
For the selection of threshold values T, the present embodiment uses off-line definition or the online method judged to determine.Wherein:
Off-line defines: user uses hyperchannel electromyographic signal checkout equipment, carry out the collection of electromyographic signal during maximum spontaneous contractions power, method described in step S1, S2 is used to carry out mobile average energy calculating, result of calculation is multiplied by the number percent determined by experience, uses in equipment of the present invention as immutable constant write.This kind of method is applicable to the equipment of specific user's binding, and namely equipment can not be used by other users.
Online judgement: the collection of electromyographic signal when user carries out maximum spontaneous contractions power before use, method described in step S1, S2 is used to carry out mobile average energy calculating, result of calculation is multiplied by the number percent determined by experience, as variable parameter in use equipment of the present invention.This kind of method does not bind restriction to user and equipment, and namely equipment can be used by different user.
It should be noted that, due to user may exist when using equipment of the present invention different external condition (as, the changes such as temperature, humidity, sensing station), also may exist self-condition difference (as, the factors such as perspiration, hair length, subcutaneous fat thickness, psychologic status), the method that user carries out online decision threshold T before use equipment is ideal.
It should be noted that, the embodiment of the present invention is mainly divided into three running statuses (referring to Fig. 2):
When signal is inactive section, the present embodiment operates in active segment detected state, has the Output rusults that two kinds possible after having detected: active segment mark and inactive segment mark.When detection segment is marked as active segment, Dietary behavior status recognition, carries out pattern-recognition by marked active segment; When detection segment is marked as inactive section, waits for next round sampling, reenter active segment detected state.
When signal is active segment, the present embodiment operates in inactive section of detected state, has same two kinds of possible Output rusults: when detection segment is marked as inactive section, be converted to active segment detected state after having detected; When detection segment is marked as active segment, waits for next round sampling, reenter inactive section of detected state.
During recognizer running status, program carries out the identification of hyperchannel electromyographic signal according to the algorithm for pattern recognition formulated, and automatically enters inactive section of detected state after end of identification.
Fig. 3 is the time diagram of electromyographic signal identification segmentation method one embodiment of the present invention.Active segment detects and inactive section of detection is carried out sampling and computing according to the sequential shown in Fig. 3, and in figure, 1 represents segmentation length of window, and 2 represent translating step:
1, setting segment length L is 128, and under the sample frequency of 1kHz, L 128ms, K consuming time are translating step.
2, when signal is at inactive section, the present embodiment detects whether enter active segment, and choosing translating step k is 1.If signal is in inactive section always, the present embodiment is circulated in active segment detected state always, and every new sampling obtains 1 sample, and the present embodiment recalculates and judges once.
3, when signal is at active segment, enter inactive section when the present embodiment detects, choosing translating step is 128, reserved calculation resources.Namely often sampling obtains 128 samples, and inactive section of detection is recalculated and judge once.
Although the present invention is described with reference to current better embodiment; but those skilled in the art will be understood that; above-mentioned better embodiment is only used for the present invention is described; not be used for limiting protection scope of the present invention; any within the spirit and principles in the present invention scope; any modification of doing, equivalence replacement, improvement etc., all should be included within the scope of the present invention.