Jump to content

numeric integration


lsheang

Recommended Posts

hi

i have been getting the analog signal. the analog signal consists of at least 2 curve for each sample. what i need to do is to get the area under these 2 curves respectively. what i did is using basic level trigger to get the 2 location of each curve then extract portion of signal. it works. however, when input to numeric integration vi, it can get the value for the first curve. for the subsequent sample of data, it shows NaN. what;s wrong with that?

thanks

regards

Link to comment

Hi,

looking at your vi's there are a number of errors:

1 If you are looking to find the 2 peaks in your data, the input to the detect triggers should be 2 (instead of default of 1).

2 The dt input to the integration vi is the spacing between consecutive pts in your data array. It is NOT the spacing between the 2 peaks in your data.

3 For trivial operations like abs(x1-x2), avoid usage of the express Vi for performance reasons.

Besides the above 3 issues, I am not sure what you are trying to integrate. If you want to integrate the area under BOTH peaks, then your VI won't work, since you are detecting the 1st peak correctly (rising edge), but the second peak is NOT included in the data, since you actually need to detect falling edge for the second peak (see my screen shot of your front panel).

You should change your trigger detect algorithm, to separately find the pts in time for the 2 peaks, and then use the rest of your VI. One way, is to reverse the data array and find first rising edge; this should give you the falling edge of the second peak.

Neville.

post-2680-1167245465.gif?width=400

Download File:post-2680-1167245490.llb

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.