Optimiziation of the Transmission
6 次查看(过去 30 天)
显示 更早的评论
Hi! I have a big problem. I want to optimize a simulation which is available online. The simulation use the Transfer matrix method to create three functions: Absorption, reflection and transmission of a multilayer system. Now I want to run the simulation several times (with a for loop) and each time I change the thickness of the layers. Thus I would like to measure the optimum thicknesses of each layer to get maximum transmission.
This take a lot of time especially if you have many layers. I read about the optimization toolbox of MATLAB, but I dont know how to manage this because I dont have the function as formulas.
I hope wou can help me.
0 个评论
采纳的回答
Matt J
2015-1-30
编辑:Matt J
2015-1-30
but I dont know how to manage this because I dont have the function as formulas.
You don't need the function as a closed-form formula. The Optimization Toolbox solvers require only that you have a code routine that computes the quantity you're trying to optimize at a given set of input parameter choices. And...that you know this function to be smooth and differentiable. As an example,
offset=1;
x0=pi/4;
[xsol,fsol]=fminunc(@(x) not_closed_form(x,offset), x0)
function val=not_closed_form(x,offset)
val=-cos(x);
val= val+offset;
end
produces the solution
xsol =
-1.0001e-08
fsol =
0
3 个评论
Michael Haderlein
2015-1-30
Just as Matt has shown it. x can be an array. I guess in your example, x will be 3x1. Write all the things in your loop (save, load, simulate, Process) into Matt's not_closed_form function. Parameters which are not subject to optimization (d1?) can be treated as Matt has shown with his offset. You don't need no loops then.
Hope this helps.
Best regards, Michael
更多回答(2 个)
Thiri Su
2018-4-14
Dear Anotonio Sereira, I would like to write the program with transfer matrix method about 1 dimensional multilayered reflection and transmission for human head but I don't know how to write that program. So could you please help me?
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Direct Search 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!