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!