07-19-2011 01:13 PM
I have built a labview VI so as to execute an optimization problem that I had previously solved using Matlab's fmincon. The transition wasn't difficult and the VI mostly works except for one variable.
The VI is expected to optimize an array of four variables: the first three will be input to a control systems function, and the last is converted to int to be used for array allocation (think of it as a time switch for the second and the third variable). When I run the code, that last variable doesn't change, not by one iota. To confirm this, I set a breakpoint with a probe and watch as Labview would modify the three other variable but still has the fourth variable at 140.00000 . I've tried varying the criteria and settings, but to no avail.
What am I missing, or is this somehow normal?
Solved! Go to Solution.
07-19-2011 02:33 PM
You cannot fit for for integer parameters. (How is it supposed to calculate the partial derivatives?)
Can you show us some code?
07-19-2011 04:54 PM
not all optimization routines use partial derivatives (hence "non-linear")
I've attached the main file that decouples the variables. The resulting output will be the input to a control system whose output will be compared to a specific predetermined plot.
07-19-2011 05:27 PM
Sorry, are you really talking about Constrained Nonlinear Optimization? How does it all relate to the VI you have attached?
Would it be possible for you to attach the actual set of VIs that gives you the incorrect behavior as described in your first post?
07-19-2011 07:52 PM
"Sorry, are you really talking about Constrained Nonlinear Optimization?"
yes
"Would it be possible for you to attach the actual set of VIs that gives you the incorrect behavior as described in your first post?"
that would be a dozen files, some of which I cannot share...
How does it all relate to the VI you have attached?
{X, Times} --> [sequence_to_rate_error] --> Control system --> output --> [transform] --> set_path --> H2Norm (set_path - ideal_path) --> f(X)
where X is the input Constrained Nonlinear Opimation and f(X) is the "objective function value"
07-20-2011 03:35 PM
I updated my VI to make it a bit more continous by modifying the value of the array where the transition occurs. While this produces a negligable change in the entire system, it is sufficient to fix my initial problem. apparently the Constrained Nonlinear Optimization can stand staircase type function (it needs a least a first-order hold).