CODES ON MATLAB: DIGITAL SIGNAL PROCCESSING (REGRESSION MODEL FOR EMG)

4 vues (au cours des 30 derniers jours)
mapad222
mapad222 le 21 Avr 2021
Commenté : mapad222 le 21 Avr 2021
% Learning phase
======================================================================
Nb_wind = 30; % size of calculation windows
load Data_EMG_Regression.mat % or any EMG_DATA
============================comments===========================
We have a file :
%Content of the Data_EMG_Regression.mat
% "Data_EMG_mat_all" EMG are data from 8 channels
% - "Traget_X_Y" the movements in X and Y of the wrist which
% are estimated from EMG signals. The first column represents the values ​​in X and the second column represents the% values​​in Y
% - fs is the sample rate for signals above 200Hz… fs=200
%====================================================================
Question 1
How to add the time vector to the curves and plot figure (1) with name to the axes x and y?
Question 2
How to calculate Calculate the frequency spectrum of the Data_EMG_mat_all signal
Question 3
How to Draw the figure (2) which shows the frequency spectrum of the signal Data_EMG_mat_all with the x-axis in frequency
Question 4
How to Build and apply a filter on the Data_EMG_mat_all signal which ensures that there is no electrode movement in the EMG signals. Knowing that the output of the filter will have the same name as its input. Meanining build a filter above 20 hz to take out the electrode (elec)
Question n ° 5
How to Draw the figure (3) which shows the frequency spectrum of the signal Data_EMG_mat_all which is now filter. Question Numbers 2 and 3 should allow to confirm the operation of your filter.
Question # 6
How to calculate the MAV_feat and VAR_feat, using the following loop for the discriminating criteria (features) for each of the EMG filter signals. Using those matlab code
- the calculation of MAV_feat (the mean absolute value)
- the calculation of VAR_feat (the variance of the signal)
======================== Extraction of features ===========================
for n = 1:size(Data_EMG_mat_all,1)-Nb_wind
for elec = 1:8
temp = [];
temp = Data_EMG_mat_all(n:n+Nb_wind-1,elec);
%%%- RMS
RMS_feat(n,elec) = rms(temp);
%%% - Wavelength (WL) (Wavelength - WL)
WL_feat(n,elec) = sum(abs(temp(1:end-1,1)-temp(2:end,1)));
%- % - Mean Absolute Value (MAV) (Mean Absolute Value - MAV)
Answer matlab code here!
MAV_feat(n,elec)=...
%- Variance
Answer matlab code here!
VAR_feat(n,elec) = ...
end
end
Question # 7
How to draw the figure (4) which presents 4 curves one below the others and each curve must present the features according to the calculation windows.
Question # 8
% Gathering of features and Normalization
% ===================================================================
Q.8.a. How to Build a vector called “Feature” which groups together the 4 discriminating criteria. We must make sure that the Feature dimension must be of total number of calculation windows by the total number of features.
Q.8.b. How to Calculate the mean (Mean_val) and variance (Var_val) of the Features matrix. We must make sure that the dimension of these two vectors must be 1 by the number of features
Q.8.c. How to apply the normalization calculation on the Feature matrix above
Q.8.d. How to Construct the Target vector from Traget_X_Y… We have to make for that Traget_X_Y has the same row count as Feature.
Q.8.e. How to Draw on figure (5), 3 curves one below the other. We have to make sure the first must present target in X, the second the target in Y and the third the features.
  2 commentaires
Rik
Rik le 21 Avr 2021
This sounds like your homework again. Did you read the links I posted?
mapad222
mapad222 le 21 Avr 2021
1) You told me to ask questions and that what I do
2) Its not an Homework, I try to learn by myself an online classe
3) Yes I read the link

Connectez-vous pour commenter.

Réponses (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by