Optimiziation of the Transmission

5 views (last 30 days)
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.

Accepted Answer

Matt J
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
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
Antonio Sereira
Antonio Sereira on 31 Jan 2015
Hi! Thanks very much for the answer. I will try to finish everything until monday. My teacher asked to do something els and I dont know if fminunc can do this too:
I have to minimize the transmission and the absorption but maximize the reflection. This three are written as columns in same .mat file. For that he gave me the function for the current density J, which is just the integral of the product of Absorption and solar intensity over the wavelength. And he told me that I should plot this J (for each layer)as function of its thickness.
Do you understand how to solve this kind of problem? I was thinking to be goog in mathematics would be enough to use MATLAB.
Thanks for any advise.

Sign in to comment.

More Answers (2)

Thiri Su
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?

Antonio Sereira
Antonio Sereira on 14 Apr 2018
Dear Thiri Su,
It depends what kind of method you use. I used the RCWA (rigorous coupled wave analysis) to get the calculation of the Transmission, Reflection and Absorption.
Best,
Antonio

Community Treasure Hunt

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

Start Hunting!