From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I implement a polynomial function to receive a desired output?

Solved!
Go to solution

I am acquiring data from a NI USB-6002 DAQ.

 

I want to convert a voltage value to a displacement value.

 

In Microsoft Excel I made a table. I recorded voltage values and the corresponding displacement values.

 

I plotted the data and the best fitting line was a fourth order polynomial function which looked like this;                         Y = A + BX + CX^2 + DX^3 + EX^4

 

*A,B,C,D, and E are all constants which I have values for

*Y is the displacement value which I would like to ultimately receive

*X is the voltage value coming from the DAQ.

 

I am having trouble creating the block diagram for the polynomial function I would like to implement. I tried using the math functions but I'm not sure how to add a power to the data coming from the DAQ.

 

Any feedback would be highly appreciated.

 

Thank you.

 

 

0 Kudos
Message 1 of 2
(3,344 Views)
Solution
Accepted by topic author belae1ka

You could use the "Polynomial Evaluation" function to apply your polynomial coefficients on your X data…

(Otherwise use those simple numeric functions like Add and Multiply!)

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 2
(3,334 Views)