LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with integration

Hey guys,

 

I have a poblem with realising an integration. Please check the attached screenshot of the integration I want to implement in Labview.

It is part of a bigger calculation, but I can't seem to figure this one out.

I have the values of ua (10.000 per second) saved in an array. What this integration is supposed to do is give me the fourier coefficient for one period (200 data points out of my 10.000 and this calculation 50 time.

 

So bottom line I have my for loop built ready, I just can't figure out how to set up the integration part.

Can you help me?

0 Kudos
Message 1 of 6
(3,294 Views)

 

Hi eMKay,

what about using the Numeric Intergration VI? Here the LV-Help:integration.png

0 Kudos
Message 2 of 6
(3,244 Views)
I looked at that too, but can't seem to find any way to implement my function using that VI
0 Kudos
Message 3 of 6
(3,241 Views)

hi emkay,

 you can use 1-d integration function itself with input array as the samples which you got and dt as (T/(size of input array)) and integration type as simpsons 3-8 rule ...once the integration is over you need to multiply the resulting array with 2/T....For more information about the simpsons rule refer the help of 1-d integration function of labview..

 

 

 

Thanks and regards,

srikrishnaNF

Regards,
Srikrishna


0 Kudos
Message 4 of 6
(3,229 Views)

hi srikrishnaNF,

 

but I'm not just integrating over my samples Ua(t) but over Ua(t)*cos(2*Pi*f1*t).

So I don't know how I am supposed to put that in an array. 

 

What I tried is just pretending the integration is a sum, so this is my VI, I'm not sure if it is right tho.

 

I attached my current test.vi

 

So here is what I'm doing. I'm splitting my 2d array up into two 1d arrays named time array dummy and data array dummy. 

Time array dummy has the time values and data array dummy inhabits the data values at that time.

 So i basiacally make the calculation inside the integration Ua(t)*cos(2*Pi*f1*t). every time the inner for loop executes (200 times) it just adds to the previous value. So iin essence it shouldbe a integration within t-T to t (with T being 50Hz and 10.000 datapoints per second), right?

 

0 Kudos
Message 5 of 6
(3,209 Views)

 

Hi eMKay,

 

maybe I don´t get the point but I think your function can be  build as in the VI  I attached here... 

Then you must just integrate it. 

Best regards

 

Andrea P. 

 

0 Kudos
Message 6 of 6
(3,186 Views)