FPGA-Based Single Atom Feedback Control Using LabVIEW and NI FlexRIO

Christian Sames – Max-Planck Institute of Quantum Optics
Markus Koch – Max-Planck Institute of Quantum Optics
Haytham Chibani – Max-Planck Institute of Quantum Optics
Maximilian Balbach – Max-Planck Institute of Quantum Optics
Tatjana Wilk – Max-Planck Institute of Quantum Optics
Gerhard Rempe – Max-Planck Institute of Quantum Optics

FPGA-Based Single Atom Feedback Control Using LabVIEW and NI FlexRIOFeedback is one of the most powerful techniques for controlling dynamic systems. The systems studied in our laboratory contain a single, neutral isolated atom interacting with a single photon—the intrinsic excitation of a quantized electromagnetic field—surrounded by a highly reflective cavity mirror (Figures 1 and 2). Using this system, we can study the fundamental quantum properties of light-matter interactions, which must be achieved by confining atoms to the center of the cavity mirror. However, the inherent heating process tends to push atoms to other positions. Our goal is to dampen this movement through a fast Electronic feedback technique that uses restoring forces to counteract this escape movement. Its basic principle is shown in Figure 3. The unpredictability of motion necessitates rapid responses to it, but the quantum nature of the system limits the amount of information that can be extracted. Therefore, we must quickly perform a single-photon detection-based decision-making process within 100 ns.Feedback scenarios we show[1,2]Very good job at this. FPGA-Based Single Atom Feedback Control Using LabVIEW and NI FlexRIO

The key electronic component to this tricky task is the NI PXI-7954R NI FlexRIO FPGA module, combined with the NI 6581 high-speed digital I/O adapter module. The main purpose of using the adapter module is to prevent damage by buffering the digital inputs and outputs of the exposed FPGA pins. The NI FlexRIO module is installed on an NI PXIe-1075 chassis, which has an NI PXIe-8130 integrated host controller. FPGAs are special reconfigurable integrated circuits, so they can achieve high performance achieved by hardware, while achieving a high degree of versatility throughout the design process. This, along with their inherent parallelism, can provide fast and deterministic execution, making them a broad and powerful tool in scientific research and industrial production. NI FlexRIO modules offer two main advantages. First, it allows quick and easy programming of FPGAs through the LabVIEW FPGA Module, a graphical design language that we can use to design high-level FPGA circuits, and also integrates common, low-level VHDL code if necessary. Second, the FlexRIO module exposes the FPGA pins directly to the user, enabling highly customized I/O. As such, it allows the creation of customized, high-performance hardware. In our application, we developed a custom set of time-domain digitizers capable of sampling multiple digital channels at one nanosecond resolution, processing real-time data, applying feedback algorithms, and outputting important information to the user information.

FPGA-Based Single Atom Feedback Control Using LabVIEW and NI FlexRIO

FPGA-Based Single Atom Feedback Control Using LabVIEW and NI FlexRIO

Four-channel time-domain digitizer with 1 ns resolution and 64-bit dynamic range

Operating at very low light intensities requires the use of equipment capable of detecting individual photons. These devices, called single-photon counting modules (SPCMs), are based on avalanche photodiodes and emit digital pulses of electrons (shown in Figure 4) when a single photon is detected. We use equipment (AQR-14) manufactured by PerkinElmer®, USA. The rising edge of the pulse can indicate the arrival time of the photon with an accuracy of 350 picoseconds. For our application, a resolution of 1 ns just requires the FPGA to sample each digital lane connected to the SPCM at 1 GHz.

High sample rates can be achieved by using the digital serial-to-parallel conversion capability built into the Xilinx Virtex-5 device, which we can use to convert a 1 Gbit/s data stream into 8 simultaneous 125 Mbits/s data streams each. Each data stream describes a portion of the original data stream, and the time interval between data is 1 ns (as shown in Figure 5). This functionality is implemented by inserting a common CLIP (device-level intellectual property solution) in LabVIEW, allowing the integrated VHDL code to access the FPGA’s input/output pins.

FPGA-Based Single Atom Feedback Control Using LabVIEW and NI FlexRIO

Each rising edge corresponds to a photon strike and requires a time stamp of at least 36 bits of dynamic range; it is necessary to record data sets of up to one minute while avoiding overflow of the internal counter. This is achieved by using an edge detection unit, which scans the “serial-to-parallel” data stream output by the “iserdes” for every 8-bit width. Whenever a rising edge is detected, an event flag is asserted. A 3-bit form of data is additionally generated to represent the location of the event in the 8 ns interval. This value is synchronized with a 61-bit counter running at 125 MHz. In total, this provides a 64-bit timestamp, which is then passed to LabVIEW FPGA—along with the event flags. From that moment on, the LabVIEW VI takes care of the rest.

Timestamps of photon strikes from each of the four detectors are buffered in FIFOs. Subsequently, they are classified and merged into a common data stream, which also has control information. Before the data stream enters the host PC’s memory via the DMA channel, it is buffered in the NI FlexRIO module’s DRAM. Overall, this structure allows peak count rates of up to 125 million events per second at less than 2,000 events per channel. In addition, an average count rate of 100 million events per second is achievable. This situation can last about 16 million events, which is caused by the size and speed limitations of DDR2 memory. Eventually, a sustained 25 MHz count rate was achieved, which was dictated by the bandwidth limitations of the PXI bus. Upgrading to the NI PXIe-796x NI FlexRIO modules will significantly improve the average count rate due to the increased PXI Express bus speed and faster and larger DDR2 memory.

Note that despite using the DDCA port of the NI 6581 adapter module designed to handle data rates up to 200 Mbit/s, it is still possible to detect rising edges with 1 ns resolution as long as the count rate does not exceed 100 MHz. The proper operating mode has been verified through extensive testing using Agilent’s 81150A pulse generator.

Photon-by-photon feedback to a single atom

The main task to be performed by an FPGA is to effectively control atomic trajectories in real time. We used the NI FlexRIO FPGA Module to control the motion of a single atom, which is trapped in an optical dipole trap inside the optical cavity. Just by detecting a few photons, we can get enough information about the actual position of the atoms in the trap to manipulate its motion. Here, an FPGA module is used to record the arrival times of photons, evaluate the trajectories of atoms, and change the trapping potential of atoms based on this information. When a single photon is detected, a digitized electron pulse is emitted by the photodetector, and the time of arrival is recorded by the FPGA in multiple channels with 1 ns resolution. Based on the change in the count rate at which the photons are detected, the FPGA determines whether the atom is moving toward the center of the trapping potential, or is outside the potential well, to reduce or increase the trapping potential.

The NI FlexRIO module sorts and stacks the arrival times of photons scattered by atoms one by one. A typical stack return interval is usually a few millionths of a second, which involves exposure time and needs to be corrected every few nanoseconds. The change in scattered photon rate was assessed by comparing the current stack with the previous stack, which was delayed by a time delay equal to the exposure time. Delays are implemented using FIFOs. In our experiments, a decrease in photon flux indicates that the atoms are moving towards the middle of the optical cavity, while an increase indicates that the atoms are moving towards the outside. Because the trapped atom is very sensitive to a variety of different forces, its motion is superimposed with some disordered motion while regularly vibrating. This mechanism makes the atomic trajectory more unpredictable on time scales than its vibrational frequency, which is typically around 5 kHz. Once the kinetic energy accumulated by an atom exceeds the depth of the potential well it is in, it is lost. The time the atoms stay in the potential well is considered the storage time. Furthermore, for a trapped atom, the flux of scattered photons is typically only on the order of one photon every 10 µs, making it very difficult to implement an efficient feedback scheme because there is too little useful information. One possible solution involves digitally changing the barrier depth of the well between high and low values, depending on whether the number of hits in the current time interval exceeds a certain previous value. As simple as it looks, it increases the average storage time of atoms by a factor of 30 compared to the case where no signal is fed back. Storage times of 1 second on average and up to 7 seconds have been achieved, making this technique fully comparable to laser cooling schemes, which require more complex optical structures. More sophisticated feedback strategies are currently under study.


In addition to storing information about the flow of emitted photons and feeding it back into the system, it is also crucial to Display important information to the experimenter. This is especially important for initial scenarios. To achieve this, we integrated a fast digital-to-analog converter (DAC) with two video graphics array (VGA) connectors into the FPGA.

The DAC is a TxDAC (AD9744) from AD (Analog Devices), which can provide a sampling rate of 210 Ms/s with 14-bit resolution. In the current design, it runs at a clock frequency of 125 MHz and outputs a voltage proportional to the number of photons detected. The data and clock pins of the DAC are connected to the NI 6581; 22 Ω resistors are connected in series to reduce reflections at the digital DAC inputs. The remaining pins of the module are used to interact with the VGA display. Basically each VGA connector contains three signal lines, and two data lines. The signal lines transmit red, green, and blue color information. The VGA’s specification calls for them to be connected to 75 Ω resistors and to withstand voltages from 0 V (black) to 0.7 V (full color brightness). Synchronization is achieved by two high-impedance TTL data lines, which define the horizontal and vertical retrace periods. If only 8 color values ​​(3-bit color depth) are required, it is sufficient to connect the VGA connector signal pins to the NI 6581 adapter module (in 3.3 V configuration mode) via a 270 Ω resistor. Connect a 22 Ω resistor in series with the data line. We chose to divide the display into two parts: one showing text-based information and the other image information. For text mode, a set of 8 by 16 pixel black/white fonts are loaded into one of the FPGA’s internal partition RAMs. Another block RAM stores the symbol codes. The graph section shows trend graphs emitted by the detector or calculations of the feedback algorithm; these graphs are also stored in the internal block RAM. Running at a 108 MHz pixel clock, a 1280 by 1024 pixel display mode can be easily implemented.


Using NI FlexRIO, we can create our own high-performance custom hardware. Time-domain digitizers are very powerful and versatile tools that can be used in many different fields of scientific research and industrial production, offering advantages over many commercially available products. The computing power of FPGAs further helps us to implement real-time processing of time-critical tasks in hardware, making it possible to perform feedback control of smaller systems, even the interaction of a single atom with a single photon.

Using LabVIEW FPGA, we can quickly develop FPGA code because of its high level of generalization while properly integrating VHDL IP. Additionally, using the PXI platform allows us to leverage triggering and synchronization with other PXI instruments in the system, allowing us to integrate custom instruments into larger systems without having to implement an entire custom design.


[1] A. Kubanek, M. Koch, C. Sames, A. Ourjoumtsev, PWH Pinkse, K. Murr, and G. Rempe, Photon-by-photon feedback control of a single-atom trajectory, Nature 462, 898-901 (2009 )
[2] M. Koch, C. Sames, A. Kubanek, M. Apel, M. Balbach, A. Ourjoumtsev, PWH Pinkse, and G. Rempe, Feedback Cooling of a Single Neutral Atom, Phys. Rev. Lett. 105, 173003 ( 2010)
[3] PWH Pinkse, T. Fischer, P. Maunz, G. Rempe, Trapping an Atom with Single Photons, Nature 404, 365-368 (2000)
[4] P. Maunz, T. Puppe, I. Schuster, N. Syassen, PWH Pinkse, and G. Rempe, Normal-Mode Spectroscopy of a Single-Bound-Atom–Cavity System, Phys. Rev. Lett. 94, 033002 (2005 )

The Links:   LM64K111 DMF-50383NF-FW