How can I do a multi-objective and non linear optimization where the objective function is an integral with a parameter that varies
1 view (last 30 days)
Show older comments
In the attached picture is an equation of Gamma. I have to find the four values (a3, a2, a1 and a0) such that Gamma_dB=20*log10(abs(Gamma)) <= -15 not only with on value of k but for all the values of k, between 12 and 83.
With the following code, I managed to find the 4-elements matrix a, but for only one value of k. How can I extend the code to do the optimization of "a" for all the values of k (12:1:83) at the same time ? Thank you.
if true
freq = 3.5d9;
epsr = 2.33;
d = 0.508d-3;
c0 = 3d8;
Z0 = 50;
ZL=5.6;
L = 49.5d-3;
k = (2*pi*freq)/(c0*sqrt(epsr));
function [ Gamma ] = fun_Gamma(k, a, zmin, zmax)
fun = @(z, k) -0.5*exp(-2*1i*k*z).*(3*a(1)*z.^2 + 2*a(2)*z + a(3))./(a(1)*z.^3 + a(2)*z.^2 + a(3)*z + a(4));
Gamma = 20*log10(abs(integral(@(z)fun(z, k), zmin, zmax)));
end
objfun = @(a) fun_Gamma(k, a, 0, L);
nonlcon = @(a) fun_Gamma(k, a, 0, L)+20;
nonlconfun = @(a) deal(nonlcon(a), []);
Aeq = ZL/Z0*[0 0 0 1; L^3 L^2 L 1];
beq = [Z0; ZL];
a0 = [100; 100; 100; 100];
options = optimoptions('fmincon','Algorithm','interior-point','Display','iter');
[a, fval, exitflag, output] = fmincon(objfun, a0, [], [], Aeq, beq, [], [], nonlconfun, options);
end
1 Comment
Torsten
on 8 Jul 2015
How do you want to define your objective function if you consider all values of k at the same time ?
Best wishes
Torsten.
Answers (0)
See Also
Categories
Find more on Multiobjective Optimization in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!