Optimiziation of the Transmission
6 views (last 30 days)
Show older comments
Antonio Sereira
on 30 Jan 2015
Answered: Antonio Sereira
on 14 Apr 2018
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 Comments
Accepted Answer
Matt J
on 30 Jan 2015
Edited: Matt J
on 30 Jan 2015
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 Comments
Michael Haderlein
on 30 Jan 2015
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
More Answers (2)
Thiri Su
on 14 Apr 2018
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 Comments
See Also
Categories
Find more on Direct Search 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!