Giter Site home page Giter Site logo

miceks / kerr_comb_simulator Goto Github PK

View Code? Open in Web Editor NEW
24.0 1.0 4.0 4.71 MB

Graphical application for simulating Kerr frequency combs using both the Lugiato-Lefever equation and an Ikeda map.

License: MIT License

MATLAB 100.00%
frequency-combs matlab-gui simulation kerr-combs lugiato-lefever-equation ikeda-map

kerr_comb_simulator's Introduction

Kerr Comb Simulator

This MATLAB application was developed during my master thesis project (now also available in docs if link does not work) to aid in conducting numerical simulations of Kerr frequency combs. It provides a graphical user interface to rapidly schedule, execute and inspect simulations of Kerr cavities over a two-dimensional parameter space corresponding to pump frequency detuning and power.

Example

Governing equations

The intracavity field $\psi$ can be modelled either by a normalized Lugiato-Lefever Equation (LLE)

$$ \frac{\partial \psi}{\partial \eta} = -(\alpha + i \delta) \psi - i s \frac{\partial^2 \psi}{\partial \tau^2} + i |\psi|^2 \psi + \sqrt{\alpha} \psi_{\text{in}},$$

where $\eta$ is the slow time (evolution variable) and $\tau$ the fast time (field profile), or by a normalized Ikeda map

$$ \frac{\partial \psi^m}{\partial \xi} = -\frac{\alpha}{2} \psi^m - i s \frac{\partial^2 \psi^m}{\partial \tau^2} + i |\psi^m|^2 \psi^m,$$

$$\psi^{m + 1}(0, \tau) = \sqrt{1 - \alpha} e^{-i \delta} \psi^m(1, \tau) + \sqrt{\alpha} \psi_{\text{in}}, $$

where the superscript of the field indicates the current roundtrip and the second equation constitute the time-varying boundary condition coupling the fields from successive roundtrips. The equations are expressed using the normalized variables

$$ \xi = \frac{z}{L}, \quad \tau = \sqrt{\frac{2}{|\beta_2| L}} \ t, \quad \psi = \sqrt{L \gamma} \ A, $$

where $z$ is the longitudinal distance in the cavity, $L$ is the cavity length, $t$ is the fast time, $\beta_2 = s |\beta_2|$ is the group velocity dispersion at the pump frequency $\omega_0$, $A$ is the pulse envelope amplitude (scaled such that $|A|^2$ is measured in units of power) and $\gamma = \omega_0 n_2 / c A_{\text{eff}}$ is the nonlinear coefficient with $n_2$ being the Kerr coefficient, $c$ the vacuum speed of light and $A_{\text{eff}}$ the effective mode area. Further, $\alpha$ is the total cavity loss related to the cavity finesse through $\mathcal{F} = \pi / \alpha$ which equals the power coupling coefficient since critical coupling is assumed, $\delta$ is the pump frequency detuning and $\psi_{\text{in}} = \sqrt{L \gamma} \ A_{\text{in}}$ is the normalized pump field.

The two models were normalized with the intent to reduce the parameter space to two dimensions (after choosing the resonator finesse and group velocity dispersion sign), where both models use the same parameter space. This was to make the produced phase diagrams directly comparable since the project was in part intended to look at the differences between the often-employed LLE model and the more general Ikeda map model.

Basic usage guide

A batch, representing a collection of systems, can be created or loaded from the 'File' tab. All systems in a batch share certain parameters (resonator finesse and group-velocity dispersion sign) and the model used to simulate them (LLE or Ikeda map), along with a few other tuning parameters (see tooltips for documentation).

After a batch is created it can be populated using the 'Create system' panel. Some of the options include initial field (noise, Gaussian, sech), the size of the circular buffer storing the field history for playback, the initial and final values for the pump detuning and power (can be set graphically by enabling the 'Fig' toggles).

When a system is created it is automatically selected, highlighting it on the parameter map and in the system table. When one or more system is selected, the 'Edit system' and 'Fork system' panels replace the 'Display' and 'Create system' ones. From here, collective actions on selected systems can be performed, such as renewing budgets and 'forking' systems using the fields of selected systems as initial values. To select other systems, either use the 'Select' button and brush systems in the parameter map or (shift) click systems in the table. To clear the selection, select click the map or table.

Once one or more systems have been scheduled for simulation, press the 'Run' button to execute them. To execute simulations in parallel, check the 'Parallel execution' box (requires Parallel computing toolbox). When a system is finished executing it reports the expended budget to the progress bar.

When a system finish simulating, it becomes available for inspection when selected. The right-side windows enable playback of the field, spectrum and CW reference evolution through field snapshots captured each series (as far back as the buffer spans). Additionally, the convergence of the system (field variation between series) can be viewed over the entire field history with accompanying color indicating the automatic classification (sweep, stationary, fluctuating, CW). Check the 'Legend' box for color correspondence.

Compatibility

The app has been tested on MATLAB R2021b using Windows 10. There are some bugs that I know about and likely far more that I don't.

In order to enable graphical selection ('brushing') on the parameter map, the use of the undocumented property 'BrushData' was necessary. In the (unlikely) scenario that this property is changed in future MATLAB releases, this might break things.

kerr_comb_simulator's People

Contributors

miceks avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

kerr_comb_simulator's Issues

Runing an examlpe

Hello, Thank you very much for sharing this interesting code. I would like to ask if it is possible to share the steps to follow in order to run the simulation for one example. Thank you.

about the program

Hi, can you give an example of how the program works? Mainly the meaning of the specific parameters of the gui.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.