LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Constrained non linear optimization in my VI doesn't work.

Solved!
Go to solution

Hello? everyone,

 

I have tried to make my own optimization program based on a example provided by NI, "Optimization and Calibration with Simulation - Calculate Parameter". The provided optimization program  generates a spring simulation with Gaussian noise and fitting it.

I have tried to apply a complex exponential function to it. However, although there are no errors, the "Optimize" button does not optimize at all(actually graph vibrates a little but, it became original shape). I do not know what the problem is. Please help me.

I attach my optimizer.

0 Kudos
Message 1 of 5
(2,421 Views)
  • Does your model give any reasonable output for a given set of parameters?
  • Why is your inner calculation carried out in SGL? (That severely limits the resolution of your calculations. Look at all the coercion dots!)
0 Kudos
Message 2 of 5
(2,404 Views)
Solution
Accepted by topic author getdlts

altenbach wrote:
  • Why is your inner calculation carried out in SGL? (That severely limits the resolution of your calculations. Look at all the coercion dots!)

If you change the representation of the all the orange terminals inside "Correlation function (SubVI).vi" from SGL to DBL, the optimization succeeds. Try it!

 

(note that you should probably set the "spring constant(start&fit)" upper limit a bit higher (e.g. 10) for more reliable results. You are constraining too much!)

 optimize.png

 

0 Kudos
Message 3 of 5
(2,400 Views)

Thank you very much Altenbach, it is really working! 

If it was not for your help, I would have been struggled for solving that problem.

0 Kudos
Message 4 of 5
(2,374 Views)

Thank you very much Altenbach, it is really working! 


altenbach 이(가) 작성함:

altenbach wrote:
  • Why is your inner calculation carried out in SGL? (That severely limits the resolution of your calculations. Look at all the coercion dots!)

If you change the representation of the all the orange terminals inside "Correlation function (SubVI).vi" from SGL to DBL, the optimization succeeds. Try it!

 

(note that you should probably set the "spring constant(start&fit)" upper limit a bit higher (e.g. 10) for more reliable results. You are constraining too much!)

 optimize.png

 


If it was not for your help, I would have been struggled for solving that problem.

0 Kudos
Message 5 of 5
(2,372 Views)