banner
学习与分享

您的当前位置:首页 > 新闻资讯 > 学习与分享

肌肉疲劳度分析指导

来源:未知 │ 发表时间:2021-07-15 | 浏览数:载入中...

肌肉疲劳度分析指导

        

      肌肉疲劳研究和监测是一个很有前途的研究领域,已有的研究已证明从EMG信号中提取的某些参数会随着疲劳的获取而以特定方式演变。在这些参数之中,并可能是较为一致的参数,便是中值功率频率
1. 输入所需数据包


[1] 

# OpenSignals Tools own package for loading and plotting the acquired data

import biosignalsnotebooks as bsnb

import biosignalsnotebooks.signal_samples as bsnb_ss

# Scientific packages

from numpy import linspace, where

from scipy.signal import periodogram

from scipy.integrate import cumtrapz



2. 加载EMG数据,收集肌肉疲劳诱发期间的数据

[2] 

# Data loading

data, header = bsnb_ss.load_signal("emg_fatigue", get_header=True)


3.识别采集期间使用的通道

[3]

 channel = "CH" + str(header["channels"][0])

4.采样率和获取数据样本

[4]

# Sampling rate and acquired data
sr = header["sampling rate"]
# Signal Samples
signal = data[channel]time = linspace(0, len(signal) / sr, len(signal)) 


5. 肌肉激活侦测

[5]

activation_begin, activation_end = bsnb.detect_emg_activations(signal, sr)[:2]

detect_emg_activations 默认调用的函数是:detect_emg_activations(emg_signal,sample_rate,smooth_level=20,threshold_level=10,time_units=False,volts=False,resolution=None,device="biosignalssplux",plot_result=False)


6.

bsnb.plot_compare_act_config(signal, sr)

1.png


7. 提取表征每个肌肉激活的中值功率频率(处理窗口)
中值功率频率定义为允许功率谱划分为具有相等功率的两个区域的频率值


2.png

8. [7] 

 Iteration along muscular activations
median_freq_data = []
median_freq_time = []
for activation in range(0, len(activation_begin)):
    processing_window = signal[activation_begin[activation]:activation_end[activation]]
    central_point = (activation_begin[activation] + activation_end[activation]) / 2
    median_freq_time += [central_point / sr]
 
    # Processing window power spectrum (PSD) generation
    freqs, power = periodogram(processing_window, fs=sr)
 
    # Median power frequency determination
    area_freq = cumtrapz(power, freqs, initial=0)
    total_power = area_freq[-1]
    median_freq_data += [freqs[where(area_freq >= total_power / 2)[0][0]]]
    # The previous indexation [0][0] was specified in order to only the first sample that 
    # verifies the condition area_freq >= total_power / 2 be returned (all the subsequent 
    # samples will verify this condition, but, we only want the frequency that is nearest 
    # to the ideal frequency value that divides power spectrum into to regions with the 
    # same power - which is not achievable in a digital processing perspective)

9. 随着时间序列的变化中值频率的变化

3.png

4.png


10.

bsnb.fatigue_eval_med_freq(signal, sr)

OUT[10]

5.png


w/syBLRINH4LV9yI+Ft7LlS6MADn1au2CEs9K75yubDi3qw66E0y87K8kv+aO8dRB1U31hoxqSwq3CgUJuu0Nky1tLSzykpMPy+LkKI/70mZkM4fMi7x5IUESOshqFjCRpXk5zJoU6DOtwyR9Y7iUOxZTX8MBfYmgSmI9UeJGpe8t0SDXSp08skdYsIgjR2281HHGY5c9vYZue4GREZMcD/IfPULjKRd9gQFHdc4lwc=