LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

integration

Solved!
Go to solution

Hello,

I'm a beginner in LabView and have a question regarding integration from an x-y graph. I'm trying to get a hysteresis loop for various frequences from collected data in Labview. In order to do that I have to integrate function dM/dt(H), where dM/dt is a time derivative of magnetization, and H is magnetic field strenght, to get function M(H), i.e. hysteresis loop. I have separated both signals and send them to x-y graph, but don't know how to integrate data from that graph to get hysteresis loop (please see the attached picture). I'd like to show integrated data on another x-y graph.

 

Data are collected using following hardware:

-PCI-6014 card

-Tektronix AFG320

-NI BNC-2090

-4 coils, BNC cables, ferromagnet, wires

 

Thank you for your time.

Hrvoje

 

 

0 Kudos
Message 1 of 15
(4,519 Views)

Hi HrvojeM,

 

use one more ExpressVI to do the integral stuff -  there is a function available in the ExpressVI math palette.

I would put it between SelectSignal and BuildXYGraph…

 

(With lots of sarcasm 😄 )

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 15
(4,483 Views)

Hi HrvojeM,

 

There are a few functions in the Mathematics >> Integration and Differentiation pallette. You will probably have to use "Unbundle by Name" to separate your data from the time scale before using those functions.

 

In the future please upload your code, not a picture of the code, and we can show you.

0 Kudos
Message 3 of 15
(4,465 Views)

Your code image is way to opaque to be helpful (we cannot see any data and we cannot see inside the express VIs!), but if the x values are unevely spaced (why else would you use an xy graph???), you probably would need to use the Uneven Numeric Integration VI.

 

For more precise help attach your code and some data.

0 Kudos
Message 4 of 15
(4,442 Views)

Thank you for your suggestions.

Here is my VI.

I have tried to integrate dM/dt(H) function with several integrate VI's but haven't succeeded. Sometimes I get the message "You have connected two terminals of different tipes. The type of the source is 1-D array of cluster of two elements. The type of the sink is 1-D array of double" or something similar. I also tried to integrate dM/dt(t) and H(t) separetly and show them on x-y graph but that didn't work (I don't know if that is a proper way to get a hysteresis loop anyway). 

If you need any other information please ask.

How can I send you the data I'm getting?

 

Thank you for your time,

Hrvoje.

0 Kudos
Message 5 of 15
(4,342 Views)

Hi HrvojeM,

 

have you tried one more ExpressVI for your integration of signal data?

check.png

(I put in two instances of the ExpressVI as I couldn't follow your description of the needed formula…)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 6 of 15
(4,331 Views)

Hi  GerdW.

I have tried your suggestion but the result is not a hysteresis loop (our signal is not yet as stable as we would like it to be so maybe that is the problem).

How can I integrate data from x-y graph [dM/dt(H)] in my VI?

 

Thank you for your time,

Hrvoje

0 Kudos
Message 7 of 15
(4,305 Views)

Hi altenbach.

I've used x-y graph because I needed to put dM/dt(t) signal specifically on the y-axis and H(t) signal specifically on the x-axis in order to check whether our sample material (VITROVAC) is responding as the theory predicts. I think that the x values (voltage from the Tektronix AFG320) are evenly spaced. Is there some graph that is more convenient than x-y graph? Will I be able to specifiy which signal goes on which axis?

 

Thank you for your time,

Hrvoje

0 Kudos
Message 8 of 15
(4,299 Views)

Hi Hrvoje,

 

How can I integrate data from x-y graph [dM/dt(H)] in my VI?

A graph is just an indicator - you surely want to integrate the output of the BuildXYGraph expressVI!

If you want to do this you need to convert the plot data to a format suitable for your integration…

 

You whole VI consists of ExpressVIs at the moment. I don't recommend to use them if you want to learn LabVIEW - and more importantly if you want to KNOW what kind of data you have in those wires. (The LabVIEW paradigm is called THINK DATAFLOW!) If you woul ddo this it would be so much easier to get all the plots you like to have…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 9 of 15
(4,287 Views)

Hi GerdW.

 

Before I do the integration part I have to take the average of dM/dt(H) signal. I'm taking 2000 samples at 60k rate and need to make 100 iterations and than take the average. After that, the averaged signal has to be integrated. How can I calculate the averaged signal?

 

Thank you for your time,

Hrvoje

0 Kudos
Message 10 of 15
(4,140 Views)