PDH_doppler_michelson_without_pzt.py 5.02 KB
#!/usr/bin/python
# -*- coding: utf-8 -*-

'''Pound-Drever-Hall setup
   Michelson with piezo actuator and AOM in cavity arm

                          -----
        (2*W_aom)-->(X)---|LPF|--->
                     |    -----     eps_dop
                     O
                     |
            -----   ---   ---   -----
------------|EOM|---|\|---|/|---|AOM|---(   )
 w_laser    -----   ---   ---   -----   cavity
              ^      |     |
              |      |     U
              |      |     |
              |      |     |
              |     _|_    |
              |    ////    |
              |            v
              |---------->(X)
           (W_pdh)         |
                         -----
                         |LPF|
                         -----
                           |
                           v   eps_pdh

'''

from time import time
tic = time()

from sympy import *
from sympy.simplify.fu import *

init_printing()

#constants
E0, J0, J1, w_laser, w_pdh, t = symbols('E0, J0, J1, omega_laser, Omega_pdh, t', imaginary=False, real=True)
v_x, d_x, c = symbols('v_x, delta_x, c', imaginary=False, real=True)
w_aom, dw, dphi = symbols('Omega_aom, delta_Omega, delta_phi', imaginary=False, real=True)

phi_u = dw*t #+ dphi
phi = w_aom*t + phi_u

'''#
#laser
E_laser = E0*exp(I*(w_laser*t))
'''

#phase-mod laser
E_eom =                             \
E0*(                                \
  J0*exp(I*((w_laser      )*t))     \
+ J1*exp(I*((w_laser+w_pdh)*t))     \
- J1*exp(I*((w_laser-w_pdh)*t))     \
   )

#approximation of F(w) near a resonance
dnu, w_cav = symbols('delta_nu, omega_cav', imaginary=False, real=True)
def F(phi):
    dw = phi.diff(t) - w_cav
    return -(I/pi)*(dw/dnu)

#reflected phase-mod laser and dephased by doppler effect with double aom shift
dx = v_x*t + d_x
E_ref =                                                                                  \
E0*(                                                                                     \
   F(            (w_laser      )*t -   dx*(w_laser+phi.diff(t))/c +   phi )     \
   * J0*exp( I*( (w_laser      )*t - 2*dx*(w_laser+phi.diff(t))/c + 2*phi ) )   \
+ -1*J1*exp( I*( (w_laser+w_pdh)*t - 2*dx*(w_laser+phi.diff(t))/c + 2*phi ) )   \
- -1*J1*exp( I*( (w_laser-w_pdh)*t - 2*dx*(w_laser+phi.diff(t))/c + 2*phi ) )   \
   )

#intensity of reflected wave
I_pdh = abs(E_ref)**2
I_pdh = expand(TR8(expand(expand_complex(I_pdh))))

#optical mixer
E_mich = sqrt(2)/2 * E_eom + sqrt(2)/2 * E_ref

#intensity of mixed wave
I_mich = abs(E_mich)**2
I_mich = expand(TR8(expand(expand_complex(I_mich))))

#Q demodulation of I_pdh at Omega_pdh for PDH error signal obtention
kphipdh = symbols('k_phi_pdh', real=True)
eps_pdh = 2 * kphipdh * I_pdh * cos(w_pdh*t-pi/2)
eps_pdh = expand(TR8(TR7(expand(eps_pdh))))

#Q demodulation of I_mich at 2*Omega_aom for doppler error signal obtention
kphidop = symbols('k_phi_doppler', real=True)
eps_dop = 2 * kphidop * I_mich * cos(2*w_aom*t-pi/2)
#eps_dop = 2 * kphidop * I_mich * cos(2*phi.diff(t)*t-pi/2)
eps_dop = expand(TR8(TR7(expand(eps_dop))))

toc = time()
print('Elapsed time : %fs'%(toc-tic))

'''results

eps_pdh =
       2               ⎛                                ω_laser + Ω_aom + δ_Ω   ⎞
   4⋅E₀ ⋅J₀⋅J₁⋅k_φ_pdh⋅⎜ω_laser + Ω_aom - ω_cav + δ_Ω - ─────────────────────⋅vₓ⎟
                       ⎝                                           c            ⎠
 + ──────────────────────────────────────────────────────────────────────────────
                                           π⋅δ_ν

eps_dop =
   2   2         ⎛                                ω_laser + Ω_aom + δ_Ω   ⎞    ⎛          2⋅(ω_laser + Ω_aom + δ_Ω)⋅(vₓ⋅t+δₓ)⎞
 E₀ ⋅J₀ ⋅k_φ_dop⋅⎜ω_laser + Ω_aom - ω_cav + δ_Ω - ─────────────────────⋅vₓ⎟⋅cos⎜2⋅δ_Ω⋅t - ───────────────────────────────────⎟
                 ⎝                                            c           ⎠    ⎝                             c               ⎠
 ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
                                                              π⋅δ_ν

      2   2            ⎛          2⋅(ω_laser + Ω_aom + δ_Ω)⋅(vₓ⋅t+δₓ)⎞
+ 2⋅E₀ ⋅J₁ ⋅k_φ_dop⋅sin⎜2⋅δ_Ω⋅t - ───────────────────────────────────⎟
                       ⎝                             c               ⎠
'''