01-12-2009 12:43 AM
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 ?
01-12-2009 12:58 AM
01-12-2009 11:40 AM
01-13-2009 01:05 AM
01-13-2009 01:07 AM
Just now ,I can"t post d[i],now ,I post it .
01-13-2009 11:16 AM
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
01-13-2009 02:45 PM
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
11-05-2009 07:14 AM
Could be possible to reupload these last examples saved for Labview 8.5 instead of 8.6?
Thank you!