Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

krivan

Member

04-15-2011 08:32 AM - edited 04-15-2011 08:33 AM

Options

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Hi,

I have a 3D geometry like in the picture attached. How is it possible to make a 3D fitting plane and use that afterwards instead of this noisy 3D signal? I read about it a bit and found interesting infos like this one

http://forums.ni.com/t5/LabVIEW/fitting-2D-and-3D-geometries/m-p/314469#M162750

but I couldn't really get it right how I could use that with my problem. Any thoughts how it is done, I could not find any VI in the libraries that would do 3D fitting.

Thanks,

Krivan

04-19-2011 02:11 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Can I have some advice on this topic please.

alpha1

Active Participant

04-27-2011 11:02 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Hi Krivan,

It looks like you're most the way there; just to confirm, are you looking to effectively remove everything from the bottom graph that is not shaded in red? Could you upload the data and the VI that you're currently working with so we can help further?

Regards,

Imtiaz Chowdhury

Project Manager

Green Running / Austin Consultants

04-27-2011 11:37 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Hi Imtiaz,

I would upload the VI but I had to realise that it wouldn't lead me to the solution. Basically what I did was a peak-search. I systematically tried to replace those spikes with predefined values. Say if i[1] and i[3] was OK but i[2] had a very different value, the i[2] was replaced by (i[1]+i[3])/2 so that the 3D geometry could keep its slope. So I tried this but didn't really work out.

Also tried Altenbach's approach referenced above but it wasn't really obvious for me how I could include my data into that VI.

Sure, I'll upload soon, I am just not at those computers.

What I try to achieve is that from this noisy data I create a fitted 3D geometry that follows the slope of the original data but does not have any of those spikes. I also thought about a 2D approach as well. So I have a 2D dataset in a TDMS file that after read-in can be considered as 3D. Now, if I systematically read out this 3D array in a way that I sample the same data points from the pages along the 3D array in theory I would get a 1D array at each read-out cycle that I can feed into a Waveform graph.

Therefore I imagined that I could feed this curve into a "fitting curve" VI from the library and the fitted result will be a fitted curve, i.e. a fitted 1D array with the same number of elements as the original one.

This fitted array I could put back into the 3D array and so after a number of cycles at the end I would get a "fitted 3D array".

However I think it would work only in theory because it would require too much computations and would last too long.

Any suggestions perhaps how it is done efficiently?

05-03-2011 12:07 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Hi,

I managed to get considerable less noise in the data however I still don't know how to fit a 3D plane to this data.

I attached a TDMS file and a VI to make it easier to open the data.

Thanks,

Krivan

altenbach

Knight of NI

05-03-2011 12:58 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Your 2D array is surrounded by zeroes, I assume you don't want to fit those.

How about fitting to a 2D polynomial?

05-03-2011 01:17 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Yes, it is surrounded by zeros because I simply chopped off some problematic artifacts from the sides.

As I've said above I have tried your solution with the LS and L-Marq. algorithms but I couldn't get it right how I should feed in the data and how the coefficients are calculated [I haven't had any practice with polynomial fitting before].

Did you mean with the 2D polynomial fitting that the TDMS file contains a 2D array anyway, so if the data is 2D fitted and I wire it into the 3D graph the result will be a fitted 3D plot?