{'fraction_non_alphanumeric': 0.025613525960507224, 'fraction_numerical': 0.011986625449498455, 'mean_word_length': 4.540720027962251, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
The Front-End Electronics and the Data Acquisition System for a Kinetic Inductance Detector

The Data Acquisition System (DAQ) and the Front-End electronics for an array of Kinetic Inductance Detectors (KIDs) are described. KIDs are superconductive detectors, in which electrons are organized in Cooper pairs. Any incident radiation could break a pair generating a couple of quasi-particles that increase the inductance of the detector. The DAQ system we developed is a hardware/software co-design, based on state machines and on a microprocessor embedded into an FPGA. A commercial DAC/ADC board is used to interface the FPGA to the array of KIDs. The DAQ system generates a Stimulus signal suitable for an array of up to 128 KIDs. Such signal is up-mixed with a 3 GHz carrier wave and it then excites the KIDs array. The read-out signal from the detector is down-mixed with respect to the 3 GHz sine wave and recovered Stimulus is read back by the ADC device. The microprocessor stores read out data via a PCI express bus (PCIe) into an external disk. It also computes the Fast Fourier Transform of the acquired read out signal: this allows extrapolating which KID interacted and the energy of the impinging radiation. Simulations and tests have been performed successfully and experimental results are presented.


Introduction
Detectors commonly used in microwave cosmology, such as spider web bolometers, have reached the radiative noise limit. Therefore, decreasing the detector's noise level does not improve the quality of measurements. If the noise has a statistic origin, a large number of pixels in the array can be exploited to reduce the noise by the factor 1/√N [1]. Nevertheless, big arrays of spider web bolometers are not a viable solution, since they would need many connections; moreover, cooling the detector and placing temperature sensors over each pixel would be very difficult. Recently, Kinetic Inductance Detectors (KIDs) [2] have been shown to be useful to pursue this strategy. In the followings, we will describe the hardware/software environment and the Front-End electronics of a Data Acquisition (DAQ) system for an array of KIDs. resonant frequency of the KID itself. Such changes are proportional to the number of quasi-particles generated, so to the energy of the impinging radiation. In Figure 1 it is schematized the generation of two quasi-particles by a photon of energy hν > 2Δ (where Δ is the energy gap between Cooper pairs and quasi-particles).
Measuring the variation of the resonant properties of the KID means measuring the energy of the incident radiation [4]. The extremely low losses characteristic of superconductors make it possible to reach high Quality Factors (f/Δf, where f is the resonant frequency and Δf is the bandwidth), which allow very sensitive measurements. To read-out the detector, a capacitive coupling between the detector and a probe sine signal (whose frequency is equal to the KID resonant one) is obtained by implementing a feed line routed close to the KID. If the detector is stimulated by some radiation, the kinetic inductance would change proportionally to the energy of the impinging radiation and both the amplitude and the phase of the probe signal would change. In Figure 2 it is reported the equivalent circuit of a KID and its working principle. Dark and illumination conditions of the KID are described by blue and red curves respectively, where S is the KID complex transmission.
An array of N KIDs is composed of N detectors, usually designed as a rectangular matrix in order to cover a custom detecting surface. In Figure 3 it is sketched a 3x3 KID array. Each pixel of the matrix is a resonator tuned on its own frequency. It is possible to choose such resonant frequency by designing properly the physical characteristics of the resonator itself [5]. A unique feed line gets close to each pixel and delivers a Stimulus signal. If the feed line carries a sine wave tuned to the resonant frequency of a pixel and if a variation of the resonant frequency of this pixel happens, the intensity of the read-out signal is reduced and its phase is shifted. All the pixels can be stimulated by a unique signal, containing all the resonant frequencies in a comb. In this way, when a photon hits any pixel, it excites only the component of the signal corresponding to the pixel's frequency [6]. A simple and effective way to obtain a comb signal is producing N sine waves (one for each pixel's proper resonant frequency) and adding them up.

Calibrations of KIDs
As said before, the resonant frequency of a KID detector can be decided by properly designing the length of the resonator itself. Manufacturers of KID arrays define all the characteristics of each KID in the matrix, building them in order to fulfil the constraints provided by designers. However, as the resonant frequency of each KID sensitively depends on its own fabrication process, it may differ by the one reported in the technical documentation. So a calibration procedure is needed. We developed the DAQ system in order to control an array of up to 128 KIDs. Under certain limits (explained in "The DAQ System" paragraph), our system allows defining the frequency spectrum of the Stimulus signal in relation with the detector array to be used. To calibrate each KID, we send a single sine probe signal, whose frequency is about 500 kHz smaller than the KID's declared one. We then make the frequency of the probe signal to vary of small steps (5 KHz), in order to measure which frequency induces the highest resonance in the KID (determining its resonant frequency). Then we read out the probe and compare step results with each other.

Figure 2.
A) KID equivalent circuit. Any incident photon can break a pair and generate two quasiparticles that would decrease the inductance of the detector. Dark and illumination conditions of the KID are represented by blue and red curves respectively. In this case, the amplitude of the Stimulus signal is reduced and its phase is shifted. B) The change in amplitude and phase can be seen also in the complex plane, where S is the complex transmission.

The data acquisition system
With respect to other Data Acquisition techniques (usually based on VME crates or custom electronic boards), our system is much cheaper as it is designed around commercial standalone boards. In principle, it could also be possible to implement a software driven environment to generate the stimulus signal. However, even the most performing multi-core processor is not enough powerful to generate a 100 sine waves probe signal with frequencies higher than 4MHz.
Our DAQ system is based on several State Machines and a Xilinx Microblaze processor embedded inside a Xilinx Virtex-7 FPGA. This last is hosted on a Xilinx VC707 development board. We chose such board because of the devices installed on it and its features. Here we quote some features: -Virtex-7 FPGA; -Good resources to develop both an embedded processor and the control/monitoring systems; -More than 1500 DSP slices in the FPGA to generate and manage the Stimulus signal; -Ethernet and PCIe interfaces; -DDR3 Memory interface.   On the left side, as a yellow box, the FPGA is reported. It contains a Microblaze processor environment and several State Machines. These lasts are responsible of the generation of the Stimulus signal and the recovery of the Read-out signal. On the right side, the FMC176 board and the KID array detector are sketched. The FMC176 is a commercial electronic board, containing several DACs and ADCs devices. The system is interfaced to a terminal via a UART protocol and to a computer via PCIe.
In Figure 4, a scheme of the whole architecture is reported. On the left side, the Microblaze environment is shown. It has been designed around the processor, interfaced via an AXI bus to a UART controller, a PCIe interface and a DDR3 memory controller. The Microblaze initializes the system and starts the DAQ electronics. During the data acquisition routine, the processor continuously monitors error flags and acquires read out data. Data are saved into the DDR3 memory. Eventually, it prints information about the status of the system on the terminal and, when required, transfers the acquired data to an external computer via PCIe. On the right side, it is possible to distinguish the KID interface electronics (sketched in light blue). They are made of a Digital to Analog Converter (DAC) controller and 128 Lock in components. The DAC controller is a State Machine, which provides the digital Stimulus signal to the external DAC device. The FPGA is interfaced to the 4DSP FMC176 electronic board: it is a commercial DAC/ADC board, provided of four 14-bit A/D channels at 250Msps (Analog Devices AD9250) and two 14-bit D/A channels at 5.6Gsps (Analog Devices AD9129). The Nyquist theorem allows us to read out frequencies up to 125MHz with each FMC176 A/D Converter without generating aliasing. Our Stimulus signal is composed of 128 frequencies parted of 1 MHz, so it exceeds the allowed window of the first Nyquist zone. However, by splitting the Read-out signal into two signals, it is possible to exploit two ADC channels and perform Intermediate Frequency (IF) sampling: the first channel operates in the first Nyquist zone after a lowpass filter (around 125MHz cutoff frequency); the second one operates after a band-pass filter in the second Nyquist zone.

Figure 5.
An oscilloscope snapshot of the Stimulus signal. It is the sum of 128 sine waves, whose frequencies go from 1 MHz up to 128MHz. In this image, the phases of the signal have not been optimized: it is clear the peak of energy at the center, where the phases are all aligned. The energy distribution then decreases as much as the sine components loose the phase alignment.
Here they follow some characteristics of the filters: Low-pass filter -End of Passband (< 3dB): 125MHz; -Stopband upper attenuation: 35dB; To avoid troubles in proximity of the cutoff frequencies, we can generate a Stimulus such that the first Nyquist zone includes 100 frequencies (the highest being 100MHz, 25MHz away from the low-pass cutoff frequency) and the second Nyquist zone covers the remaining 28 frequencies, the lowest being 135MHz (25MHz away from the lower cutoff frequency). The DAC device converts the digital Stimulus signal into an analog one and sends it to the array of KIDs. Then it recovers the analog Read-out signal, digitizes it and sends it to the Lock in components. The tasks of the Lock in components are to recover the read-out signal and to compare it to the Stimulus, in order to catch any eventual interaction of any of the KIDs. Further details about the functioning of the Lock in components are provided in the following paragraph.
The FPGA is also connected to an external computer. This last is responsible of the storage of the read-out data and of the generation of the digital Stimulus signal. To generate it, we used the software tool provided together with the DAC board. Such software transfers data via Ethernet to the DAC controller.

The stimulus and the lock in components
At the start-up, the external computer generates the Stimulus signal in the form of a Look-Up (LUT). This strategy gives us enough flexibility to generate the frequency distribution we need. The Stimulus we have generated, as a case study, is the sum of 128 sine waves, whose frequencies go from 1MHz up to 128MHz. In Figure 5, an oscilloscope image of the Stimulus signal is reported. . Therefore, the Stimulus is upmixed with a 3 GHz carrier wave outside the FMC176 board. After going through the KID array, the signal is down-mixed in order to remove the 3 GHz component and it is sent back to the FMC176 board. The ADC digitalizes the Read-out signal and sends it to the Lock-in components. These lasts are state-machine-based devices, whose task is recovering the readout data and checking which KID has been excited. There are 128 Lock-ins, one for each KID. The nth Lock-in isolates the nth component of the Stimulus signal by multiplying the Read-Out signal for the nth original sine component and performing an integration over a programmable time window (up to 2 14 clock cycles long). The only contribution to the integral result is given by the nth sine. This can be easily verified from the following equation, which is the integral of the Stimulus   128 0 sin(ix) i , multiplied for the nth sine component: The above result is valid only if the nth Lock-in has not been hit by any radiation. If the nth KID was stimulated, the amplitude and the phase of the nth sine wave of the Read Out signal would change (as shown in Figure 2). This implies a value between 0 and π, in relation to the intensity of the impinging radiation. The Lock-ins then save the produced data into the processor environment DDR3 memory. Moreover, if required the Microblaze stores the data to an external disk via the PCIe bus. Other techniques could be used to perform the analysis of the read-out signal (like real-time FFT computation). However we chose to implement a lock-in based strategy because it provides highfrequency noise filtering, in addition to phase-sensitive detection. Moreover, as the Lock-ins receive the Stimulus Look-Up Table during start-up, our approach makes it possible to be automatically tuned on the stimulus spectrum, without reprogramming the FPGA or changing the hardware in case of a probe change.

Experimental data
Timing simulations have been performed to test the Processor system and check the correctness of the generation of the Stimulus signal. The simulator used was Xilinx ISim. We wrote a VHDL test bench file for the simulator. It started-up the system and saved into a text file the digital Stimulus signal provided by the DAC controller to the FMC176 board. In Figure 6, the simulation of the Stimulus signal (called COMB, in the image) vs an oscilloscope snapshot is reported. It is shown only the 13th bit of the signal. The DAC device hosted on the FMC176 is the AD9129, produced by Analog Devices. We were able to make it work at up to 1.0GHz, in the first Nyquist zone. It is a 14 bit DAC and the resolution in generating periodic signals is about 30kHz. During our tests, we generated sine waves perfectly distinguishable, separated by up to 100kHz. We also used a spectrum analyzer to check the Analog Stimulus generated, before the up-mixer. In Figure 7, it is reported a zoomed view of the frequency comb (frequencies separated by 1MHz) elaborated by the spectrum analyzer via the FFT. It is possible to distinguish clearly the peaks, corresponding to the sine wave components. As a case study, our system has been tested on a 3x3 KID array mosaic. The Stimulus generated was a comb signal of sinusoidal waves, whose frequencies spanned from 5 to 20MHz. Then the Stimulus has been externally up-mixed with a 3Ghz carrier wave and sent to the KID array. The noisy process of generation and recombination of the quasiparticles decreases exponentially with temperature. The Noise-Equivalent Power (NEP) of the detector is 10 -16 W/Hz, measured at the temperature of 300mK.

Figure 7.
Zoom view of the FFT of the Stimulus signal, measured by a spectrum analyzer. The X-axis grid step is 2 MHz.

Conclusions
We have developed the Data Acquisition system and the Front-End electronics for an array of 128 Kinetic Inductance Detectors. It is based on an FPGA, in which real-time electronics and an embedded processor environment work in parallel. It reads out the data by measuring the variation in the amplitude and phase of the 128 sine waves of a probe signal. Such variations depend on the energy of the radiation that interacted with the detector. Timing simulations and tests have been performed with success. The system has been successfully tested on a 3x3 KID detector.