![]() In addition, this example demonstrates how to use a nonlinear constraint function that requires a specific FDTD simulation parameter as an input in addition to the variables used for optimization. Source position in respect to the grating in x direction.Angle theta representing the source injection angle in respect to y axis.The goal of the optimization is to maximize the average transmission into the SOI waveguide mode in the wavelength range of 1500nm to 1600nm.įor this example, the following four parameters are chosen as the optimization variables: This will allow us to compare the results from the MATLAB optimization with the results obtained by using a combination of Lumerical's built-in parameter sweep and particle swarm optimization utility. ![]() Optimization Project Goalįor this optimization project we use the FDTD simulation file from the Grating Coupler 2D-FDTD example referenced above. This ID system allows the users to open and control multiple sessions at the same time. The session referencing is done by using an unique ID that is assigned to each session during its initiation. Note that operations 2,3 and 4 can be executed only by referencing to an active session otherwise they will result in an error. Transfer variables between the Lumerical and the MATLAB workspace via an active session.Send and execute Lumerical script commands to one of the active sessions.The basic API workflow is depicted in figure 1 and it consists of four operations: Once the MATLAB API setup is completed we can use the related interoperability commands referenced in the "See Also" section. The other, more convenient option is to add the path permanently to the startup.m file that is loaded every time MATLAB is launched. One option is to run the following command every time after MATLAB is launched and prior to using API related commands: path(path,'C:\Program Files\Lumerical\FDTD\api\matlab') ![]() In our example when we use FDTD on a Windows machine this would be typically under the following location: C:\Program Files\Lumerical\FDTD\api\matlab The MATLAB API is located in the Lumerical installation folder. The second step required for smooth functionality involves telling MATLAB where to look for the API before using any interoperability related commands. On Windows machines this setup is executed automatically during the installation process, but it might be necessary for Linux users to add the install directory of given Lumerical product to their system path as described on this page. To allow for correct functionality, OS must know the location of Lumerical applications. The key component required to drive simulations from MATLAB is the automation API that comes with 2016B or newer versions of Lumerical products. MATLAB with Optimization Toolbox MATLAB API Setup and Workflow While we focus on a specific example of a grating coupler in FDTD, the target audience includes anyone who is interested in driving and controlling Lumerical applications directly from MATLAB. In addition, we will demonstrate how to setup a MATLAB function based on arbitrary simulation parameters to specify a nonlinear constraint for the optimization. ![]() In this example, we will demonstrate how MATLAB can be used to drive a multi-variable nonlinear optimization of a grating coupler in FDTD via Lumerical's Automation API. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |