LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Need help with array

OK, if I understand you right, you want to do four seperate fits:
  1. Coeff of pitch(P,Y)
  2. Coeff of yaw(P,Y)
  3. Sp(P,Y)
  4. coeff of dyn pres(P,Y)

to a 2D polynomial. Do you know the order? How many adjustable paramters?

What is your LabVIEW version?

0 Kudos
Message 11 of 30
(3,160 Views)
Hi,
 
 
You are correct regarding the four fits. I have not thought about the order however, I don't think anything above four or five would be required for a decent fit. I am using LabView 8.2.
 
The primary objective to establish the relationship so as to proceed to phase two 🙂
 
Thanks,
ViHAR.
0 Kudos
Message 12 of 30
(3,161 Views)
OK, here's a quick modification that allows you to select the desired column to fit via a ring, containing the column headers as reference. Switch "SelectZ" to change the data you want to fit. It is designed to read your sample file.
 
See if you can use this for your purpose. Good luck!
Message 13 of 30
(3,149 Views)
Hi altenbach,
 
 
I have done an initial run and the program seems to do what I want. Thanks a lot. 🙂 I will now fit it into my primary VI and see how it works.
 
 
Thanks and Best Regards,
ViHAR.
0 Kudos
Message 14 of 30
(3,125 Views)
Hi altenbach,
 
 
I am sorry, I have to admit that I goofed up. I initially thought that I will be able to adapt your program to fine tune to my requirements (to save you the work). However, the coding seems a bit too comprehensive and I cannot seem to pick the the correct spots to change (probably becaue of my non-familiarity with LabView 😛 ).
 
Here's the real deal... 'Sp', and 'coeff. of dyn. pres.' are yielding perfect results, just what I wanted. However, what I didn't tell you earlier was that for 'coeff. of pitch' and 'coeff. of yaw', the relationship is inverted... which means for 'coeff. of pitch', the plot needs to be with 'coeff. of pitch' and 'coeff. of yaw.' on X and Y axes respectively, with 'Pitch' (P) being on Z. Similarly for 'coeff. of yaw', the plots needs to have 'coeff. of pitch' and 'coeff. of yaw'. on X and Y axes respectively, but with 'Yaw' (Y) on Z this time.
 
Please let me know if I have confused you... and I will elaborate. Where do you think should I make the relevant changes?
 
 
Regards,
ViHAR.
0 Kudos
Message 15 of 30
(3,097 Views)
Hi altenbach,
 
 
I tried to make a few changes myself. They are effected in '3DPolyFitFULL3D_Select_edited.vi', enclosed in the attached library. The changes involve adding ring controls for selecting X and Y, just like you had for Z. However, the residuals are hitting the roof if I select 'coeff. of pitch' and coeff. of yaw' as X and Y respectively. This is applicable for both 'Pitch' and 'Yaw' as Z.
 
I know there's more to it than just the ring controls that I've added. Any insights/comments? I'll keep trying until then.
 
 
Best Regards,
ViHAR.
0 Kudos
Message 16 of 30
(3,090 Views)

Your fit cannot work for some combinations. For example, if you look at the data for Yaw(CP,CY), the data form a vertical arc, meaning you have multiple Z for some X,Y pairs.

If you swap the axes and e.g. calculate CY(CP, Yaw), the fit works fine.

(I have problems with your VI, it crashes my LabVIEW. Here's my variation of the same. We actually don't need the call by reference node).

Message Edited by altenbach on 08-31-2007 09:49 AM

Download All
0 Kudos
Message 17 of 30
(3,073 Views)

Hi altenbach,

 

Yes, I agree that there are multiple values Z for some XY pairs in many cases, which will obviously cause difficulty on plotting. However, since Pitch and Yaw will be unknown in the main application, it is imperative that it falls on Z axis each of the two plots, else it would be impossible to find them. Do you think it is possible to compute these unknowns on the basis of the edited plots CY(CP, Yaw)? I doubt it 😛

This is a published method, so there must be some way out. I will work on it.

 

Regards,

ViHAR

0 Kudos
Message 18 of 30
(3,045 Views)


@Vihar wrote:

I doubt it 😛
This is a published method, so there must be some way out. I will work on it.


Clearly, you won't get a unique answer, because there will often be zero, one or two (or even more) answers for the same xy input. A 2D polynomial cannot work here.

Do you have a link pointing to the theory?

Maybe it would be possible to solve this after e.g. a transformation to spherical coordinates?

0 Kudos
Message 19 of 30
(3,034 Views)

Since the calibration process is unique, I am currently looking into the possibility of the Z values being unique (contrary to what we have observed until now), by increasing the accuracy of the calculation.

The theory I am referring to, is in the following book...

Bryer, D.W. and Pankhurst, R.C. (1971). Pressure-probe methods for determining wind speed and flow direction. London (UK😞 Her Majesty’s Stationary Office. pp. 68-69.

Thanks and Regards,

ViHAR

0 Kudos
Message 20 of 30
(3,030 Views)