{"id":280,"date":"2023-06-08T13:35:45","date_gmt":"2023-06-08T11:35:45","guid":{"rendered":"https:\/\/logbooks.ifosim.org\/finesse\/?p=280"},"modified":"2023-06-08T13:35:45","modified_gmt":"2023-06-08T11:35:45","slug":"quick-comparison-between-two-working-points-in-a-fp-cavity-using-analysis-action-parallel","status":"publish","type":"post","link":"https:\/\/logbooks.ifosim.org\/finesse\/2023\/06\/08\/quick-comparison-between-two-working-points-in-a-fp-cavity-using-analysis-action-parallel\/","title":{"rendered":"Quick comparison between two working points in a FP-cavity (using analysis.action.Parallel)"},"content":{"rendered":"\n<p><\/p>\n\n\n\n<p>In a perfectly aligned and matched Fabry-Perot cavity, one of the zero-crossings of an RF-demodulated error signal such as the PDH error signal corresponds to the cavity resonance peak. When imperfections are added, the two working points (peak resonance and zero-crossing of the error signal) can diverge.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>In this example we show how, a progressive introduction of misalignment on one of the cavity mirrors, introduces a difference in the working points. <\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>The FP  cavity model is defined as follow (taken from example 3) , with a readout photodiode in reflection and a DC photodiode in transmission<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>model = finesse.Model()\nmodel.parse(f\"\"\"  \nl l1 P=1                           # input laser\nmod eom 10M 0.1 order=1            # phase modulator\n\n# The cavity\nm ITM R=0.999 T=0.001 Rc=-2500       # input test mass\nm ETM R=0.999 T=0.001 Rc=2500        # end test mass\n\nlink(l1, eom, ITM, 3e3, ETM)       # linking all the components\n            \ncav cav ITM.p2.o\nmodes(odd, maxtem=5)\n            \n# dofs and locks\ndof ITM_z ITM.dofs.z +1\nlock pdh_lock pdh_err.outputs.I ITM_z.DC 0 1e-8 \n            \n# Detectors - pdh readout\nreadout_rf pdh_err ITM.p1.o f=eom.f phase=0 output_detectors=true\npd tra_dc ETM.p2.o                 # transmitted dc power\n\"\"\")<\/code><\/pre>\n\n\n\n<p>The PDH error signal demodulation phase and the lock gain are then optimized and the wp is found for the aligned version<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># tuning the demodulation phase to maximize the response of the readout function\nmodel.run(\n    fac.OptimiseRFReadoutPhaseDC(\n        \"ITM_z\", \"pdh_err\",\n        d_dof=1e-7)\n        )\n\n# All of the following steps are taken to ultimately execute the lock command and zero the error signal\n\n# computing the gain of the PDH signal as the DC value of the TF from ITM motion to the PDH response\nsol = model.run(\n    fac.FrequencyResponse(\n        f = np.geomspace(1e-2, 1, 15),\n        inputs=('ITM_z'),\n        outputs=('pdh_err.I')\n    )\n)\n\n# optimizing the gain of the lock\npdh_gain = np.abs(sol&#091;'ITM_z', 'pdh_err.I']&#091;0])     # gain of the PDH signal in W\/m\nlock_gain = -1\/pdh_gain   # optimal gain for the lock\nlock_gain *= 2 * np.pi \/ model.lambda0 * np.rad2deg(1) # scaling the gain from m\/W to deg\/W\nmodel.pdh_lock.gain = lock_gain\n\n# running the locks\nmodel.run(fac.RunLocks(method='newton'))<\/code><\/pre>\n\n\n\n<p>Finally, we run two xaxis in parallel, introducing a progressive misalignment on one mirror, up to 3 urad. In one xaxis we are keeping the system &#8216;locked&#8217; to the maximum of the transmission peak, in the second one we instead lock on the PDH error signal.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>model2 = model.deepcopy()\nsol2 = model2.run(\n        fac.parallel.Parallel(\n         fac.Xaxis(\n             model.ETM.xbeta,\n             'lin',\n             start = 0,\n             stop = 3e-6,\n             steps = 100,\n             #pre_step = fac.RunLocks(method='newton')\n             pre_step = fac.Maximize('tra_dc', model.ETM.phi, tol=1e-20)),\n        fac.Xaxis(\n             model.ETM.xbeta,\n             'lin',\n             start = 0,\n             stop = 3e-6,\n             steps = 100,\n             pre_step = fac.RunLocks(method='newton'))\n) )<\/code><\/pre>\n\n\n\n<p>The result below show that indeed,  in the top figure only one lock (the rf lock) keeps the error signal at zero, and the larger the misalignment is, the larger is the difference between the working points. The bottom figure shows that there is also (as expected) a  small difference in the transmitted powers between the two working points.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"1021\" src=\"https:\/\/logbooks.ifosim.org\/finesse\/wp-content\/uploads\/sites\/5\/2023\/06\/differentlocks-1-1024x1021.png\" alt=\"\" class=\"wp-image-282\" srcset=\"https:\/\/logbooks.ifosim.org\/finesse\/wp-content\/uploads\/sites\/5\/2023\/06\/differentlocks-1-1024x1021.png 1024w, https:\/\/logbooks.ifosim.org\/finesse\/wp-content\/uploads\/sites\/5\/2023\/06\/differentlocks-1-300x300.png 300w, https:\/\/logbooks.ifosim.org\/finesse\/wp-content\/uploads\/sites\/5\/2023\/06\/differentlocks-1-150x150.png 150w, https:\/\/logbooks.ifosim.org\/finesse\/wp-content\/uploads\/sites\/5\/2023\/06\/differentlocks-1-768x766.png 768w, https:\/\/logbooks.ifosim.org\/finesse\/wp-content\/uploads\/sites\/5\/2023\/06\/differentlocks-1-1536x1532.png 1536w, https:\/\/logbooks.ifosim.org\/finesse\/wp-content\/uploads\/sites\/5\/2023\/06\/differentlocks-1-2048x2043.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code># Code used for the plot: \nfig, ax = plt.subplots(2,1, figsize=(8, 8))\nax&#091;0].plot(sol2.children&#091;0].x&#091;0], sol2.children&#091;0]&#091;'pdh_err_I'], label = 'Power locked')\nax&#091;0].plot(sol2.children&#091;1].x&#091;0], sol2.children&#091;1]&#091;'pdh_err_I'], label = 'RF locked')\n\nax&#091;0].set_title('RF error signal I')\nax&#091;0].set_ylabel('Errsig Amplitude')\n\n\nax&#091;1].plot(sol2.children&#091;0].x&#091;0], sol2.children&#091;0]&#091;'tra_dc']\/sol2.children&#091;1]&#091;'tra_dc'])\n#ax&#091;1].semilogy(sol2.children&#091;1].x&#091;0], sol2.children&#091;1]&#091;'tra_dc'], label = 'RF locked', linestyle='--')\n\nax&#091;1].set_title('Transmitted power ratio (Transmission peak lock \/ RF lock)')\nax&#091;1].set_ylabel('Power ratio')\n\nfor a in ax:\n    a.legend()\n    a.set_xlabel(' End Mirror Misalignment &#091;rad]')\n\nfig.tight_layout()<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>In a perfectly aligned and matched Fabry-Perot cavity, one of the zero-crossings of an RF-demodulated error signal such as the PDH error signal corresponds to the cavity resonance peak. When imperfections are added, the two working points (peak resonance and zero-crossing of the error signal) can diverge. In this example we show how, a progressive [&hellip;]<\/p>\n","protected":false},"author":97,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"ssl_alp_hide_revisions":false,"footnotes":"","ssl_alp_hide_crossreferences_to":false},"categories":[1],"tags":[72,75,76,73,74],"ssl-alp-coauthor":[71],"class_list":["post-280","post","type-post","status-publish","format-standard","hentry","category-uncategorised","tag-example","tag-fabry-perot","tag-misalignment","tag-parallel","tag-working_point"],"_links":{"self":[{"href":"https:\/\/logbooks.ifosim.org\/finesse\/wp-json\/wp\/v2\/posts\/280","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/logbooks.ifosim.org\/finesse\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/logbooks.ifosim.org\/finesse\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/logbooks.ifosim.org\/finesse\/wp-json\/wp\/v2\/users\/97"}],"replies":[{"embeddable":true,"href":"https:\/\/logbooks.ifosim.org\/finesse\/wp-json\/wp\/v2\/comments?post=280"}],"version-history":[{"count":2,"href":"https:\/\/logbooks.ifosim.org\/finesse\/wp-json\/wp\/v2\/posts\/280\/revisions"}],"predecessor-version":[{"id":284,"href":"https:\/\/logbooks.ifosim.org\/finesse\/wp-json\/wp\/v2\/posts\/280\/revisions\/284"}],"wp:attachment":[{"href":"https:\/\/logbooks.ifosim.org\/finesse\/wp-json\/wp\/v2\/media?parent=280"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/logbooks.ifosim.org\/finesse\/wp-json\/wp\/v2\/categories?post=280"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/logbooks.ifosim.org\/finesse\/wp-json\/wp\/v2\/tags?post=280"},{"taxonomy":"ssl-alp-coauthor","embeddable":true,"href":"https:\/\/logbooks.ifosim.org\/finesse\/wp-json\/wp\/v2\/ssl-alp-coauthor?post=280"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}