07-06-2005 04:47 PM
07-06-2005 05:55 PM - edited 07-06-2005 05:55 PM
There are two main ways to do the fit:
Within certain limitations, both should give similar resuts, the general LS fit is however faster. It also does not need initial estimates for the coefficients (I set them all to zero for Lev-Mar).
I have modified my earlier example to do both, general LS fit and lev-mar so you can directly compare the two. Unfortunately, I no longer have LabVIEW 6.1 installed so I cannot test and reapir the downconverted version. I am thus posting both (LabVIEW 6.1 (as zipped folder) and LabVIEW 7.0 as llb). There probably will be some minor errors to correct before it will run in LabVIEW 6.1.
How to use: Whenever you change the order, method or algorithm, the VI calculates the new polynomial coefficients, displays the formula, calculates the full surface of the fit and displays the raw data and best fit plane on a 3D graph on tab 1. It also shows the fit points and residual in a 2D graph on tab 2. Tab 3 shows the list of coefficients and terms and allows you to calculate z for any give x,y pair. (you can also move the 3D cursor to do the same on tab 1 ;))
Please let me know if anything is not entirely clear. Good luck!
(There are probably some bugs, I did not spend much time on this) 🙂
Message Edited by altenbach on 07-06-2005 03:58 PM
07-06-2005 06:21 PM
07-06-2005 06:57 PM
@Honeywell wrote:
Unfortunately this example you provided did exactly the same thing.... it only iterated once.
07-06-2005 07:00 PM
07-06-2005 07:07 PM
07-06-2005 07:37 PM
08-29-2007 09:36 AM
08-29-2007 11:32 AM
@Vihar wrote:
I have a similar problem with 3D surface but with subtle differences.
Well, if the difference are only subtle, you can just start with my example and make some "subtle changes". 🙂
Sorry, I don't understand your problem description. can you make a small example with example data?
08-29-2007 12:00 PM
Hi again,
I am sorry, but I am not a programmer and not very familiar with LabView either. Let's consider this example...
In phase one (as mentioned in my previous post), a calibration table is made for several readings of pitch (P) and yaw (Y), this is saved to a CSV spreadsheet file. Now there are four different coefficients involved that require four individual surface plots, so we shall consider only one, Sp, which is a function of both P and Y. I am attaching a spreadsheet file (with first row headers), with P in column 0, Y in column 1 and Sp in column 11.
All I need to do is to establish a parametric relation between these three variables. Once the relation is established (by way of an equation), I can proceed to phase two.
Phase two involves using the equation to calculate Sp for known (but non-standard) values of P and Y.
I hope this makes the situation clearer.
Regards,
ViHAR.