LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Seeking an optimization algorithm

There are 4 arrays in the expression, a[i],b[i],c[i],d[i], and a[i]s range is [0.66-0.91],there are 300 elements in it. The expression is :

  b[i] have 300 elements in it. ,c[i] have 300 elements in it, d[i] have 300 elements in it. I know the values of the  a[i],b[i],c[i],d[i].Now , what are  the values of x, y, z?How can I do it ?

 

 
0 Kudos
Message 1 of 8
(3,824 Views)
The expression is in the attachment .
0 Kudos
Message 2 of 8
(3,820 Views)
Can you post some data? 
0 Kudos
Message 3 of 8
(3,775 Views)
Now, I post the values of a[i],b[i],c[i],d[i],they are in the attachments.Thanks !
Download All
0 Kudos
Message 4 of 8
(3,749 Views)

Just now ,I can"t post d[i],now ,I post it .

0 Kudos
Message 5 of 8
(3,748 Views)

This looks like a least squares data fitting problem with 3 domains subject to a linear constraint.  a[i] is the data to be fit, b[i], c[i] and d[i] are the domains.  The model is 10^(-bx-cy-dz).  Seems like you could approach this a few different ways.

 

1.  Directly fit the model and handle the constraint by using the Constrained Nonlinear Optimization.vi.  This is the most straightforward to implement, but leverages little of the structure of the problem.

 

2.  By taking the log(base 10) of a[i] the fitting problem becomes a general linear fit, although we have no way to directly handle the constraint.   You could fit using this approach (General LS Linear Fit.vi), and then check for a constraint violation.  This approach takes advantage of the linear nature of the problem, but does not handle the constraint well.

 

3.  Using the same log transformation you could view the linear fitting problem as a quadratic programming problem.  The advantage of this approach is that the constraint can be handled directly.  The disadvantage is that the least-squares criterion is in the log domain and not the original.

 

4.  Directly fit the model using the Nonlinear Curve Fit.vi, with the constraint transformed using a barrier approach.  This is fairly straightforward to implement, but the constraint may need some fiddling to be handled as expected.

 

 

-Jim

 

 

Message 6 of 8
(3,707 Views)

Couldn't help myself, so I went ahead and coded up options 1,2, and 4.  For the data you sent the constraints are not active at the solution, so the general LS Linear solution is very close to the other two.  It might be interesting to see what happens when a constraint is active at the solution. Does this give the parameters you were expecting?

 

-Jim

0 Kudos
Message 7 of 8
(3,687 Views)

Could be possible to reupload these last examples  saved for Labview 8.5 instead of 8.6?

 

Thank you!

0 Kudos
Message 8 of 8
(3,369 Views)