PDH_doppler_mach-zender_eom_arm.py 3.45 KB
#!/usr/bin/python
# -*- coding: utf-8 -*-

'''Pound-Drever-Hall setup
   Mach-Zender with one photodiode

          ---   -----         ---
----------|\|---|EOM|---------|/|-----------(   )
 w_laser  ---   -----         ---           cavity
           |                   |
           |                   |
           |    -----         ---
           \----|AOM|---------|\|
                -----         ---
                  ^            |
                  |            U
                  |            |
                  |            V
                  |---------->(X)
                  |            |   -----
               (W_aom)         |---|LPF|--> eps_dop
                               V   -----
            (W_pdh)---------->(X)
                               |
                               |
                               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, w_aom, t = symbols('E0, J0, J1, omega_laser, Omega_pdh, Omega_aom, t', imaginary=False, real=True)
v_x, d_x = symbols('v_x, delta_x', imaginary=False, real=True)
c = symbols('c', imaginary=False, real=True)

#laser and phase-mod laser
E_laser = E0*exp(I*(w_laser*t))

E_aom = E0*exp(I*((w_laser+w_aom)*t))

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 and by actuator
dx = v_x*t + d_x
E_ref =                                                 \
E0*(                                                    \
   F(             w_laser       *t -   w_laser*dx/c )   \
    *J0*exp( I*(  w_laser       *t - 2*w_laser*dx/c ) ) \
+ -1*J1*exp( I*( (w_laser+w_pdh)*t - 2*w_laser*dx/c ) ) \
- -1*J1*exp( I*( (w_laser-w_pdh)*t - 2*w_laser*dx/c ) ) \
   )

#optical mixer
E_mz = sqrt(2)/2 * E_aom + sqrt(2)/2 * E_ref

#intensity of mixed wave
I_mz = abs(E_mz)**2
I_mz = expand(TR8(expand(expand_complex(I_mz))))


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

#Q demodulation of I_mich at Omega_pdh for doppler error signal obtention
kphipdh = symbols('k_phi_pdh', real=True)
eps_pdh = 2 * kphipdh * eps_dop * cos(w_pdh*t)
eps_pdh = expand(TR8(TR7(expand(eps_pdh))))

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

'''results

### EOM sur un bras

eps_pdh =
0

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