02-23-2010 12:40 AM
Solved! Go to Solution.
02-24-2010 10:12 AM
Hi Nick,
A good way to get a handle on programaticaly creating polynomial scales might be to first try creating one through the configuration based tools in Measurement and Automation Explorer. I took the following screen shot from MAX:
The help for this scale window offered the following information on polynomial scales and coefficients:
Use a polynomial scale to scale values using an nthe order polynomial equation. You must specify both forward and reverse coefficients.
For example, suppose you want to relate prescaled values to scaled values according to the polynomial scale:
y = x2 + x + 0
Where x is a prescaled value, and y is a scaled value.
For input operations, if the device acquires a prescaled value of 2, the scaled value that is read is 6. For output operations, if you write a scaled value of 6, the device generates a value of 2.
Coefficients is whether the polynomial coefficients are from pre-scaled to scaled values (forward) or from scaled to pre-scaled values (reverse). You must specify both forward and reverse coefficients.
Max/Min is the maximum/minimum value expected from your measurement after scaling.
I hope that helps, let us know if you have any further questions.
Thanks
Scott M.
08-12-2011 10:25 AM - edited 08-12-2011 10:26 AM
Scott,
I am looking for a control that generates X value based on polynomial coefficients and Y value.
For example, if you look at your Polynomial Graph image above, it should find me that when I give a Y value of 210, the result would be 8 Volts based on the given polynomial order and coefficients (array).
I don't believe this was never created yet. Any suggestions?
08-15-2011 05:49 PM
One way would be to take your polynomial, add it to the y value of interest, and then find the roots of the new polynomial.
Jon S
08-16-2011 03:17 PM
When a polymonial degree is less than 2 than it is easy; but it makes it difficult to calculate when the degree is > 2.
08-17-2011 03:52 PM
This is true. This issue you are trying to address is to find the roots of an arbitrary polynomial, and any polynomial of order higher than 4 has no easy solution in closed form.
What order of polynomial are your approximations? Any solution will involve some sort of binary search or interpolation algorithm. Are you looking for a suggestion on what method to use?
Jon S