Commit 07295cdf4404fcda6800f4183bad53f4e4179a58

Authored by bmarechal
1 parent 0cbce28efb
Exists in master

add PDH_error_signal numeric simulation

Showing 2 changed files with 84 additions and 0 deletions Inline Diff

PDH_error_signal/PDH_error_signal.m
File was created 1 clear
2 clc
3 close all
4
5 L = 10e-2
6 c = 299792458
7 R = 0.99991
8
9 fsr = c/(2*L)
10
11 fc = fsr*128760;
12 df=20e6;
13
14 f = 2*pi*linspace(fc-df, fc+df, 10000);
15
16 fpt = ((1.-R).*exp(-2.*L.*i.*f./c))./(1.-R.*exp(-2.*L.*i.*f./c));
17 fpr = sqrt(R).*(1.-exp(-2.*L.*i.*f./c))./(1.-R.*exp(-2.*L.*i.*f./c));
18
19 figure
20 plot(f,abs(fpr))
21
PDH_error_signal/PDH_error_signal.py
File was created 1 #!/usr/bin/env python
2
3 import numpy
4 import matplotlib.pyplot as plt
5
6 L = 14e-2
7 c = 299792458
8 R = 0.99991
9
10 fsr = c/(2*L)
11 print("fsr = %f GHz"%(fsr/1e9))
12
13 finesse = numpy.pi*R**0.25/(1-R**0.5)
14 print("finesse = %i"%finesse)
15
16 print("finesse/fsr = %f s"%(finesse/fsr))
17
18 fc = fsr*130000
19 df = 20e6
20 #print(fc)
21
22 f = 2*numpy.pi*numpy.linspace(fc-df, fc+df, 100000) # frequency array
23 i = complex(0,1)
24
25 fpt = ((1.-R)*numpy.exp(-2.*L*i*f/c))/(1.-R*numpy.exp(-2.*L*i*f/c))
26 fpr = R**0.5*(1.-numpy.exp(-2.*L*i*f/c))/(1.-R*numpy.exp(-2.*L*i*f/c))
27
28 plt.subplot(2, 1, 1)
29 plt.plot(f, abs(fpr))
30 plt.title('FP cavity')
31 plt.ylabel('Reflective intensity')
32 plt.grid()
33
34
35 fm = 23e6