# LabVIEW

cancel
Showing results for
Did you mean:

Solved!
Go to solution

## calculate the energy of a signal

I am a new user of labVIEW please I need help ... I have EMG signals taken from students and i want to calculate using matlab the energy of the signals after i have rectified the signal.

Message 1 of 17
(4,225 Views)

## Re: calculate the energy of a signal

The way I am understanding it, you have a data acquisition system with LabVIEW as a front end. You acquire EMG signals, and want to compute the energy via Matlab?

Refer here to use Matlab script in LabVIEW.

Kudos are the best way to say thanks 🙂
Message 2 of 17
(4,204 Views)

## Re: calculate the energy of a signal

No ... I have complete the acquisition and I have collected 30 EMG signals ... I want to use labview to make a code that calculate the energy of the signal and trace the variation of the energy in terms of the time could this done in labview?

Message 3 of 17
(4,196 Views)

## Re: calculate the energy of a signal

I am so thanksful ... but i couldn't open the file since I have LabVIEW version 2009 !!

Message 4 of 17
(4,192 Views)

## Re: calculate the energy of a signal

Consider looking into the Biomedical User Group.  You may find others who share your interests.

Rectification can be performed in software by taking the absolute value. There are VIs which calculate RMS values which are closely related to the energy. Look int the Signal Processing palette.

Lynn

Message 5 of 17
(4,180 Views)

## Re: calculate the energy of a signal

Hi Imano,

First, I would have few questions regarding to the topic. In what file format are the data stored? You can create processing algorithm (with my guidance) on your own if you know the formula. Do you have the formula? There are also functions for computing various values from signal, did you try to search on ni.com?

If you have an algorithm for processing (or you are familiar with Matlab more than with LabVIEW), you can use MathScript Node ( http://zone.ni.com/reference/en-XX/help/371361J-01/gmath/mathscript_node/ ) or MATLAB Script ( http://zone.ni.com/reference/en-XX/help/371361J-01/gmath/matlab_script_node/ ). The difference is that in case of MATLAB Script, LabVIEW calls Matlab environment (so Matlab must be installed), in MathScript is used engine created by NI, so you do not need to have Matlab installed but you do not have full functionality (functionality can also be little different). MathScript is included in MathScript RT Module compared to need of Full Development System for MATLAB Script.

Please, let me know if this is helpful and if not, provide at least the data file format (if it is possible, example file would be great) and the formula for energy (I suppose that it is integral of squared value).

Martin

Message 6 of 17
(4,142 Views)

## Re: calculate the energy of a signal

here is a file for the signal I collect ... it is an EMG signal ... i dont have a formula fot it

Message 7 of 17
(4,130 Views)

## Re: calculate the energy of a signal

Hi Imano,

please follow the attached VI. There is shown how to read the data from file and process them. The data looks little bit weird because it has about 600 or 1000 channels (depending whether the data channel is in row or column). Then for every data channel is computed RMS which is usually considered as quantity connected with energy. Please let me know if this is ok or any additional problem appeared.

Martin

Message 8 of 17
(4,103 Views)

## Re: calculate the energy of a signal

Hi

I could not open the file since I have LabVIEW version 2009 !

Thank You

Message 9 of 17
(4,097 Views)

## Re: calculate the energy of a signal

Hi Imano,

sorry for that, now I send it in 2009 version.

Martin

Message 10 of 17
(4,088 Views)