LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Non-varying variable in Constrained Nonlinear Optimization

Solved!
Go to solution

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?

0 Kudos
Message 1 of 6
(3,010 Views)

You cannot fit for for integer parameters. (How is it supposed to calculate the partial derivatives?)

Can you show us some code?

Message 2 of 6
(3,001 Views)

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.

Download All
0 Kudos
Message 3 of 6
(2,991 Views)

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?

0 Kudos
Message 4 of 6
(2,979 Views)

"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"

0 Kudos
Message 5 of 6
(2,962 Views)
Solution
Accepted by topic author rasmanathome

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).

 

Message 6 of 6
(2,947 Views)