LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how do I implement a polynomial control input

I'm using Labview 8.5 and the Control Design and Simulation toolkit or module or whatever it is. Anyway, I'm trying to build a controler where my desired input (Yd) is a function of a measured variable (X, see attached picture). Do I have to discretize the polynomial into a lookup table, or can I implement the polynomial as is? And, whichever way is the way to go, which VIs would I need to do so?

 

Thanks,

Brian

0 Kudos
Message 1 of 6
(2,981 Views)

Hi Brian,

i don´t understand what you need? Do you try to build a polymorphic vi, like "Write to Spreadsheet File"?

Mike 

Message 2 of 6
(2,963 Views)

In the Mathematical VIs there's a palette for polynomial calculations. These are not available in LabVIEW base.

I think you need Polynomial Evaluation:

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
Message 3 of 6
(2,962 Views)
You can also use the formula parse functions (under Mathematics -> Script and Formula -> Formula Parsing), allowing you to enter a formula like "ax^2+Bx+c" There are a few examples that ship with LabVIEW that show you how to use these functions.
0 Kudos
Message 4 of 6
(2,943 Views)

bcglaxer,

If your polynomial coefficients are known, then you can do something like the attached screenshot with a Simulation loop.  Simply multiply and add the values.  You would probably replace the 'a', 'b', and 'c' controls with contstants, and the 'x' control would be replaced with whatever code you are using to dermine the value of 'x'.   Is this what you had in mind?

 

Chris M

0 Kudos
Message 5 of 6
(2,924 Views)

Thanks for all the suggestions! There certainly are a lot of ways to go about this. I've used Polynomial Evaluation for now but may try the other approaches in the future if I run into problems. Thanks again,

Brian

0 Kudos
Message 6 of 6
(2,897 Views)