A Digital Feedback System for Advanced Ion Manipulation Techniques in Penning Traps

The possibility to apply active feedback to a single ion in a Penning trap using a fully digital system is demonstrated. Previously realized feedback systems rely on analog circuits that are susceptible to environmental fluctuations and long term drifts, as well as being limited to the specific task they were designed for. The presented system is implemented using an FPGA-based platform (STEMlab), offering greater flexibility, higher temporal stability and the possibility for highly dynamic variation of feedback parameters. The system's capabilities were demonstrated by applying feedback to the ion detection system primarily consisting of a resonant circuit. This allowed shifts in its resonance frequency of up to several kHz and free modification of its quality factor within two orders of magnitude, which reduces the temperature of a single ion by a factor of 6. Furthermore, a phase-sensitive detection technique for the axial ion oscillation was implemented, which reduces the current measurement time by two orders of magnitude while simultaneously eliminating model-related systematic uncertainties. The use of FPGA technology allowed the implementation of a fully-featured data acquisition system, making it possible to realize feedback techniques that require constant monitoring of the ion signal. This was successfully used to implement a single-ion self-excited oscillator.


I. INTRODUCTION
Penning traps are used, among other things, for highprecision atomic mass measurements 1-3 , tests of fundamental theories such as quantum electrodynamics 4,5 and the CPT invariance theorem [6][7][8] , as well as for the determination of fundamental constants 3,[9][10][11][12] . Thereby, the frequencies of an ion's motion in the electrostatic and magnetic field of a Penning trap are measured. The mass uncertainty mainly arises from the uncertainty of the frequency measurement, which in turn depends on how precisely the ion motion can be manipulated and cooled. To that end, active feedback can be applied, where the signal of the ion oscillation is detected, amplified, phaseshifted and subsequently coupled back onto the ion itself. This highly versatile technique allows precise control over the oscillation amplitude 13 , enables feedback cooling down to sub-kelvin temperatures 14 , or can directly manipulate certain parameters like the signal-to-noise ratio (SNR) or the damping characteristics of the ion detection system 15,16 . Previously realized feedback systems utilize analog circuits [13][14][15][16][17][18] which are specifically tailored to only a) Electronic mail: jost.herkenhoff@mpi-hd.mpg.de b) Present address: Advanced Energy Science and Technology Guangdong Laboratory, Huizhou 516003, China c) Present address: Van der Waals-Zeeman Institute, Institute of Physics, University of Amsterdam, 1098 XH Amsterdam, the Netherlands one of the feedback applications mentioned above.
In this paper, a novel feedback system based on digital signal processing is presented, offering greater flexibility and extended capabilities compared to conventional analog techniques. High-speed analog-to-digital and digitalto-analog converters (ADCs and DACs) are used for signal conversion, allowing a field-programmable gate array (FPGA) to apply signal transformations like filtering and phase shifting in real-time in the digital domain. A multi-core processor, which is directly interfaced to the FPGA fabric, is used for signal analysis and can be utilized to implement adaptive filters or to realize complex measurement cycles without the need for auxiliary devices. The digital architecture pushes the boundaries of currently possible ion manipulation techniques and opens up the possibility for improved frequency measurement techniques based on direct phase determination of the ion oscillation. The presented feedback system is deployed at the Penning-trap experiment Pentatrap 19 , located at the Max Planck Institute for Nuclear Physics, where it will contribute to achieving the aimed precision of a few parts in 10 12 for mass-ratio measurements of highly charged ions in the medium-heavy to heavy mass range. Pentatrap provides atomic masses to test, among others, quantum electrodynamics in the regime of extreme electric fields 20 and contributes to the determination of an upper limit for the neutrino mass 9,21,22 .

II. PENNING TRAPS & ACTIVE FEEDBACK
Penning traps confine a single ion using the superposition of a homogeneous magnetic field with field strength B 0 and an electrostatic quadrupole field created by a stack of electrodes as shown in Fig. 1b. The ion follows a trajectory consisting of three independent harmonic eigenmotions, namely the axial, the modified cyclotron and the magnetron motion, depicted in Fig. 1a. By measuring their respective frequencies ν z , ν + and ν − , the mass m of the ion with charge q can be calculated using the relation 1 with ν c being the free-space cyclotron frequency. The individual oscillatory motions induce image currents on the order of a few femtoampere between the trap electrodes 23,24 . These small currents can be converted into a measurable voltage by connecting a high impedance Z to an electrode that is offset from the ion's center of motion in the direction of oscillation to be detected 25,26 . At the Pentatrap experiment, only the axial motion is detected with this technique by using a pickup electrode that is axially offset. The impedance is realized using a superconducting coil L, which forms a resonant LCR circuit (hereinafter called resonator ) together with the parasitic capacitance C of the detection electrode. Residual ohmic and dielectric losses lead to a finite resistance R, yielding a quality factor Q = R/ C/L of about 4400. The resonator's frequencydependent impedance is then given by with ν res = (2π √ LC) −1 being its resonance frequency. Tuning the ion's axial frequency into resonance results in a purely resistive impedance Z(ν res ) = R. The voltage drop across the resonator is detected by a cryogenic lownoise amplifier, making the axial oscillation visible as a peak at ν z in the frequency spectrum of the amplified signal. The current induced in the trap electrode causes energy from the ion's axial motion to get dissipated in the detection system, leading to an exponential decrease of its amplitude with a time constant τ that is proportional to 1/Re{Z}. Due to the associated reduction of accessible phase space volume, this process is commonly referred to as resistive cooling 26,27 . It is counteracted by the incoherent thermal noise of the detection system, leading to a finite equilibrium temperature of the ion that is equal to the temperature of the detection system. As the Pentatrap experiment is cooled by thermal contact to a liquid helium bath at atmospheric pressure, the axial mode is expected to equilibrate at T z = 4.2 K 1 . At 1 Ignoring any further internal and external noise sources, which would increase the equilibrium temperature of the ion.
Feedback System Figure 1. (a) Trajectory of the ion motion (magenta), consisting of the axial (green), cyclotron (blue) and magnetron oscillation (orange). Figure (b) shows a cut through a sketched Penning-trap electrode structure with a schematic of the attached detection system for the axial motion. The red signal path visualizes the feedback system in its configuration to apply direct feedback to the ion. . Measured frequency spectrum of the detection system output signal. The underlying "bell shaped" curve originates from the thermal noise of the resonator, shaped by its frequency dependent impedance. A dip signature is visible at ν ≈ νres ≈ 740 kHz, which is the result of an ion in thermal equilibrium with the detection system. this time, the ion is no longer visible as a peak in the frequency spectrum. However, it can still be detected, since the thermalized ion effectively shortens the thermal noise of the resonator, leading to a dip in its spectrum, shown in Fig. 2. While in theory the noise amplitude at the dip center is expected to be zero, in reality it is elevated by the amplifier noise. The SNR of this dip-detection technique is defined as the ratio n res /n dip of the resonator lineshape noise density n res at ν z and the locally minimum noise density of the ion dip n dip . In order to measure the cyclotron and magnetron frequencies, they are independently coupled to the axial mode using sideband coupling 1 . The coupled modes experience resistive cooling from the interaction with the resonator and equilibrate at temperatures of 28 The negative sign of the magnetron temperature T − arises from the inverted energy level scheme of the magnetron motion 1 . While the signal from the axial detection circuit is primarily used for frequency determination, it can simultaneously be used to apply active feedback to the ion. For this purpose, the detected ion signal is phase shifted, amplified or attenuated and subsequently fed back to an electrode of the Penning trap. This produces an additional "ion derived" excitation field within the trap that directly influences the ion motion. While other configurations are possible, the following discussion assumes the feedback to be applied to an electrode that is opposite to the detection electrode with respect to the ion center position, as depicted in Fig. 1. The axial motion of an ion under active feedback is then described by the equation with γ ∼ 1 τ being the damping due to resistive cooling. The active feedback loop itself is represented by a generalized complex feedback gain G = |G|e iφ , with φ being the introduced phase shift and |G| the gain magnitude accounting for all signal amplifications or attenuations within the ion detection system, the feedback loop itself, as well as the coupling strength between the ion and the trap electrodes. It can be seen that the application of feedback with a phase of 0 • or 180 • can be used to arbitrarily modify the damping of the ion: This opens up the possibility to achieve zero or even negative damping, resulting in a self-excited oscillation. The fluctuation-dissipation theorem 29,30 states, that the damping of the ion is inherently connected to its temperature, revealing that feedback with 0 < |G| < 1 and φ = 0 • is able to reduce the axial temperature of the ion below its equilibrium temperature without feedback 18 : The application of 180 • feedback increases the damping, resulting in a faster cooling rate at the expense of a higher equilibrium temperature. Phases other than 0 • and 180 • lead to a detuning of the axial frequency ν z , which is often undesirable. Thus, a fine grained adjustable phase shift with high temporal stability is required in order to precisely achieve 0 • or 180 • feedback.
Care must be taken, as the feedback signal fed into the Penning trap can couple directly back to the resonator through parasitic inter-electrode capacitances, leading to modifications of its properties. This can be avoided using a secondary feedback path fed into another trap electrode or coupled directly to the resonator using a discrete capacitor. By carefully tuning the phase and gain relations between both feedback paths so that they destructively interfere at the detection electrode, the feedback signal as seen by the detection system can be canceled out almost completely while maintaining the desired effect on the ion 18 .  On the other hand, the previously mentioned effect of active feedback coupling back to the detection system can be deliberately utilized to modify its characteristics. For that, a discrete capacitor C fb is used to achieve direct coupling to the resonator. Figure 3a depicts the schematic of the resonator with the feedback loop, which can be equivalently modeled as an entirely passive circuit by introducing the complex admittance Y fb = iωC fb (1 − G), as shown in Fig. 3b. Using this model, an effective resistance can be defined, showing that the resistance of the resonator can be arbitrarily modified by changing the gain G. When applying feedback such that R eff < R, the Johnson-Nyquist noise 31,32 of the circuit gets actively suppressed, resulting in a detection system that "looks" colder to the ion than its actual physical temperature T 0 : The minimum achievable temperature is limited by electrical noise within the feedback path, dominantly originating from the cryogenic amplifier, which is not included in Eq. (8). For a detailed discussion see 18.
Feedback with φ = 0 • or 180 • effectively alters the capacitance of the resonator, resulting in a varying resonance frequency ν res,fb = ν res with ν res being the resonance frequency without feedback. The ion can therefore be completely decoupled from the detection system by introducing a large resonance frequency detuning.

III. IMPLEMENTATION OF THE DIGITAL FEEDBACK SYSTEM
A. Hardware The digital feedback system is implemented using the STEMlab 125-14 platform 33 (formerly: Red Pitaya) for analog/digital conversion and signal processing. It was already successfully used in various real-time applications in physics, including laser and frequency comb stabilization 34,35 and lock in amplifiers 36 , but to our knowledge has never been used for the direct manipulation of single ions. The STEMlab is built around a Zynq 7000 37 system on chip (SoC), combining a dual core ARM A9 CPU with FPGA fabric on the same device. Additionally, it provides two ADCs and DACs (LTC2145CUP-14 and AD9767) with a resolution of 14 bit and a sampling rate of 125 MHz, which are used for the real-time data conversion. Due to the large resulting data rate of 3.5 Gbit/s, FPGAs are the platform of choice for the digital feedback system. Figure 4 shows the block diagram of the custom hardware built around the STEMlab platform. As the ion detection system outputs a signal with an amplitude of only a few millivolt, further amplification is necessary to fully utilize the ±1 V dynamic range of the ADC. This is accomplished using an AD8429 instrumentation amplifier with 20 dB gain, followed by an AD8336 variable gain amplifier (VGA) with a range of −10 dB to 40 dB. The VGA gain is controlled by an analog control voltage generated by a filtered pulse-width modulated (PWM) output of the FPGA. This allows one to remotely adjust the input amplitude or enables the implementation of automated gain control. After the ion signal has been processed by the FPGA (see section III B), the two output datastreams are converted back into the analog domain using two DACs. The STEMlab provides a DC offset removal circuit, to shift the DACs unipolar output range to a symmetric output of ±1 V. However, this circuit is reported to couple excess noise into the analog outputs, which is why we removed it as described in Ref. 38. Instead, we used a serial AC coupling capacitor to symmetrize the output voltage. As a result, its frequency response is cutoff below ≈ 100 Hz, which is sufficiently far away from the frequency range of interest of a few 100 kHz. It is advisable to utilize the full output voltage span of the DAC in order to make best use of its available resolution and therefore achieve the highest possible SNR. For adapting the output signal to different amplitude level requirements, each analog output is connected to two independently controllable AD8336 VGAs with a range of −26 dB to 34 dB. Additionally, a set of fixed attenuators ranging from 2 dB to 16 dB are available, which can be manually engaged into the output paths to ac-commodate an even larger output amplitude range. The analog circuitry can be electrically disconnected from its input and output connectors using digitally controlled relays. When the feedback system is not in use, this can be helpful to eliminate potential noise sources, which are often a major concern in high-sensitivity experiments like Penning traps. However, the presented system was not found to introduce significant excess noise into the experimental setup.
In its factory configuration, the STEMlab uses an onboard 125 MHz crystal oscillator to clock the FPGA, ADCs and DACs. Since temporal stability is of great importance for the feedback system, additional circuitry was designed to allow the STEMlab to derive its timing from an external 10 MHz rubidium frequency standard. The external clock is galvanically isolated by a transformer, eliminating the risk of ground loops. A clock conditioning circuit, built around an LTC6957 clock buffer, generates a clean rectangular signal that is fed into an AD9552 phase-locked loop (PLL), which is used to produce the 125 MHz main clock. The high accuracy of the external clock source allows the feedback system to also be used for high-precision frequency measurements. An external trigger signal is connected to a digital input of the FPGA to allow the feedback system to be synchronized with the measurement sequence of Pentatrap (see section section III B). The trigger input is 50 Ω terminated and equipped with clamping diodes to protect the FPGA input from overvoltages.
The feedback system is powered using an external 5V supply. The input and output amplifiers require a bipolar low-noise supply with ±5 V. For that, a dual channel DC-DC switchmode converter (LTM8049) generates two intermediate voltages with ±8 V out of the external unipolar 5 V supply. The switchmode frequency is set to 1.7 MHz, which is well above the frequency band of interest in order to prevent interference. After filtering with ferrite beads, the intermediate voltage rails are fed into a pair of ultra low-noise linear voltage regulators (LT3045 and LT3094) to generate the final ±5 V analog supply. The reference clock circuitry is powered by a 3.3 V supply rail that is generated by an internal voltage regulator of the STEMlab. A picture of the feedback system is shown in Fig. 5.

B. FPGA
The STEMlab's ADCs and DACs are connected to the FPGA using a parallel interface, offering a low latency datapath. The total propagation delay of the feedback path from pickup electrode to feedback electrode, including the signal processing algorithm, must be minimized, as any introduced latency causes a frequency dependent phase response that directly limits the achievable feedback bandwidth. Thus, the whole FPGA implementation is specifically tailored to minimize the internal latency. Figure 6a shows a block diagram of the FPGA imple-  Figure 5. Picture of the assembled digital feedback system. The STEMlab (red PCB) is mounted onto the custom designed PCB using pin headers. The analog input and outputs are connected to the main PCB using SMA cables. The whole assembly is mounted inside an aluminium housing (not shown) mentation. One of the core components of the feedback system are the variable phase shifters. They are implemented using an inphase/quadrature (IQ) architecture, depicted in Fig. 6b. A Hilbert transform is used to produce a constant −90 • phase shifted copy of the input signal, called the quadrature (Q) component. Together with the original signal, called the inphase (I) component, an output signal with arbitrary phase shift can be obtained by summing the inphase and quadrature components with weights of cos(ϕ) and sin(ϕ), respectively. An ideal Hilbert transform has a perfectly flat phase response but cannot be realized due to its non-casual impulse response. However, for a narrow bandwidth around the frequency of interest, i.e. the axial frequency ν z , it can be approximated by a time delay of t 90 • = 90 • /360 • /ν z . For other frequencies than ν z , the desired phase shift deviates from −90 • with a slope of dϕ/dν = −t 90 • · 360 • . For an axial frequency of ν z = 740 kHz, the slope is ≈ 0.12 • / kHz, which is acceptable considering the narrow bandwidth of the detection system of a few 100 Hz. The time delay t 90 • translates into a delay of D = ν clk · t 90 • clock cycles, with ν clk = 125 MHz being the FPGA clock frequency. Since D is generally a non integer number and there are no fractional clock cycles, a linear interpolation filter had to be used to obtain the required subclock cycle time resolution. For that, the input signal is split into two paths that are delayed by D and D 2 clock cycles and are subsequently summed together with a weight of (1 − δ) and δ, respectively, with δ = D − D being the fractional part of D. This structure provides a phase shift of precisely −90 • for the frequency ν z , but also forms a low pass filter with a worst case (δ = 0.5) cutoff frequency of ≈ 32 MHz, which is fortunately way above the axial frequency. The fractional delay line is implemented using a first-in-first-out (FIFO) buffer with two taps at the D th and D th memory cell, where D can be configured via software.
The quadrature component, i.e. the output of the fractional delay line, and the inphase component are then weighted by A sin(ϕ) and A cos(ϕ) using hardware multipliers. The common scaling factor A ∈ [0, 1] allows the application of digital attenuation to the output signal. A complete description of the IQ phase shifter implementation is given by its impulse response yields the frequency response shown in Fig. 7. While it exactly matches an ideal phase shifter at ν z , its response diverges for other frequencies. Using a linear expansion around ν z , a worst case magnitude slope of ±0.01 dB/ kHz for ϕ set = ±45 • was found. The worst case phase slope of ±0.12 • / kHz for ϕ set = ±90 • originates from the fractional delay line, as described earlier.
For the narrow bandwidth of the ion detection system, these effects can be neglected.
The parameters A and ϕ can be dynamically varied for both phase shifters independently using a parameter sequencer module programmed into the FPGA. It contains a list of eight software-configurable parameter sets, that are sequentially loaded into the phase shifters with precise timing. The step condition can either be a fixed time delay programmed into the corresponding parameter set or a trigger condition, i.e. rising or falling edge of the external trigger input. As the trigger signal assertion is not necessarily synchronized with the FPGA clock frequency, a worst case timing jitter of one clock cycle (8 ns) might occur. This effect is eliminated by synchronizing the trigger signal generation to the 10 MHz reference clock input.
The parameter sequencer also controls the input source of the feedback paths using a connected multiplexer. It selects either between the ADC input signal or one of  Figure 7. Frequency response of the variable phase shifter for nine different phase shift settings from −90 • to 90 • . The upper graph shows the magnitude, the lower graph the phase of the response function H. Phase settings outside this range have an identical relative shape of the frequency response except for a constant phase offset, which is why they were omitted for clarity. The fractional delay line was configured for an ion frequency of νz = 740 kHz ( D = 42, δ = 0.23). At this frequency, the magnitude |H| is exactly 0 dB and the phase ∠H coincidences precisely with the respective configured phase.
two sinusoidal signals generated by two built-in direct digital synthesis (DDS) modules whose frequency can be configured via software. This can be used to generate sinusoidal pulses for ion excitation, as used in various measurement schemes. In addition to the feedback paths, the FPGA contains an acquisition system, which can be used for ion detection. To efficiently extract the narrow ion signal from the wideband ADC signal, it is mixed down to a complex signal with zero intermediate frequency (zero IF) using a digital IQ mixer architecture. Two hardware multipliers are used to produce the downmixed IQ signals by mixing the input signal with two, 90 • out of phase, local oscillator signals, generated using a DDS module with software-configurable frequency. After downmixing, cascaded integrator-comb (CIC) filters decimate the data rate, and thus the bandwidth, by a variable factor of 64 to 4096. To accommodate for the bit growth during downconversion, the signal paths after the CIC filters are chosen to have a width of 32 bits. The CIC filters have a non-flat passband, which is compensated for using finite impulse response (FIR) filters with 309 taps, designed to eliminate the passband droop. The inphase and quadrature paths are then combined into a 64 bit datastream, which is fed into a buffering FIFO memory with 2048 entries. Finally, a direct memory access (DMA) engine writes the buffered datastream into a dedicated region of the main memory, from which the data can be read and further processed in software on the ARM A9 CPUs.
The acquisition system can be triggered in precise synchronization to the feedback sequencer, allowing the implementation of complex measurement cycles, turning the digital feedback system into a stand-alone measuring device.

C. Software
Due to the tight integration of FPGA and CPU, the advantages of both can be utilized: While the FPGA handles the specialized, real-time data processing, the CPU carries out control tasks and augments the data processing with its ability to implement general purpose algorithms. At its base, the STEMlab's dual core ARM CPU runs the GNU/Linux operating system. On top of that, a custom python library acts as a "driver" to provide easy access to the functionality of the feedback system. It can read/write all parameters of the FPGA modules, which are connected to the CPU memory space by an Advanced eXtensible Interface 39 (AXI) bus. A jupyter notebook 40 server can be accessed using the STEMlab's network connection and provides a convenient way to implement measurement scripts. Additionally, an EPICS 41 (Experimental Physics and Industrial Control System) server allows remote control of the feedback parameters and integration into the existing Pentatrap control system.
A standalone software was developed to realize the first digitally controlled self-excited oscillating ion: In order for the ion to maintain its oscillation amplitude, the feedback gain must be constantly adjusted. For this, the ion signal is sampled and transferred into memory using the built-in acquisition system. The software then calculates its frequency domain spectrum using a fast Fourier transform (FFT) and determines the ion amplitude using a peak detection algorithm. The amplitude deviation from a given setpoint is then fed into a PID control loop to calculate the needed feedback gain. After updating the feedback parameters accordingly, the cycle is repeated. The results of this self-excited oscillator (SEO) implementation are presented in section IV D.

A. Resonator modification
As described in section II, active feedback can be utilized to modify the parameters of the resonator used in the detection system. To characterize this modification, a parameter space consisting of 128 × 128 feedback gain/phase pairs, ranging from -26 dB to -10 dB and −180 • to 180 • , was scanned, while monitoring the Q value and ν res of the resonator. The feedback signal was connected to a trap electrode, resulting in coupling to the resonator by means of the parasitic capacitance to the pickup electrode. For each point in the parameter space, a set of 40 spectra with a span of 15 kHz centered around the resonator's center frequency and a resolution of 3.5 Hz were acquired using the feedback system's builtin acquisition system. Averaging the 40 spectra of each datapoint results in a set of 128 × 128 spectra with low noise, which are individually fitted to the mathematical model of the resonator's frequency response. Figure 8 shows the obtained results in a 2D heatmap representation.
Compared to the nominal Q value of about 4400, the feedback system can significantly increase it up to 10 5 , as can be seen in Fig. 8a. With such a high Q factor, the damping of the resonator is close to zero, so that it can easily be driven into free oscillations, represented by the black regions in Fig. 8, potentially causing ion loss. It must be noted that the arbitrarily increased Q value simultaneously heats up the ion according to Eq. (8), which can lead to undesired systematic errors. However, the high SNR enables faster measurements, which is advantageous e.g. for ion loading and preparation, where fast user feedback is more important than absolute frequency accuracy. Figure 8b shows the detuning ∆ν res of the resonator for different feedback parameters. The results perfectly agree with Eq. (9). An extreme case of this frequency detuning is shown in Fig. 9, where the resonator is shifted by several linewidths. This way the ion can be decoupled from the resonator.

B. Feedback Cooling
To measure the effect of active feedback cooling, the temperature of the axial motion of a single 40 Ar 13+ ion was measured with different feedback parameters. The measurements have been carried out at the Alphatrap experiment 42 , as it enables strong feedback coupling to the resonator via dedicated, capacitive feedback paths. Additionally, the availability of a magnetic field inhomogeneity simplifies axial temperature measurements, as described below.
In a macroscopic system, temperature is defined as the distribution of kinetic energy across an ensemble of particles. The ergodic hypothesis states that the energy averaged across an ensemble of particles is equal to the energy of a single particle in thermal equilibrium with a heat bath, e.g. the detection circuit, averaged over time. The temperature of an eigenmode of a single ion is then defined by the distribution of its repeatedly measured fluctuating energy. If the ion is decoupled from the detection circuit, the energy will be fixed at its instantaneous value, giving enough time for it to be measured. Repeated measurements of the energy E will follow a Boltzmann distribution which can be used to determine the temperature T z of the axial motion. Since in Penning traps the frequency is usually independent of the axial energy, the axial temperature can only be measured indirectly: Applying sideband coupling imprints the thermal fluctuations of the axial mode onto the cyclotron mode, whose resulting temperature T + is then related to the axial temperature by Eq. (3). Coupling is performed for several seconds to ensure full thermalization of the cyclotron mode. The cyclotron energy is measured by adiabatically transporting the ion into a second Penning trap with a strong quadratic magnetic field inhomogeneity B 2 = 43080(120) T/m 2 . This translates the cyclotron energy into an axial frequency shift on the order of 10 to 100 Hz which can be easily measured. Afterward, the ion is transported back into the initial trap and the cycle is repeated. A total of 126 measurements were performed for each of three different feedback configurations. The temperature of the axial mode was then determined via maximum likelihood estimation using the underlying Boltzmann distribution from Eq. (11). The feedback was configured for a phase shift of 180 • to lower the Q value of the detection system and thus to cool the ion. The lowered Q value is visible in the spectrum of the resonator shown in Fig. 10a. Applying feedback with a gain of −15 dB cools the ion's axial motion down to 2.05(18) K, which corresponds to a reduction by a factor of 3.0(4) compared to the measured temperature of 6.1(5) K without feedback. This is consistent with the Q value reduction factor of 2.909(6), as predicted by Eq. (8). With a feedback gain of −5 dB, an axial temperature of 1.02(9) K was measured, corresponding to a cooling factor of 6.0(8). This is slightly less than the Q value reduction factor of 6.686 (14), which can be attributed to increased feedback of noise, predominantly from the cryogenic amplifier, heating up the ion.

C. Phase Sensitive Measurement of Axial Frequency
At Pentatrap, the axial frequency is currently measured by fitting a mathematical model of an ion in thermal equilibrium with the detection system to the dip spectrum. As the dip detection technique relies on the incoherent thermal noise of the resonator, its SNR only increases with √ t over the measurement time t, making it a very slow process. A typical axial measurement cycle takes about 7 min and yields a statistical frequency uncertainty of 10 to 20 mHz. The systematic accuracy depends on the explicit choice of the used mathematical model.
An alternative measurement scheme was proposed by Stahl et al. [43], relying on direct phase measurements of the coherent ion oscillation. As it measures the frequency without the explicit need for a mathematical model, it does not suffer from model-inherited systematic uncertainties. Due to its similarities with the Pulse and Phase (PnP) technique for cyclotron frequency determination 44 , it is subsequently referred to as Axial PnP (APnP). A detailed sketch of this technique is shown in Fig. 11. An radio frequency (RF) pulse is used to excite the ion and imprint a known starting phase to its oscillation. After a precisely known time t evol , the phase of the freely evolving axial oscillation is read out, which can be used to determine the axial frequency with ∆ϕ being the difference between read out phase and imprinted phase and N being the number of whole oscillation cycles within the phase evolution time. N cannot be determined from a single APnP cycle, but can be in- Mag./dB Figure 9. Frequency spectrum of the axial detection system. Plot (a) shows the resonator lineshape without active feedback with a visible dip feature at νz originating from a thermalized ion. Plot (b) shows the resonator lineshape with enabled active feedback, configured for a resonance frequency shift of ≈ 2.78 kHz. For the presented measurement, the ion was excited to a large amplitude, resulting in an almost infinitely persisting peak signal at νz. The resonator-detuning largely inhibits resistive cooling of the ion.
and exceeds the Fourier limit, provided that the phase can be read out with an uncertainty σ ϕ < 2π. The phase evolution time is naturally limited to a few 100 ms by the decaying oscillation amplitude due to resistive cooling. To overcome this limit, active feedback is used to detune the resonator and thus to decouple the ion from the detection system for the duration of phase evolution. The APnP technique was realized using the digital feedback system by connecting its trigger input to a pulse generator, which is already used as the measurement sequencer at Pentatrap, to enable or disable the active feedback with the required high temporal precision. It was successfully tested with a 187 Re 32+ ion and phase evolution times from 82 ms to 2.4 s. For each evolution time, a set of 20 cycles was acquired to gather information about the statistical phase uncertainty. The results are listed in Tab. I. The longest evolution time of 2.4 s yields an uncertainty of 20.1 • , resulting in an axial frequency uncertainty of 23.3 mHz, according to Eq. (14). While this is in agreement with the uncertainty of the dip technique, the measurement time is reduced by a factor of 166. The results show a steady increase of phase uncertainty with longer evolution times, which can be attributed to fluctuations in the trapping potential. A disadvantage of this technique resides in the relatively high axial oscillation amplitude arising from phase imprinting, which can potentially lead to systematic frequency shifts, for example, due to trap anharmonicities. This can be compensated for by shrinking the phase space of the initial thermal fluctuations via feedback cooling, which then permits lower excitation amplitudes. This requires the feedback system to be switched between "cooling configuration" and "resonator shift configuration" with precise timing and without dead time, which is a perfect usecase for the presented digital feedback system. Characterization measurements on this improved technique are pending.

D. Self-Excited Oscillator (SEO)
Due to the direct coupling of FPGA and CPU, the presented digital system is ideally suited for the implementation of a single-ion SEO. The software control loop to keep the ion amplitude constant is described in section III C.  Figure 11. Sketch of the APnP measurement scheme (simulated data). The axial ion mode is initially in thermal equilibrium with the detection system, represented by the thermal noise in the axial amplitude, as depicted in the upper graph.
(1) Detuning the center frequency νres of the resonator away from νz via active feedback leads to a decoupling of the ion from the detection circuit. (2) A RF pulse excitation imprints a known starting phase to the axial oscillation. (3) The axial oscillation is allowed to evolve freely for a fixed duration t evol . Due to the resonator shift, no resistive cooling is occurring and the amplitude stays constant, theoretically allowing unlimited phase evolution times. (4) Switching off feedback brings the detection system back into resonance with the axial oscillation, leading to a measurable signal on its output (5).
The SEO implementation relies on a complete cancellation of the ion damping, i.e. γ → 0, which is accomplished by applying feedback directly to the ion according to Eq. (5). In order to prevent any modifications of the ion detection system the feedback signal must not couple to the resonator. For that, the second output of the feedback system is connected to a separate trap electrode. By carefully tuning the relative phase and gain relation of both channels, the feedback signal, as seen by the ion detection system, can be completely canceled out, while still applying feedback to the ion.
The following results were acquired at the Pentatrap experiment using a 187 Re 32+ ion. The amplitude setpoint, at which the ion should be kept constant using the control loop, is set to 3 dB above resonator noise level. The internal acquisition system, used for ion amplitude measurement and frequency determination, was configured for a downsampling rate of 4096 and a sample size of 2048, resulting in a control loop interval of ≈ 80 ms. The time evolution of the SEO in operation is shown in Fig. 12. After the control loop has excited the ion to the desired amplitude, it is held constant for an arbitrary time. The ion now performs coherent oscillation at Recording of the startup phase and operation of a single-ion SEO. The first graph shows the ratio of measured ion amplitude A to the amplitude setpoint Aset. The middle graph shows the applied feedback gain, which is controlled by a PID loop. The gain is slowly ramped up until the amplitude setpoint is reached at t ≈ 29 s and is constantly adjusted afterwards to maintain the desired amplitude. The lowest graph shows the ion frequency, which is determined from the position of the ion peak in the frequency spectrum.
an amplitude that is easily detectable, enabling very fast axial frequency measurements. While the high ion amplitude comes at the cost of increased systematic shifts, and is thus not suitable for high-accuracy frequency measurements, it can be used to track relative frequency changes at unparalleled measurement rates. This can be used for the detection of spin states 45 or the indirect characterization of trap potential stability by measuring axial frequency fluctuations.

V. SUMMARY
Active feedback has proven to be a versatile tool in Penning-trap experiments. The presented feedback system demonstrates the use of real-time data processing algorithms to manipulate the motion of a single ion confined in a Penning trap. The novel concept utilizes highspeed analog/digital data conversion and a modern SoC for signal processing, offering high temporal and environmental stability that is only limited by the stability of the used reference frequency and provides surpassing flexibility compared to previously realized analog feedback systems. By applying feedback to the resonator used within the ion detection system, a Q value variation by two orders of magnitude and a resonance frequency shift of up to 2.78 kHz were successfully demonstrated. Furthermore, it was used for feedback cooling of an ion by a factor of ≈ 6 down to 1.01(9) K. A full featured acquisition system was implemented inside the FPGA logic, which transfers the detected signal into the main memory of the attached CPU. Using this feature, the feedback system was successfully used to realize a single-ion selfexcited oscillator without the need for auxiliary devices. The digital architecture allows the feedback parameters to be dynamically varied with precise timing and in synchronization with an external trigger signal, opening up the possibility for new measurement schemes. The system will be commissioned at Pentatrap, among other things, to implement the presented APnP measurement scheme, which was demonstrated to reduce the axial frequency measurement time by two orders of magnitude while eliminating model-related systematics. As the statistical uncertainty of Pentatrap is currently mainly limited by the axial precision, the presented system will contribute to achieving the mass accuracy goal of a few parts in 10 12 .

ACKNOWLEDGMENTS
We thank our colleagues from the Alphatrap

DATA AVAILABILITY
The data that support the findings of this study are available from the corresponding author upon reasonable request.