redpitayastcl

A scanning transfer cavity laser stabilization scheme based on the Red Pitaya STEMlab platform

https://github.com/langengroup/redpitayastcl

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.1%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

A scanning transfer cavity laser stabilization scheme based on the Red Pitaya STEMlab platform

Basic Info
  • Host: GitHub
  • Owner: LangenGroup
  • License: gpl-3.0
  • Language: Python
  • Default Branch: main
  • Size: 395 KB
Statistics
  • Stars: 11
  • Watchers: 2
  • Forks: 1
  • Open Issues: 1
  • Releases: 0
Created over 2 years ago · Last pushed 12 months ago
Metadata Files
Readme License Citation

README.md

About The Project

This project strives to provide a transfer cavity locking system using RedPitaya boards STEMlab 125-14. For this purpose, the software uses socket servers in order to remotely control the RedPitayas, such that any locking steps and data evaluation can be carried out directly on their CPU. That way the fast analog inputs and outputs can be controlled remotely without significant data transfer of measured signals to a PC.

Note that there has recently been an update of the Red Pitaya Board (Version 1.1). Currently this code is only compatible with the old revision (Version 1.0). It is still possible to use the new revision, by downgrading the OS system from 2.00 to 1.04, followed by factory reset of the calibration parameters (see here).

How does the STCL work?

STCL principle

A scanning transfer cavity lock (STCL) can be used to simultaneously stabilize multiple lasers against long-term drifts. This simply requires a cavity suitable for the used wavelengths which is scanned in length by a piezo voltage. The required setup can be as simple as sketched in the figure below for the stabilization of one laser:

The laser that needs stabilization (S) is coupled onto the same cavity together with a stable reference laser (Ref). The locking procedure follows a repeating scheme:

  1. Signal acquisition: A scanning triangle waveform is generated and amplified. Using that, the cavity length is scanned and the transmission is simultaneously measured on the photodiode. The scan is set such that two resonances of the references are included. That signal is acquired on an input of the Red Pitayas and saved after the full trace is available.

    1. Peak detection: The acquired data contains several peaks which are attributed to cavity resonances of the individual lasers L. These need to be distinguished from one another. The corresponding timestamps $t\text{L}$ at which the peaks occur are determined. For the reference laser this is done for two resonances at $t\text{Ref}$ and $t_\text{Ref'}$. The peak detection is done by first searching for the maximum position in each range. Using the datapoints around that maximum positions, a Savitzky-Golay derivative filter is applied such that the resonance position can be found at the zero-crossing, determined using linear interpolation.
    2. Error evaluation: One of the reference peaks initial position is saved as a setpoint $t\text{Ref}^\text{set}$ for the cavity stabilization. The difference between the current position $t\text{Ref}$ of that resonance to the setpoint is used as the error $e\text{Ref}$. For the transfer locked lasers S the time differences $\Delta t\text{S} = t\text{S} - t\text{Ref}$ are of interest since the frequency of the reference laser is expected to be stable. The error is then determined as $e\text{S} = \Delta t\text{S} - \Delta t\text{S}^\text{set}$ for a desired set distance $\Delta t\text{S}^\text{set}$. These signals can further be normalized to the free spectral range given by $t\text{Ref'} - t\text{Ref}$ in order to negate influences of the scan rate.
    3. Feedback: Based on the errors an appropriate feedback is determined. This is done by respective PIDs for each error. For the stabilization of the cavity length the PID output from $e_\text{Ref}$ is applied as offset to the piezo scan. The lasers S are locked by modulation of the laser diode currents. For that purpose the PID signals are directly connected to the current modulation input.

Implementation using socket communication

A major component of the STCL is the actual locking electronics involved, as shown in [setup]. The provided scripts contain two parts: The code that is used to remotely control the RedPitayas from a PC (all necessary functions are in 'lockclient.py'), and the code which implements the locking loop ('RPLock.py', located in the 'RPside' folder), which is run on the RedPitaya CPU. Using a python module which is already present on the RedPitayas for programming in 'jupyter' notebooks, the FPGA utilities can be controlled. Both codes also deal with the socket communication. The overall signal aquisition and processing of the STCL with the RedPitayas (RP) is demonstrated in the following Schematic:

The cavity scan is performed by RP Cavity. It is started remotely using a socket connection on Host 1. This starts a loop which blocks said communication. For that reason, an additional socket connection (Host 2) is used to remotely control the running locking loop. The signal generation and acquisition is carried out by the FPGA, while the signal processing for feedback generation happens digitally on the CPU. The configuration depicted is suitable to stabilize two lasers using the a single RP unit (RP Laser). It can be expanded to stabilize up to 2N more lasers using N additional RP Laser units. A third RP unit (RP Monitor), or an oscilloscope can be used to monitor the cavity signal.

(back to top)

Getting Started

Prerequisites and Setup

  • 2+ceil(N/2) RedPitayas for stabilization of N lasers. This includes one RedPitaya just for monitoring, which might be replaced by an oscilloscope.
  • Transfer Cavity with stable reference laser and the lasers that are to be stabilized against long-term drifts coupled in.
  • Photodiode which monitors the cavity transmission, connected to In1 of all RedPitayas
  • Amplifier, which increases the ramp of the scanning RP Cavity (+- 0.5V on Out2) to a range which scans over more than 1.5 FSR of the reference laser. It should be kept in mind that fluctuations of the cavity length also have to be stabilized by offsets on the scanning ramp (in the range of +-0.5V before amplification), which also requires a certain voltage range. In our case a total voltage range of +-12V (given by power supply of the operational amplifiers) was sufficient for that purpose.
  • The Scan trigger (RP Cavity Out1) is connected to In2 of all RedPitayas.
  • For laser stabilization, the outputs of the locking RedPitayas (RP Laser, Out1 and Out2) are connected to the respecive laser current modulation inputs. When using the code, the specific output has to be addressed in the locksettings (.json files in the settings directory)
  • Ethernet connection from the PC to the RedPitayas for remote control

Installation

Download the contents of the repository as a .zip file and unpack it in an installation directory of choice. The provided python code was used and tested on version 3.7 to 3.10 on Windows using Spyder. The following packages are required on the PC and should be installed:

  • paramiko
  • numpy
  • matplotlib (Qt5Agg backend is used for monitoring)
  • scipy

On the RedPitayas no packages have to be installed, since the STCL code is transferred via ssh from the PC. After that, update the PYTHONPATH to include the folder RedPitayaSTCL, which contains all the scipts in the repository. Finally, follow instructions as described in the following paragraph

(back to top)

Usage

Quick start

A usage example is provided under RedPitayaSTCL/examples/OperationExample.py, where the general steps for using the STCL are described in detailed comments. First, for setting up the socket communication, the IPv4 addresses of the devices need to be provided. Executing the first code block should then initialize a connection to the RP units and transfer all necessary codes. The second code block starts up the lock. The remaining code blocks of this example, explain the operation of the STCL, including how to set the voltage ranges, PID and other parameters.

In more detail, for the connections each device is defined in a dicitonary with an indentifying key. This key is also used to name and load the respective settings files. These files, which contain the lock settings, are located by default in RedPitayaSTCL/settings and are automatically created when executing the example code. The respective outputs of the locking RedPitayas (Out1 and Out2) can be labeled in these settings according to the use of the lasers in the respective entries Slave1 and Slave2. The entry Master contains a string corresponding to the identifying key of the scanning Redpitaya (e.g. 'Cav') for the locking and monitoring redpitayas. If the scanning RedPitaya is defined with another key, this entry should be changed (which can also be done using the change_cavity method of the LockClient class). For the scanning redpitayas, the entry Master contains the locksettings.

Feed-forward cavity drift and non-linearity compensation:

Due to external influences, long-term drifts of the transfer cavitiy may reach values that can no longer be compensated by the Red Pitaya locking output or the cavity piezo. To compensate for this, it is possible to employ cavities with a second, large travel range piezo actuator, in combination with a feed-forward approach.

The second piezo actuator enables the control of a cavity's overall length independent from the scanning piezo actuator that is used for fast locking. By recording the slow drifts of the fast locking signal, a feed-forward signal is generated which compensates these drifts using the second piezo. In this way, it is possible to effectively compensate any significant drift that may occur during operation of the SCTL. Moreover, this feed-forward can be used to maintain the scanning piezo within its desired linear response regime, which will guarantee a well controlled scanning procedure.

To realize feed-forward, an additional Red Pitaya unit is required that records the long-term drifts of the lock and provides feedback to the second piezo via a programmable power supply (current implementation: Owon SP3103, but any other programmable power supply should be possible as well). The additional script can be found in the folder RedPitayaSTCL/examples/FeedForward/ and uses the standard library redpitaya_scpi.

With this addition, it is possible to keep the lock stable over at least several hours.

Usage as a frequency monitor:

The error signal of the unstabilized follower laser(s) can also serve as a frequency reference, e.g. in a spectroscopy measurement. In such a measurement the laser(s) are typically scanned externally and one is interested in assigning a precise frequency to each datapoint. To achieve this we calibrate the frequency axis by locking the cavity and setting the laser to be scanned to the lowest and highest desired frequency of the scan. These frequency values are calibrated by recording frequency samples on a wavemeter. Through this procedure, we obtain a mapping from “error space” to frequency space via a linear fit through the error-frequency value pairs. The error of this mapping is limited primarily by the wavemeter uncertainty, as the cavity error is on the order of 1 MHz. If the laser frequency scan behaves non-linearly, the wavemeter monitoring can be run in the background during the entire measurement, so that during the evaluation the nonlinearity can be accounted for. An example can be found in RedPitayaSTCL/examples/FrequencyAxisCalibrationExample.py.

Owner

  • Name: LangenGroup
  • Login: LangenGroup
  • Kind: user

Tim Langen's ColdMolecule Lab at the University of Stuttgart, Germany

Citation (CITATION.cff)

# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!

cff-version: 1.2.0
title: RedPitayaSTCL
message: >-
  If you use this software, please cite as below.
authors:
  - given-names: Einius
    family-names: Pultinevicius
  - family-names: Rockenhäuser
    given-names: Marian
  - given-names: Felix
    family-names: Kogel
  - given-names: Phillip
    family-names: Groß
  - given-names: Tatsam
    family-names: Garg
  - given-names: Ole Einar
    family-names: Prochnow
  - given-names: Tim
    family-names: Langen
    email: t.langen@physik.uni-stuttgart.de
    orcid: "https://orcid.org/0000-0003-2561-0326"
repository-code: 'https://github.com/LangenGroup/RedPitayaSTCL'
url: 'http://www.coldmolecules.de'
abstract: >-
  Many experiments in atomic and molecular physics require
  simultaneous frequency stabilization of multiple lasers.
  We present a stabilization scheme based on a scanning
  transfer cavity lock that is simple, stable and easily
  scalable to many lasers at minimal cost. The scheme is
  based on the Red Pitaya STEMlab platform, with custom
  software developed and implemented to achieve up to 100 Hz
  bandwidth. As an example demonstration, we realize
  simultaneous stabilization of up to four lasers and a
  reduction of long-term drifts to well below 1 MHz per
  hour. This meets typical requirements, e.g. for
  experiments on laser cooling of molecules.
keywords:
  - laser stabilization
  - laser cooling
  - cold molecules
  - transfer cavity
  - laser locking
  - RedPitaya
license: GPL-3.0
preferred-citation:
  type: article
  authors:
  - given-names: Einius
    family-names: Pultinevicius
  - family-names: Rockenhäuser
    given-names: Marian
  - given-names: Felix
    family-names: Kogel
  - given-names: Phillip
    family-names: Groß
  - given-names: Tatsam
    family-names: Garg
  - given-names: Ole Einar
    family-names: Prochnow
  - given-names: Tim
    family-names: Langen
    email: t.langen@physik.uni-stuttgart.de
    orcid: "https://orcid.org/0000-0003-2561-0326"
  url: https://arxiv.org/abs/2307.10217
  journal: "arxiv:2307.10217"
  title: "A scalable scanning transfer cavity laser stabilization scheme based on the Red Pitaya STEMlab platform"
  year: 2023

GitHub Events

Total
  • Watch event: 4
  • Member event: 1
  • Push event: 1
Last Year
  • Watch event: 4
  • Member event: 1
  • Push event: 1