# Laser resonator modes

For a resonator, plot the intensity as a function of time for (i) when the modes have identical phases, and (ii) when the modes have random phases.

Attempt

Here is the equation for intensity (p. 372 of Fundamentals of Photonics):

$$I=\frac{I_0}{1+|r|^2-2|r| \cos \varphi} \tag{1}$$

I believe when the modes have identical phases we must have $\varphi = q2 \pi,$ for some integer $q.$ And when they have random phases we may use a code like q*rand*pi.

So, how do we convert equation (1) to be a function of time?

There are some versions of equation (1) in frequency domain, but they do not take into account the phase. If we plot (1) as it is, we will get it as a function of $q:$

Matlab code used:

N=30; I0=5; q=[0:0.1:N]; r=0.75;

phi=q.*2.*pi; % when in-phase
phi2=q.*rand.*pi; % random phase

I1=I0./(1+((abs(r)).^2)-2.*abs(r).*cos(phi));
I2=I0./(1+((abs(r)).^2)-2.*abs(r).*cos(phi2));

plot(q, I1); hold on; plot(q, I2, 'm')


Hint:

Use the final equation from my other answer here:

$$E(0,t) = E_0\exp(-i\bar{\omega}t)\frac{\sin[(N/2)\Delta\omega t]}{\sin[(1/2)\Delta\omega t]}.$$

This is already a function of time. Now, $I(0,t)\propto |E(0,t)|^{2}$, so just square that function for the intensity (normalize to remove constants if you like). That will give you the flat phase intensity profile.

In that same derivation I also assume that all of the modes have the same phase. If you remove that assumption and include a random phase term for each of the modes (denoted $\phi_n$ in that derivation) then you should be able to follow the same procedure to get a similar function for the intensity distribution produced when those modes are added. The random phase term can be $e$ to the power of any random imaginary number you like really, but I would recommend that you use something similar to:

$$\phi_\text{n, rand} = \exp\left[-i\omega_n\times\text{randn}\right].$$

• Thank you so much for your input. I have just one more question: we know that the frequency spacing is $\Delta \nu =c/2L,$ so if I want the time window to run from $-1$ to $1,$ how can I define time spacing $\Delta t$ and the span of frequency grid $x$? In the code the vectors would be $$t=[-1 \ :\ \Delta t=1/x \ :\ 1]$$ and $$\nu =[-x=-1/\Delta t\ :\ \Delta \nu \ : \ x=1/\Delta t]$$But this wouldn't work since $x=\Delta \nu$ (we get $\nu=[\Delta\nu:\Delta\nu:\Delta\nu]$). What can I do? May 11, 2016 at 11:59
• Starting point (Matlab): clear, clc c = 3e8; tWindow = 10e-12; Trt = 12.5e-9; N=2^12; dt = tWindow/N; tau = linspace(-tWindow/2, tWindow/2, N); L = c*Trt; lambdaC = 800e-9; omega = 2*pi*c/lambdaC; deltaOmega = 2*pi*c/2*L; omega = omega-0.01*omega:deltaOmega:omega+0.01*omega; field = zeros(1,length(tau)); for i=1:length(omega) field = field + exp(1j*omega(i).*tau); end field = field./max(abs(field)); figure(1) plot(1e12.*tau, abs(field.^2)) xlabel('time, ps') ylabel('Intensity, norm.')
– user113857
May 11, 2016 at 21:27
• In the code above (sorry for terrible formatting) I haven't defined a frequency grid because you don't strictly need one here. If you want to FFT the data and see the spectrum, then you will need to define a frequency grid based on dt, tWindow, and N, and not on the resonator modes themselves (although this might be possible). The code above is just a starting point for this. You can easily adjust it to include the random phase, and to make tWindow = Trt if you like (although you'll need way more grid points).
– user113857
May 11, 2016 at 22:32