PDH_error_signal.m 551 Bytes
clear
clc
close all

L = 10e-2
c = 299792458
R = 0.99991

fsr = c/(2*L)

fc = fsr*128760;
df=20e6;

f = 2*pi*linspace(fc-df, fc+df, 10000);

fpt = ((1.-R).*exp(-2.*L.*i.*f./c))./(1.-R.*exp(-2.*L.*i.*f./c));
fpr = sqrt(R).*(1.-exp(-2.*L.*i.*f./c))./(1.-R.*exp(-2.*L.*i.*f./c));

figure
plot(f,abs(fpr))


fm = 23e6;

fm1 = sqrt(R).*(1.-exp(-2.*L.*i.*(f.+fm)./c))./(1.-R.*exp(-2.*L.*i.*(f.+fm)./c));
fm2 = sqrt(R).*(1.-exp(-2.*L.*i.*(f.-fm)./c))./(1.-R.*exp(-2.*L.*i.*(f.-fm)./c));

ff=fpr.*conj(fm1)-conj(fpr).*fm2;
iff = imag(ff);

figure
plot(f,iff)