A step-by-step electromyographic signal activity segment detection method
Through the step-by-step electromyographic signal activity segment detection method and the normalization technology of envelope and TKE domain, the problems of false alarms and delays in the existing technology are solved, and efficient extraction of electromyographic signal activity segments is achieved, which is suitable for Medical signal analysis for different patients.
Patent Information
- Application Number
- CN202211583953.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-10
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2042-12-10
AI Technical Summary
Existing technologies have problems with false alarms and delays when extracting electromyographic signal activity segments. The threshold method needs to balance detection rate and detection accuracy. The non-threshold method requires multi-parameter optimization and is difficult to apply to medical signal analysis of different patients.
A step-by-step electromyographic signal activity segment detection method is adopted, the envelope is obtained through data preprocessing, the slope change is used to extract the turning point and the segment energy difference to determine the starting and ending points, false spikes are eliminated, and the TKE domain is used for normalization to determine the starting and ending points of the signal. , combined with detection accuracy and detection accuracy to evaluate the extraction effect.
It improves the effect of extracting electromyographic signal activity segments, reduces the amount of calculation, avoids the subjectivity of threshold selection and the need for parameter optimization, and improves the practicality of medical signal analysis.
Smart Images

Figure CN115778408B
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of medical signal analysis, and in particular relates to a step-by-step electromyographic signal activity segment detection method. Background Art
[0002] For a healthy human body, natural and smooth movements are the result of nerve excitation signals generated by the motor area of the cerebral cortex being transmitted to the muscle motor nerve endings through the spinal motor nerves. However, for patients with stroke, myoclonus, etc., due to abnormal activation of the motor brain area, the release mode and transmission process of the nerve control signal are affected, and the patient's muscle motor neurons do not receive sufficient signals, resulting in the patient's inability to control the movement of the limbs well.
[0003] Electromyographic signals are muscle feedback that is converted from neural control signals to actual movements, and indirectly reflect the patient's neural control mechanism. Therefore, extracting effective signals during patient movement and conducting muscle coordination analysis, or combining EEG signals with brain-myographic coupling analysis, has important clinical significance for evaluating movement status, determining the cause of the disease, and evaluating rehabilitation status.
[0004] The important premise of the above analysis is to accurately extract the active segment of the electromyographic signal. However, due to the characteristics of electromyographic signals being weak, random, and susceptible to environmental interference, and the fact that there are often irregular interferences in the patient's signal, mainly false spikes, it is very difficult to accurately extract the active segment. Among the active segment extraction technologies that have been published or made public, there are mainly two types: threshold method and non-threshold method. The threshold method mainly uses contour extraction algorithms, such as root mean square value, instantaneous energy, sample entropy, and Teager-Kaiser operator (TKE), to highlight the difference in amplitude between the resting segment and the active segment, and then uses the background noise of the resting segment to estimate the threshold, and determines the active segment by comparing the processed signal with the threshold. The threshold method has a simple algorithm and a small amount of calculation, but it needs to balance the relationship between the detection rate and the detection accuracy. A too small threshold may lead to false alarms, a too large threshold may lead to delays, and the selection of the threshold will also introduce subjective components. The non-threshold method, on the basis of highlighting the signal contour, combines the information before and after the contour to remove the interference of false spikes, thereby extracting the pure electromyographic signal active segment. Common methods include corrosion and expansion method and local integration method. The non-threshold method solves the problem of threshold selection, but it needs to use existing information to optimize many parameters to achieve good results. Medical signal analysis usually requires that the algorithm can be applied to different patients without adjustment or with simple adjustment, so the non-threshold method is difficult to apply in actual medical signal analysis. Summary of the invention
[0005] The object of the present invention is to provide a step-by-step electromyographic signal activity segment detection method, which is beneficial to improving the effect of electromyographic signal activity segment extraction.
[0006] To achieve the above object, the technical solution adopted by the present invention is: a step-by-step electromyographic signal activity segment detection method, comprising:
[0007] Acquire the original electromyographic signal, perform data preprocessing on it, and obtain the envelope of the electromyographic signal;
[0008] The obtained electromyographic signal envelope is segmented by extracting turning points using the change in slope, and the energy difference between segments is used as the basis for extracting the start and end points of the envelope. The start and end points of the envelope are extracted, and the activation length and activation energy are used to exclude false peaks.
[0009] The starting and ending points of the envelope are used to partition the area, and the original data in different areas are mapped to the TKE domain. The maximum TKE value in the resting area is found as the normalized denominator. The standard value and the normalized signal size are compared to determine the starting and ending points of the signal.
[0010] Furthermore, the specific method for data preprocessing of the original electromyographic signal is as follows:
[0011] The original electromyographic signal is first filtered out by a 50 Hz power frequency notch filter to remove power supply noise, then rectified by absolute value, and then filtered by a third-order Butterworth low-pass filter with a cutoff frequency of 3 Hz to obtain the envelope of the surface electromyographic signal.
[0012] Furthermore, the specific method for extracting the start and end points of the envelope is:
[0013] After data preprocessing, the smooth envelope X(t)=[x1,x2,x3...x n ]; first use the change relationship of the slope to find the K turning points P of the envelope;
[0014] P={x|(x i -x i-1 )×(x i -x i+1 )>0}
[0015] The data between points are defined as envelope segments, and the energy of each envelope segment is calculated using the following formula:
[0016]
[0017] Among them, E j represents the energy of each envelope segment, D j Indicates the envelope segment, L j represents the data length of each envelope segment, j=1,2,3...,K-1, represents the number of envelope segments;
[0018] Calculate the change in energy between segments:
[0019]
[0020] Where, ΔE i Indicates the change of the energy of the envelope segment, E i is the energy of the envelope segment, i=1,2,3...,K-2, indicating the number of energy changes;
[0021] By finding the positive maximum value and the negative maximum value in each cycle and combining the relationship between the maximum value and the initial data point, the start and end points of each cycle envelope are found; in addition, the first peak point before and after the start and end points is extracted;
[0022] In the process of extracting the start and end points and the first peak point, the false peaks are excluded as follows:
[0023] Since the number of executions of the target action is known in medical signal analysis, the number of executions is used to eliminate false spike data segments: first, the activation time points of all spikes are calculated and sorted, and ΔL+2 spikes with shorter activation time are selected and marked; then, the overall energy of the marked data segments is calculated and sorted, and the ΔL segment data with lower energy values is determined to be false spike data and excluded.
[0024] Furthermore, the specific method for determining the start and end points of the signal is:
[0025] Based on the start and end points and peak points of the envelope, the original signal is divided into a static area, a mixed area and an activated area: the static area is the area between the end point and the start point of the envelope, the mixed area is the area between the start and end points and the peak point, and the activated area is the area between the peak points; then, the TKE formula is used to calculate the original electromyographic signals in the static area and the mixed area respectively; under discrete conditions, the TKE formula is defined as:
[0026] y(n)=x(n) 2 -x(n-1)x(n+1)
[0027] Wherein, y represents the TKE domain signal, x represents the original signal, n=1,2,3...,N, N represents the length of the signal;
[0028] Then, the maximum TKE values of the two static zones in each cycle are recorded, and the static zone and mixed zone in each cycle are normalized using the maximum value. At this time, the maximum value of each static zone is 1; therefore, in the stage of increasing signal amplitude, the first point greater than 1 in the mixed zone is set as the starting point; in the stage of decreasing signal amplitude, the last point greater than 1 in the mixed zone is set as the ending point.
[0029] Furthermore, after obtaining the start and end points of the signal, combined with the start and end point labels, the extraction effect of the electromyographic signal activity segment is evaluated by an evaluation formula that combines the detection correctness and detection accuracy.
[0030] Furthermore, the specific method for evaluating the extraction effect of the electromyographic signal activity segment by combining the evaluation formula of the detection accuracy and the detection precision is as follows:
[0031] Get the start and end point labels, combine the signal start and end points, and establish the evaluation formula for combining detection accuracy and detection precision as follows:
[0032]
[0033] Where score represents the evaluation score; L represents the number of activity segments; ΔL represents the difference between the number of actual detected activity segments and the number of standard activity segments; R represents the number of start and end points, and J represents the number of a Indicates the estimated starting and ending points, that is, the starting and ending points of the obtained signal, J k represents the ideal start and end points, that is, the obtained start and end point labels; B represents the maximum value of the magnitude of the start and end point error; K1 and K2 represent the weights of the two parts in the formula;
[0034] The evaluation score is calculated using the evaluation formula to obtain an evaluation result.
[0035] Compared with the prior art, the present invention has the following beneficial effects: it provides a step-by-step electromyographic signal activity segment detection method, which first uses the energy change of the data segment to locate the main area of the activity segment, with a small amount of calculation and no need for prior data to optimize parameters; then uses the characteristics of the region to eliminate false peaks, avoiding the problem of the threshold method needing to balance detection accuracy and detection rate; then uses the information of the rest segment before and after each cycle to generate an adaptive standard value, eliminating the process of manually adjusting the threshold. Therefore, the present method can effectively improve the effect of electromyographic signal activity segment extraction and has high practicality in medical signal analysis. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 It is a flow chart of the method implementation of the embodiment of the present invention.
[0037] Figure 2 It is a flow chart for implementing data preprocessing in an embodiment of the present invention.
[0038] Figure 3 It is a flow chart for realizing the extraction of the start and end points of the envelope in an embodiment of the present invention.
[0039] Figure 4 It is a flow chart for realizing the extraction of the start and end points of a signal in an embodiment of the present invention. DETAILED DESCRIPTION
[0040] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0041] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present application. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present application belongs.
[0042] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.
[0043] like Figure 1 As shown, this embodiment provides a step-by-step electromyographic signal activity segment detection method, including:
[0044] 1) Obtain the original electromyographic signal and perform data preprocessing on it to obtain the envelope of the electromyographic signal.
[0045] 2) The obtained electromyographic signal envelope is segmented by extracting turning points using the change in slope, and the energy difference between segments is used as the basis for extracting the start and end points of the envelope. The start and end points of the envelope are extracted, and false peaks are eliminated using the activation length and activation energy.
[0046] 3) Use the start and end points of the envelope to partition the area, map the original data in different areas to the TKE domain, find the maximum TKE value in the resting area as the normalized denominator, compare the standard value and the normalized signal size, and then determine the start and end points of the signal.
[0047] 4) After obtaining the start and end points of the signal, combined with the start and end point labels, the extraction effect of the electromyographic signal activity segment is evaluated by combining the evaluation formula of detection accuracy and detection precision.
[0048] Part 1: Data Preprocessing
[0049] The implementation process of data preprocessing is as follows Figure 2 As shown. The original electromyographic signal is first filtered by a 50Hz power frequency notch filter to remove power supply noise, then rectified by absolute value (full wave), and then filtered by a 3rd order Butterworth low pass filter with a cutoff frequency of 3Hz to obtain the envelope of the surface electromyographic signal. The size of the cutoff frequency can be determined according to the actual filtering situation.
[0050] Part 2: Extraction of start and end points of envelope
[0051] The implementation process of extracting the start and end points of the envelope is as follows: Figure 3 After data preprocessing, a smooth envelope X(t)=[x1,x2,x3...x n ]. First, use the change relationship of the slope to find the K turning points P of the envelope:
[0052] P={x|(x i -x i-1 )×(x i -x i+1 )>0}
[0053] The data between points are defined as envelope segments, and the energy of each envelope segment is calculated using the following formula:
[0054]
[0055] Among them, E j represents the energy of each envelope segment, D j Indicates the envelope segment, L j represents the data length of each envelope segment, j=1,2,3...,K-1 represents the number of envelope segments.
[0056] When the muscle is activated, the electromyographic signal will show a large change in amplitude, which is reflected in the change of energy. The rising section will show a positive surge, and the falling section will show a negative decrease. Therefore, the starting and ending points of the envelope can be found by finding the positive maximum and negative maximum values of the energy change in each cycle.
[0057] The energy change between segments is calculated using the following formula:
[0058]
[0059] Where, ΔE i Indicates the change of envelope segment energy, E is the envelope segment energy, i=1,2,3...,K-2, indicates the number of energy changes.
[0060] Through the relationship between the maximum value and the initial data point, the start and end points of each cycle envelope are found. In order to facilitate the next step, the first peak point before and after the start and end points is also extracted for subsequent analysis.
[0061] In the process of extracting the start and end points and the first peak point, both false spikes and normal activations will be detected by the algorithm. Since the number of executions of the target action is known in medical signal analysis, the number of executions is used to eliminate false spike data segments. In this method, all spikes are screened from two aspects: activation time and activation energy: first, the number of activation time points of all spikes is calculated, sorted, and ΔL+2 spikes with shorter activation time are selected (ΔL represents the difference between the actual activation number and the detected activation number) and marked. Then, the overall energy of the marked data segment is calculated, sorted, and the ΔL segment data with lower energy value is determined to be false spike data and excluded.
[0062] Part 3: Signal start and end point extraction
[0063] The implementation process of this part is as follows Figure 4 As shown. The envelope is smoother than the original signal, and can well reflect the resting state and activation state of the muscle, but the starting and ending points of the envelope are delayed relative to the actual starting and ending points of the signal, and cannot accurately reflect the start and end time of the signal. Therefore, based on the starting and ending points and peak points of the envelope, the original signal is partitioned into static area, mixed area and activation area: the static area is the area between the end point and the starting point of the envelope, the mixed area is the area between the starting and ending points and the peak point, and the activation area is the area between the peak points. Then, the TKE formula is used to calculate the original electromyographic signals of the static area and the mixed area respectively. Under discrete conditions, the TKE formula is defined as:
[0064] y(n)=x(n) 2 -x(n-1)x(n+1)
[0065] Wherein, y represents the TKE domain signal, x represents the original signal, n=1,2,3...,N, and N represents the length of the signal.
[0066] It is worth noting that if there is a data segment marked as a false peak in the static area, the false peak segment data needs to be discarded first to prevent an excessively large TKE value from affecting the subsequent judgment of the start and end points.
[0067] Then, the maximum TKE values of the two static areas in each cycle are recorded, and the static area and the mixed area in each cycle are normalized using the maximum value. At this time, the maximum value of each static area is 1. Therefore, in the stage of increasing signal amplitude, the first point greater than 1 in the mixed area is set as the starting point; in the stage of decreasing signal amplitude, the last point greater than 1 in the mixed area is set as the ending point.
[0068] Part IV: Evaluation
[0069] After obtaining the actual start and end points, it is necessary to combine the start and end point labels for evaluation. The start and end point labels are usually provided by experienced electromyography physicians. The evaluation can be carried out from two aspects: detection accuracy and detection precision. However, in motion assessment and medical signal analysis, more attention is paid to the detection precision of the activity segment, so different weights are given to the two. Obtain the start and end point labels, combine the signal start and end points, and establish the evaluation formula combining detection accuracy and detection precision as follows:
[0070]
[0071] Among them, score represents the evaluation score; e is the base number, e 1 =2.7183 to achieve nonlinear calculation; L represents the number of active segments; ΔL represents the difference between the number of active segments actually detected and the number of standard active segments; R represents the number of start and end points, J a Indicates the estimated starting and ending points, that is, the starting and ending points of the obtained signal, J k represents the ideal starting and ending points, that is, the obtained starting and ending point labels; B represents the maximum value of the order of magnitude of the point error; K1 and K2 represent the weights of the two parts in the formula.
[0072] In the above formula, the first part represents the score of the number of active segments detected, and the second part represents the score of the start and end point errors. Since the detection accuracy of the start and end points is more important in medical analysis, the assigned weight K1<K2. In the first part, by introducing nonlinear factors, the purpose of small errors accounting for a small proportion and large errors accounting for a sudden increase is achieved, which means that under a large number of detection errors, even if the start and end point detection accuracy is high, the algorithm will not have a very high score. In the second part, the errors of the start and end points of each segment are calculated and averaged, and normalized using the maximum value of the error order of magnitude. If the detection accuracy reaches 100% and the detection error is 0, the score is 100 points.
[0073] The evaluation score is calculated using the evaluation formula to obtain an evaluation result.
[0074] When this method is used, the electromyographic data is first processed by 50Hz power frequency filtering, absolute value rectification, and third-order Butterworth low-pass filtering. Then, the envelope obtained after processing is segmented by using the change in slope, and the energy change between segments is calculated and the extreme value of the change is extracted. The start and end points and the first peak point of the envelope are found from the extreme value; at the same time, the activation duration and activation energy are sorted to eliminate the interference of false spikes. Subsequently, the original signal is partitioned by the start and end points and the first peak point, specifically into a static area, a mixed area, and an activated area; the data of each area is mapped to the TKE domain, the maximum value of the TKE in the static area is extracted, and the periodic signal is normalized; when the first point in the mixed area of the rising segment is greater than 1, it is recorded as the starting point, and the last point greater than 1 in the descending segment is recorded as the end point. Finally, the start and end point labels of the signal are obtained, and the results are evaluated using the evaluation formula.
[0075] This method first uses the energy changes of the data segment to locate the main area of the active segment, which has a small amount of calculation and does not require prior data to optimize parameters; then the characteristics of the region are used to eliminate false peaks, avoiding the problem of the threshold method needing to balance detection accuracy and detection rate; then the information of the resting segment before and after each cycle is used to generate an adaptive standard value, eliminating the process of manually adjusting the threshold; finally, the evaluation formula is used to intuitively demonstrate the effect of active segment extraction.
[0076] This method is the basis of all myoelectric signal analysis, such as classifier training, kinematic evaluation and control mechanism analysis. At present, almost all human-computer interaction methods are inseparable from the recognition of user movement intentions, and the important factor affecting the recognition accuracy is the quality of classifier training. This method can accurately extract the active segment of the movement and avoid the interference of false spikes, which is conducive to extracting effective information and improving the accuracy of the classifier. In addition, in motion evaluation and medical signal analysis, accurate estimation of the patient's movement time can determine the type of disease the patient suffers from. Accurate extraction of information during movement can also analyze the interaction between muscles, analyze the patient's movement pattern and the compensation pattern between muscles; combined with EEG signals, it can also study the connection between the ascending and descending pathways, which greatly facilitates the study of the cause of the patient's disease, status evaluation and rehabilitation evaluation.
[0077] The above is only a preferred embodiment of the present invention, and does not limit the present invention in other forms. Any technician familiar with the profession may use the above disclosed technical content to change or modify it into an equivalent embodiment with equivalent changes. However, any simple modification, equivalent change and modification made to the above embodiment according to the technical essence of the present invention without departing from the technical solution of the present invention still belongs to the protection scope of the technical solution of the present invention.
Claims
1. A step-by-step electromyographic signal activity segment detection method, characterized in that: include: Acquire the original electromyographic signal, perform data preprocessing on it, and obtain the envelope of the electromyographic signal; The obtained electromyographic signal envelope is segmented by extracting turning points using the change in slope, and the energy difference between segments is used as the basis for extracting the start and end points of the envelope. The start and end points of the envelope are extracted, and the activation length and activation energy are used to exclude false peaks. Use the start and end points of the envelope to partition, map the raw data in different areas to the TKE domain, find the maximum TKE value in the resting area as the normalized denominator, compare the standard value and the normalized signal size, and then determine the start and end points of the signal; The specific method for extracting the start and end points of the envelope is: After data preprocessing, the smooth envelope X(t)=[x1,x2,x3...x M ]; first use the change relationship of the slope to find the K turning points P of the envelope; P={x m |(x m -x m-1 )×(x m -x m+1 )>0} The data between points are defined as envelope segments, and the energy of each envelope segment is calculated using the following formula: Among them, E j represents the energy of each envelope segment, D j Indicates the envelope segment, L j represents the data length of each envelope segment, j=1,2,3...,K-1, represents the number of envelope segments; Calculate the change in energy between segments: Where, ΔE i Indicates the change of the energy of the envelope segment, E i is the energy of the envelope segment, i=1,2,3...,K-2, indicating the number of energy changes; By finding the positive maximum value and the negative maximum value in each cycle and combining the relationship between the maximum value and the initial data point, the start and end points of each cycle envelope are found; in addition, the first peak point before and after the start and end points is extracted; In the process of extracting the start and end points and the first peak point, the false peaks are excluded as follows: Since the number of executions of the target action is known in medical signal analysis, the execution number is used to eliminate false spike data segments: first, the activation time points of all spikes are calculated, sorted, and the ΔL+2 spikes with the shortest activation time are selected and marked; then, the overall energy of the marked data segments is calculated, sorted, and the ΔL segment data with the lowest energy value is determined to be false spike data and excluded; The specific method to determine the start and end points of the signal is: Based on the start and end points and peak points of the envelope, the original signal is divided into a static area, a mixed area and an activated area: the static area is the area between the end point and the start point of the envelope, the mixed area is the area between the start and end points and the peak point, and the activated area is the area between the peak points; then, the TKE formula is used to calculate the original electromyographic signals in the static area and the mixed area respectively; under discrete conditions, the TKE formula is defined as: y(n)=x(n) 2 -x(n-1)x(n+1) Wherein, y represents the TKE domain signal, x represents the original signal, n=1,2,3...,N, N represents the length of the signal; Then, the maximum TKE values of the two static zones in each cycle are recorded, and the static zone and mixed zone in each cycle are normalized using the maximum value. At this time, the maximum value of each static zone is 1; therefore, in the stage of increasing signal amplitude, the first point greater than 1 in the mixed zone is set as the starting point; in the stage of decreasing signal amplitude, the last point greater than 1 in the mixed zone is set as the ending point.
2. A step-by-step electromyographic signal activity segment detection method according to claim 1, characterized in that: The specific method for data preprocessing of the original electromyographic signal is as follows: The original electromyographic signal is first filtered out by a 50 Hz power frequency notch filter to remove power supply noise, then rectified by absolute value, and then filtered by a third-order Butterworth low-pass filter with a cutoff frequency of 3 Hz to obtain the envelope of the surface electromyographic signal.
3. A step-by-step electromyographic signal activity segment detection method according to claim 1, characterized in that: After obtaining the start and end points of the signal, combined with the start and end point labels, the extraction effect of the EMG signal activity segment is evaluated by combining the evaluation formula of detection accuracy and detection precision.
4. A step-by-step electromyographic signal activity segment detection method according to claim 3, characterized in that: The specific method for evaluating the extraction effect of the electromyographic signal activity segment by combining the evaluation formula of detection accuracy and detection precision is: Get the start and end point labels, combine the signal start and end points, and establish the evaluation formula for combining detection accuracy and detection precision as follows: Where score represents the evaluation score; L represents the number of activity segments; ΔL represents the difference between the number of actual detected activity segments and the number of standard activity segments; R represents the number of start and end points, and J represents the number of a Indicates the estimated starting and ending points, that is, the starting and ending points of the obtained signal, J k represents the ideal start and end points, that is, the obtained start and end point labels; B represents the maximum value of the magnitude of the start and end point error; K1 and K2 represent the weights of the two parts in the formula; The evaluation score is calculated using the evaluation formula to obtain an evaluation result.
