【肌电信号】基于matlab GUI肌电信号处理【含Matlab源码 966期】

news/2024/11/25 17:30:31/

⛄一、简介

肌电信号又称为EMG;EMG(electromyography)是一种生物电流信号,它产生于任意组织器官,一般是一种时间和一系列的振幅、频率和波形函数 。肌电信号是伴随肌肉收缩动作产生的一种生物电信号,采集皮肤表面的肌电信号称为表面肌电信号sEMG。
sEMG信号是人体表面肌肉通过收缩产生的生物电流。 神经系统控制肌肉的活动(收缩或者放松),在表面皮肤不同的肌肉纤维运动单元在同一时间产生相互不同的信号。

肌电信号的产生
表面肌电信号是由多个运动单元发放的动作电位序列,在皮肤表面呈现的时间和空间上综合叠加的结果;
在这里插入图片描述
在这里插入图片描述
肌电信号的特点
(1)sEMG是一维时间动作电位序列
(2)sEMG是交流信号,幅值一般和肌肉运 动力度成正比
(3)sEMG是一种非平稳的微电信号,其幅值在 0~1.5mv,有用信号频率位于 0~500HZ,主要能量集中在 20~150HZ
(4)SEMG一般比肢体运动超前 30~150ms产生,可以进行运动提前判断

⛄二、部分源代码

function varargout = bishe1(varargin)
% BISHE1 MATLAB code for bishe1.fig
% BISHE1, by itself, creates a new BISHE1 or raises the existing
% singleton*.
%
% H = BISHE1 returns the handle to a new BISHE1 or the handle to
% the existing singleton*.
%
% BISHE1(‘CALLBACK’,hObject,eventData,handles,…) calls the local
% function named CALLBACK in BISHE1.M with the given input arguments.
%
% BISHE1(‘Property’,‘Value’,…) creates a new BISHE1 or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before bishe1_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to bishe1_OpeningFcn via varargin.
%
% *See GUI Options on GUIDE’s Tools menu. Choose “GUI allows only one
% instance to run (singleton)”.
%
% See also: GUIDE, GUIDATA, GUIHANDLES

% Edit the above text to modify the response to help bishe1

% Last Modified by GUIDE v2.5 25-May-2021 12:43:46

% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct(‘gui_Name’, mfilename, …
‘gui_Singleton’, gui_Singleton, …
‘gui_OpeningFcn’, @bishe1_OpeningFcn, …
‘gui_OutputFcn’, @bishe1_OutputFcn, …
‘gui_LayoutFcn’, [] , …
‘gui_Callback’, []);
if nargin && ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end

if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT

% — Executes just before bishe1 is made visible.
function bishe1_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% varargin command line arguments to bishe1 (see VARARGIN)

% Choose default command line output for bishe1
handles.output = hObject;

% Update handles structure
guidata(hObject, handles);

% UIWAIT makes bishe1 wait for user response (see UIRESUME)
% uiwait(handles.figure1);

% — Outputs from this function are returned to the command line.
function varargout = bishe1_OutputFcn(hObject, eventdata, handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)

% Get default command line output from handles structure
varargout{1} = handles.output;

% — Executes during object creation, after setting all properties.
function axes2_CreateFcn(hObject, eventdata, handles)
% hObject handle to axes2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called

% Hint: place code in OpeningFcn to populate axes2

% — Executes during object creation, after setting all properties.
function axes1_CreateFcn(hObject, eventdata, handles)
% hObject handle to axes1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called

% Hint: place code in OpeningFcn to populate axes1

% — Executes during object creation, after setting all properties.
function axes3_CreateFcn(hObject, eventdata, handles)
% hObject handle to axes3 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called

% Hint: place code in OpeningFcn to populate axes3

% — Executes during object creation, after setting all properties.
function axes4_CreateFcn(hObject, eventdata, handles)
% hObject handle to axes4 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called

% Hint: place code in OpeningFcn to populate axes4

% — Executes on button press in pushbutton6.
function pushbutton6_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton6 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
selection=questdlg([‘是否关闭’,get(gcf,‘Name’),‘这个面板?’], …
[‘Close ‘,get(gcf,‘Name’),’…’],‘是’,‘否’,‘是’);%当选择退出按钮时,得出一个问是否确定关闭的框
if strcmp(selection,‘否’)
return;
else
clc; %当选择关闭时,清空所有matla输入面上的所有错误信息,同时关闭图像窗口
clear all;
delete(gcf);

end

% — Executes on button press in pushbutton2.
function pushbutton2_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
A=load(‘1.txt’);
global Q;
switch Q
case 1
s=A(30001:35000,2);
case 2
s=A(35001:40000,2);
case 3
s=A(40001:45000,2);
case 4
s=A(45001:50000,2);
case 5
s=A(50001:55000,2);
case 6
s=A(55001:60000,2);
end
fs=1; %采样频率
N=5000; %采样点数
n=0:N-1;
t=n/fs; %时间
axes(handles.axes1);
plot(t,s);
title(‘输入信号’);xlabel(‘t/s’);ylabel(‘幅度’); %时域波形
grid on
function pushbutton3_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton3 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
A=load(‘1.txt’);
global Q;
switch Q
case 1
s=A(30001:35000,2);
case 2
s=A(35001:40000,2);
case 3
s=A(40001:45000,2);
case 4
s=A(45001:50000,2);
case 5
s=A(50001:55000,2);
case 6
s=A(55001:60000,2);
end
fs=1; %采样频率
N=5000; %采样点数
n=0:N-1;
t=n/fs; %时间
sfft=fft(s); %傅里叶变换
axes(handles.axes2);
plot((1:length(sfft)/2)fs/length(sfft),2abs(sfft(1:length(sfft)/2))/length(sfft));
title(‘信号频谱’);xlabel(‘频率/Hz’);ylabel(‘幅度’);
grid on %未滤波时 频域波形
% — Executes on button press in pushbutton4.
function pushbutton4_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton4 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
A=load(‘1.txt’);
global Q;
switch Q
case 1
s=A(30001:35000,2);
case 2
s=A(35001:40000,2);
case 3
s=A(40001:45000,2);
case 4
s=A(45001:50000,2);
case 5
s=A(50001:55000,2);
case 6
s=A(55001:60000,2);
end
fs=1; %采样频率
N=5000; %采样点数
n=0:N-1;
t=n/fs; %时间
axes(handles.axes3);
c = rceps(s); %做倒谱图
plot(t,c);
title(‘信号倒谱’);xlabel(‘频率/Hz’);ylabel(‘幅度’);
grid on
% — Executes on button press in pushbutton5.
function pushbutton5_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton5 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
A=load(‘1.txt’);
global Q;
switch Q
case 1
s=A(30001:35000,2);
case 2
s=A(35001:40000,2);
case 3
s=A(40001:45000,2);
case 4
s=A(45001:50000,2);
case 5
s=A(50001:55000,2);
case 6
s=A(55001:60000,2);
end
fs=1; %采样频率
N=5000; %采样点数
n=0:N-1;
t=n/fs; %时间
sfft=fft(s); %傅里叶变换
sF=s;

⛄三、运行结果

在这里插入图片描述

⛄四、matlab版本及参考文献

1 matlab版本
2014a

2 参考文献
[1]徐洁.基于小波分析的脉搏波信号处理[J].电子设计工程. 2013,21(11)

3 备注
简介此部分摘自互联网,仅供参考,若侵权,联系删除


http://www.ppmy.cn/news/694932.html

相关文章

脑电信号情绪识别研究综述

摘要 情绪识别是指通过人的面部表情、行为动作或者生理信号等信息识别人的情绪状态,其成果在医疗辅助、教育、交通安全等方面有很大的应用价值。由于脑电信号的客观真实性等特点,使用脑电信号进行情绪识别研究受到国内外学者们的广泛关注。查阅了大量脑电情绪识别相关文献并进行…

【脑电信号】基于matlab小波变换脑电信号特征提取【含Matlab源码 511期】

⛄一、小波变换简介 小波变换是从20世纪80年代起逐渐发展成熟的一项数学应用技术,具有对时间—频率的双重分析和多分辨率分析能力,目前已经广泛应用于图像处理、模式识别等多个领域。小波变换的窗口大小固定但形状可改变,因此能够满足时域—…

心电信号采集原理及电路设计

心电测量搜索 1、心电记录电路设计(框图/波形以及信号放大器的选择)_纪客老白的博客-CSDN博客 2、心电信号检测电路设计与制作_weixin_30815427的博客-CSDN博客 3、心电电路算法滤波_简述心电信号采集原理及电路设计_weixin_39890629的博客-CSDN博客 4、关于ADS1292测心率心…

脑电信号分析

背景介绍 脑电一般指大脑皮层产生的连续节律性变化,广泛用于神经科学研究、临床诊断和治疗等领域。科研人员根据频率可以将脑电分为四种:α波、β波、θ波、δ波,不同的脑电波代表了人体不同的精神状态:当人们处于比较紧张的情况时…

【脑电信号分类】脑电信号提取PSD功率谱密度特征

本文是由CSDN用户[frostime]授权分享。主要介绍了脑电信号提取PSD功率谱密度特征,包括:功率谱密度理论基础、matlab中PSD函数的使用介绍以及实验示例。感谢 frostime! 1. 序言 脑电信号是一种非平稳的随机信号,一般而言随机信号的…

(一)信号及脉冲电信号

目录 #电磁波回顾#信号 分类按照幅值是否连续分类 模拟信号数字信号 按信号载体分类(用什么来表述信号的信息) 电信号 电压信号电流信号(直流电、交流电、脉冲电)电磁波中的无线电信号 波信号(机械波、电磁波) 按传输介质分类(传输的都是电磁波) 有线信号(电线传输的电信号、光…

基于MATLAB的心电信号预处理

这是前段时间做的一个课程设计,做的比较简单,没有考虑到太细,只是初步地达到了想要的效果。这次设计主要是对心电信号进行预处理,将其信号中包含的一些干扰滤除或者抑制掉。 一、心电信号 (1)心电信号的特性…

心电信号去噪(part1)--心电信号简介

开一个坑总结一下最近学的ECG滤波算法,先对心电图和心电信号做一下简要介绍 注:这里是以小型手持心电图机为研究对象的(单导联)。 心电图介绍 心电图(electrocardiogram,ECG)能反映心脏兴奋的电活动过程,它在心脏基本功能及病理研究方面具有重要的参…