
肌肉疲劳度分析指导
肌肉疲劳研究和监测是一个很有前途的研究领域,已有的研究已证明从EMG信号中提取的某些参数会随着疲劳的获取而以特定方式演变。在这些参数之中,并可能是较为一致的参数,便是中值功率频率
1. 输入所需数据包
|
|
2. 加载EMG数据,收集肌肉疲劳诱发期间的数据
[2]
|
|
3.识别采集期间使用的通道
[3]
|
channel = "CH" + str(header["channels"][0]) |
[4]
|
|
[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) |
7. 提取表征每个肌肉激活的中值功率频率(处理窗口)
中值功率频率定义为允许功率谱划分为具有相等功率的两个区域的频率值
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) |


10.
|
bsnb.fatigue_eval_med_freq(signal, sr) |
OUT[10]
