Does simulation annealing minimize objective function which has non constant parameter?

1 view (last 30 days)
Main File
============================
a0 = [.0001 .0001 .0001 .0001 .0001 ];
w = linspace(0,pi,1000);
for i=1:length(w)
w_scal=w(i);
f =@(a)abc(a,w_scal);
[a_vec fval] = simulannealbnd(f,a0);
end
Function File
============================
function ARE = abc(a,w)
ERR = ((1/(j*w)) - ((a(1)*exp(2*j*w) + a(2)*exp(j*w) + a(3)) / (exp(2*j*w)+a(4)*exp(j*w) + a(5)))/(1/(j*w)));
ARE = sum(ERR.^2);
After estimating variables a(1),a(2)..a(5), the ARE's Plot w.r.t w(Omegha)is.
===========================================================================
But The plot should draw like these two graphs.
===============================================
Conclusively, coefficients a(1)....a(5) are not estimated correctly.
Thanks,
Nitin

Accepted Answer

Torsten
Torsten on 27 Apr 2015
I still don't see where you set the variable "j" in your function "abc".
Best wishes
Torsten.
  3 Comments
Torsten
Torsten on 28 Apr 2015
I don't see any abs() function in the definition of ARE...
To minimize a function, it has to be real-valued.
Best wishes
Torsten.
Torsten
Torsten on 28 Apr 2015
What you do above does not make sense to me.
For one value of w, you try to estimate 5 parameters a(1),...,a(5) to make ARE minimal.
My guess is that you want to minimize sum_{i=1}^{n} ARE(i)'*ARE(i)
with
ARE(i)= ((1/(j*w(i))) - ((a(1)*exp(2*j*w(i)) + a(2)*exp(j*w(i)) + a(3)) / (exp(2*j*w(i))+a(4)*exp(j*w(i)) + a(5)))/(1/(j*w(i))));
but I'm not sure.
Best wishes
Torsten.

Sign in to comment.

More Answers (0)

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!