Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

CalibrationPolynomialForwardCoefficients and CalibrationPolynomialReverseCoefficients

Solved!
Go to solution
Collagues,

How does MStudio framework use CalibrationPolynomialForwardCoefficients and CalibrationPolynomialReverseCoefficients (properties of AIChannel)?  Why do we have 2 sets of coefficients?  Do minimum and maximum boundaries apply to signal before or after calibration?  I’ve read the online help, but it’s very brief.  So far, I was able to find only samples that used calibration table, but not the polynomial.

Any suggestions references and insight is appreciated!

Cheers,
- Nick
 
0 Kudos
Message 1 of 6
(4,480 Views)
Solution
Accepted by topic author Nick_Alexeev

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:

PolyScale.JPG

The help for this scale window offered the following information on polynomial scales and coefficients:

 

Polynomial Scale

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.

Applications Engineer
National Instruments
Message 2 of 6
(4,453 Views)

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?

0 Kudos
Message 3 of 6
(3,841 Views)

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

Applications Engineer
National Instruments
0 Kudos
Message 4 of 6
(3,825 Views)

When a polymonial degree is less than 2 than it is easy; but it makes it difficult to calculate when the degree is > 2.

0 Kudos
Message 5 of 6
(3,814 Views)

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

 

Applications Engineer
National Instruments
0 Kudos
Message 6 of 6
(3,804 Views)