LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sum of the Energy of the signal

Please I need your with the code attached below ...  I have collected 30 EMG signals and I want to do my analysis. I want to divid the signal into 10 small signals and I want to calculate the RMS of each signal then do the sum and get a value V1 ect for each small signal then the values of V i want to plot it in temrs of time ... I attached a pic for the task I will do and I have attached the code that is need correction...

So PLEASE could anybody help?!

Thank YOU

Download All
0 Kudos
Message 1 of 7
(2,856 Views)

I'll suggest (and later will also demonstrate) you, use For loop for repeatitive code.

 

Now based on the picture DSC_0037.jpg (algorithm), steps would be:

1. Divide the signal into 10 pieces (this will be an array/waveform)

2. Calculate RMS of each small piece (this will be numeric/scalar value).

3. Calculate sum...??? (what are the operands... or is there any array resulting in previous step which I missed..??)

4. Plot...?? because of doubt in previous step, its not clear what to plot...!!


I am not allergic to Kudos, in fact I love Kudos.

 Make your LabVIEW experience more CONVENIENT.


0 Kudos
Message 2 of 7
(2,839 Views)

I want to sum the RMS value of each piece and get the final value which is V , then the values of V that I get from each piece I want to plot them in terms of time to study the variation of energy of the signal with time

0 Kudos
Message 3 of 7
(2,834 Views)

What so ever you're trying in your for that you need not convert the samples (array) into waveform. You can directly tap the samples after 'Reshape Array' function.

 

Attached is the equivalent code with two outputs:

1. Graph of RMS values of enegies from each piece named as 'Energy []'

2. Sum of all energies named as 'Total Energy'.

 

Equivalent Code


I am not allergic to Kudos, in fact I love Kudos.

 Make your LabVIEW experience more CONVENIENT.


0 Kudos
Message 4 of 7
(2,826 Views)

Also, I've not tried it before but, you can use 'Get Waveform Subset.vi' instead of using 'Array Subset' function.

 

Get Waveform Subset vi.png


I am not allergic to Kudos, in fact I love Kudos.

 Make your LabVIEW experience more CONVENIENT.


0 Kudos
Message 5 of 7
(2,823 Views)

how can I plot the Energy in terms of time?

0 Kudos
Message 6 of 7
(2,812 Views)

If you check here:

http://forums.ni.com/t5/LabVIEW/Sum-of-the-Energy-of-the-signal/td-p/2491178#M760345

 

The second output is the same, that you want to plot against time... now you need to figure out the rate (dt) to plot it wrt time.


I am not allergic to Kudos, in fact I love Kudos.

 Make your LabVIEW experience more CONVENIENT.


0 Kudos
Message 7 of 7
(2,792 Views)