Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

i want to apply rms on smoothed emg signal but facing problem.

Status
Not open for further replies.

developer.shehzad

Newbie level 2
Joined
Jul 15, 2012
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,297
I am beginner to matlab , i have worked hard to apply rms in matlab but dont found any thing useful.:-(

Actually at first i loaded the text file in matlab , then smooth it

Now i want to apply rms on this smooth signal , please help me

the code is :

load bow.txt;
[n,p]=size(bow)
T=1:n;
Plot(t,bow) ,legend('R-Bic','R-Tri','L-Bic','L-Tri','R-Thi','R-Ham','L-Thi','L-Ham')
xlabel('values'),ylabel('actions')

b=smooth(bow:)));
b1=reshape(b,9830,8);
subplot(3,1,1)
plot(bow,':');
hold on
plot(b1,'-');
title('Smooth b1 (All Data)')

b2 = zeros(9830, 8);
for I = 1:8,
b2:),I) = smooth(bow:),I));
end

subplot(3,1,2)
plot(bow,':');
hold on
plot(b2,'-');
title('Smooth bow b2 (Each Column)')


please help me , how to proceed to find rms ...thanks in advance
 

RMS is root-mean-square. So you have to square each datapoint, then find the mean (average), then take the square root.

so the matlab code should look something like this:
Code:
bow_squared = bow.^2;   //squares each term in the vector called 'bow'

mean_bow_squared = mean( bow_squared );   //calculates the mean of the squared values

RMS = sqrt( mean_bow_squared );  //takes square root of the mean of the squared values... i.e. Root-Mean-Square = RMS



or, in one line...
RMS = sqrt(mean(bow.^2)) ;
 

sir i have applied the above code . thanks
but now how to plot that , means how i see the result of RMS ?

actually i want to do some feature extraction from smoothed emg signal
 

sir i have applied the above code . thanks
but now how to plot that , means how i see the result of RMS ?

actually i want to do some feature extraction from smoothed emg signal

RMS gives you the time-average value of a signal, so it will result in a single number. You can plot the RMS value, but it will simply be a straight line across your plot.

If you want to smooth the original signal, you'll need to construct a digital filter, run the original signal through the filter, then plot the resulting waveform. Use your favorite search engine to look up "Matlab filter tutorial" or "filter example", etc. I've used the filtfilt function in the past to accomplish zero-phase filtering, so read up on it, too. Look up filter prototyping functions like butter() to see how you can generate the filter coefficients (hint: use the the B,A filter coefficients w/ filtfilt to apply the filter to your input signal).
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top