12-05-2005 09:35 PM
12-05-2005 11:18 PM
And pls take a look how the graph would look like if the x values are fed,
Clement
12-06-2005 01:44 PM
Good afternoon,
I am not too sure about why your readings are off – but since it is third-party hardware I’m not in a position to speculate. With regards to applying mathematical functions and adjustments to your readings – with LabVIEW the possibilities are endless (I know that sounds a little cliché, but it’s more or less the truth). Are you asking about good mathematical functions to adjust your readings, or are you asking how to implement a known mathematical function in LabVIEW?
If you are looking for how to implement your adjustments in
LabVIEW, you can start with some “drop and go”
Hopefully this helps address some of your LabVIEW platform questions. Please feel free to provide more information on the specifics of your situation and if possible, I’d be happy to help further!
Thanks for posting!
12-06-2005 06:38 PM
12-07-2005 06:03 AM - edited 12-07-2005 06:03 AM
Hi Astroboy
There is an example in the Labview Full Development System upward that will do what I think you want.
With your data it looks like this.
Hope this helps
David
Message Edited by David Crawford on 12-07-2005 06:04 AM
12-07-2005 11:43 PM
Hi. Thanks alot. This is great tool what I need. Woah So much to rack the brains to obtain the function!
Thanks again!
12-08-2005 01:01 AM
Hi So now I have the function obtained for any value of x.
However, when using the formula node to insert the defined function, there's an error.
I know the ' ^ ' must be changed to **, but it still has error. Could it be 'E'?
What is the proper function for the formula node?
Here's the function:
y = -55.598E+0 + 198.744E+0x - 60.861E+0x**2 + 12.284E+0x**3
so where could it be wrong?
Clement
12-08-2005 01:25 AM - edited 12-08-2005 01:25 AM
Clement
Not sure what the problem would be. The formula node looks like this
Notice that y = 120.0 for x = 1.25 is not exactly as you would expect. There is an error. This is because the curve fit is an appoximation. In this case you can decrease the amount of mean square error by increasing the order of the polymonial curve fit.
David
Message Edited by David Crawford on 12-08-2005 01:26 AM
12-08-2005 11:56 PM
Hi. Thanks. I found your example working.
However when I increase the the number of orders, 19,
to bring the function such that the evaluated y values almost mirror the raw values.
When I tried to test the built function, It always to match the raw y values.
I checked every details in the formula node and numbers but found them no errorS
Where could it go wrong?
I am sorry for taking much of your time. Pls find the attached.
regards
Clement
12-09-2005 03:30 AM
Mmm don't know
Time to do some experiments. I have attached a VI to help you on your way without confusing you too much, hopefully. My idea was to create the equation calculations in labview so that we can debug the variables. We can't really do that in the formula node. BTW, I couldn't see any issues in your formula node.
So whats in the VI.
You can cut and the paste the equation from the regression solver. I have then setup the vi to parse the equation string which will then allow us to calculate y for any given x. This then gives us a new (x,y) dataset evalutated from your original array. Form there we can graph the errors. This work fine for a bit then goes nuts.
There is a second technique in the file that uses the calculated coeffs (create and indicator to get the data and cut and paste into this vi) from the Regression Solver.vi for Poly order = 19 based on your original data. It works well.
I have a hunch that its digits of precision giving the problem but I really don't know at this point. Try using General Polynomial Fit.vi to calculate and read the coeffs directly from your dataset.
Interesting problem but I have to get to work . Keep bashing away at it and remember to post back your conclusions. If my code isn't right then please let me know as I haven't fully debugged it as I am trying to get an idea across.
Hope this helps. My head hurts
David