1 Introduction

Groundbreaking experiments that employ highly sensitive superconducting detectors are becoming more and more relevant [1,2,3,4]. Detector arrays composed by Transition Edge Sensors (TESs) [5], Metallic Magnetic Calorimeters (MMCs) [6], or Magnetic Microbolometers (MMBs) [7], need a dedicated readout electronics that is able to read them all simultaneously. A complex cryogenic device named Microwave Superconducting Quantum Interference Device (SQUID) Multiplexer (\(\mu\)MUX) is capable of doing this task. The \(\mu\)MUX consists of hundreds or up to thousands of channels connected to the same transmission line. Each channel is formed by one or more radio frequency (RF) SQUIDs coupled to a microwave resonator filter [8]. At the same time, the SQUIDs are magnetically coupled to detectors. Variations in magnetic flux passing through the SQUID caused by a detector modify the corresponding resonator response. Each filter resonates at different frequencies commonly between 4 and 8 GHz. A frequency comb is synthesized to monitor all the channels in a frequency division multiplexing (FDM) scheme [9]. First, a digital frequency comb is generated on a Field-programmable Gate Array (FPGA) at base band. Then, the digital signal is converted to analog by a high-speed digital-to-analog converter and subsequently, it is conditioned and shifted to the filter resonance frequencies by an RF circuit. The SQUID signals are imprinted on the amplitude and phase of the monitoring tones as the filter responses vary. Finally, the tone comb is down-converted by the RF circuit, digitized by an analog-to-digital converter and acquired by the FPGA for processing. The SQUID signals, and therefore the detector signals, are recovered by filtering each generated tone and obtaining the information from their amplitude or phase. The process of separating each tone is called channelization [10].

By default, the SQUIDs are randomly biased by any external magnetic flux (\(\Phi _{\mathrm{{ext}}}\)) at any point of their response which we write in simplified form \(\theta = \cos (2\pi (\Phi _\mathrm{{ext}}/\Phi _0))\), where \(\Phi _0\) is the magnetic flux quantum constant. In order to drive all of the SQUIDs and avoid an insensitive bias point for reading the detectors, a magnetic flux sawtooth-shaped signal (FR) is generated. This signal results from magnetically coupling a current sawtooth signal with \(I_\mathrm{{ramp}}\) peak amplitude and \(f_\mathrm{{ramp}}\) frequency to the SQUIDs. Hence, the SQUID signal is \(\theta (t) = \cos (2\pi N_{\Phi _0} f_\mathrm{{ramp}} \cdot t + \phi (t))\), where \(N_{\Phi _0} = I_\mathrm{{ramp}} M_\mathrm{{ramp}}/ \Phi _0\) is the number of magnetic flux quanta coupled per period of the FR and \(M_\mathrm{{ramp}}\) is the mutual magnetic coupling with the SQUID loop inductance. \(\phi (t) = 2\pi (\Phi _\mathrm{{in}}(t)/\Phi _0)\) is the phase shift produced by the detector magnetic flux signal, \(\Phi _\mathrm{{in}}(t)\). As a consequence, the detector signal can be recovered by reading the instantaneous phase of the SQUID response when the slope of the sawtooth is much higher than the slew rate of the detector signal. This technique is named flux ramp modulation (FRM) [11] since the SQUID signal is phase modulated by the detector signal, i.e., the modulating signal. The Digital Quadrature Demodulator (DQD) is widely used as phase demodulator in multi-rate signal processing systems. Apart from its efficient implementation [12], it can produce arbitrarily small levels of IQ imbalance [13]. In addition, data rate down-sampling optimizes bandwidth utilization and reduces hardware power consumption of stages after the DQD. Nevertheless, spectral folding affects the demodulated detector signal by adding a spurious signal to it, as was recently reported as nonlinearity [14, 15].

In this work, a theoretical description of this phenomena is treated in Sect. 2. In Sect. 3, we obtain a general mathematical model of the spurious signal and simulate the case when the detector signal follows a linear function. We present two proposals to attenuate the spurious signal in Sect. 4. Afterward, measurements in our readout system implementing one of the proposals are displayed in Sect. 5. Finally, conclusions are written in Sect. 6.

2 Theory

The synthesized signal on the FPGA is a sum of tones to drive each microwave resonator. The \(\mu\)MUX modulates in amplitude and phase this signal with the associated SQUID response in each channel. After acquiring and channelizing this signal on the FPGA and demodulating the SQUID signals from it, the detector signals still need to be demodulated. Typically, this task is done by implementing a DQD which is a Digital Down Converter (DDC) based phase demodulator. The DDC has three main stages as can be seen in Fig. 1.

Fig. 1
figure 1

Digital quadrature demodulator. The DDC shifts, filters and down-samples the SQUID input signal [\(\theta [n] = \cos (2\pi (f_\mathrm{{mod}}/f_s) n + \phi [n])\)] to produce its IQ components. Then, the instantaneous phase is obtained by applying the trigonometric function \(\phi ^{'}[m] = \mathrm{{arctan}}(Q_d[m]/I_d[m])\). Aliasing caused by the demodulation method is added to the instantaneous phase at the output of the demodulator, \(\phi ^{'}[m] = \phi [m] + \epsilon [m]\)

The processed SQUID signal is the input of the DDC, \(\theta [n] = \cos (2\pi (N_{\Phi _0} f_\mathrm{{ramp}}/f_s) n + \phi [n])\), where \(f_s\) denotes the sampling frequency. In stage 1, the input signal is split into two branches where a mixer on each performs a frequency down- and up-conversion to generate the quadrature components. The frequency shift is given by the modulation carrier frequency, \(f_\mathrm{{mod}} = N_{\Phi _0} f_\mathrm{{ramp}}\). In stage 2, one low pass filter in each branch attenuates the up-converted components and at its outputs we obtain the baseband I and Q signals. In stage 3, a down-sampler is placed in order to simplify the subsequent modules, save resources and meet timing requirements on the FPGA. From the \(I_\textrm{d}\) and \(Q_\textrm{d}\) signals at the output of the down-sampler the instantaneous phase of the SQUID signal can be calculated by the trigonometric function \(\phi ^{'}[m] = \mathrm{{arctan}}(Q_\textrm{d}[m]/I_\textrm{d}[m])\). Equation 1 describes the DQD implemented by several research groups working on the \(\mu\)MUX [11, 14,15,16,17],

$$\begin{aligned} \phi ^{'}[m] = \arctan \left( - \frac{\sum \limits _{n=Nm}^{N(m+1)-1} \theta [n] \, \sin (\Omega _\mathrm{{mod}} n)}{\sum \limits _{n=Nm}^{N(m+1)-1} \theta [n] \, \cos (\Omega _\mathrm{{mod}} n)} \right) , \end{aligned}$$
(1)

where \(\Omega _\mathrm{{mod}} = 2\pi f_\mathrm{{mod}} / {f_s}\). In Eq. 1 a Moving Average Filter (MAF) is used as a low-pass filter where its length is the number of samples within a single FR period, N. Once the filter averages the first N input samples, they are discarded and the next N samples are averaged. The effective sampling frequency at the output is therefore equal to the FR frequency. The MAF has the frequency response of a Rectangular window function as shown in Fig. 2.

Fig. 2
figure 2

Blue: The MAF magnitude spectrum with normalized gain. Red: A phase modulated SQUID signal after mixing and prior to the convolution with the MAF. The modulating signal is a sinusoidal wave for a clear visualization of the sideband components (Color figure online)

A phase modulated SQUID signal after the stage 1 of the DDC I-branch is also displayed in Fig. 2 where \(f_\mathrm{{mod}}=3f_\mathrm{{ramp}}\). It can be noted that the up-converted carrier component at \(2f_\mathrm{{mod}}\) falls exactly in a transfer null. This is always true if \(N_{\Phi _0}\) is an integer. However, the sideband components around the carrier that appear in phase modulated signals [18] are much less attenuated. After down-sampling, this remnant signal folds into the first Nyquist zone as aliasing. Consequently, the instantaneous phase of the SQUID signal has an error at the demodulator output produced by the spurious signal, \(\phi ^{'}[m] = \phi [m] + \epsilon [m]\).

3 Error Model

3.1 Maclaurin Series Approximation

Applying trigonometric identities in Eq. 1, we derive

$$\begin{aligned} \phi ^{'}[m] = \arctan \left( \frac{\sum \limits _{n=Nm}^{N(m+1)-1} \Bigl (\sin (\phi [n])-\sin (2\Omega _\mathrm{{mod}} n+\phi [n])\Bigl )}{\sum \limits _{n=Nm}^{N(m+1)-1} \Bigl (\cos (\phi [n])+ \cos (2\Omega _\mathrm{{mod}} n+\phi [n])\Bigl )} \right) . \end{aligned}$$
(2)

The down- and up-converted phase modulated signals from the numerator and denominator consist of a carrier component surrounded by sideband components (see Fig. 2). These components are attenuated and phase-shifted by the MAF. We re-write Eq. 2 as a sum of components given by the modulation so that the effect of the filter clearly appears:

$$\begin{aligned} \phi ^{'}[m] = \arctan \left( \frac{\biggl ( \sum \limits _{k=-\infty }^{\infty } J_k(\beta ) \Bigl (a_k\, \sin (\Omega _\mathrm{{det}} n k+c_k)-b_k\, \sin (2\Omega _\mathrm{{mod}} n+\Omega _\mathrm{{det}} n k+d_k)\Bigl )\biggl ) \bigg \vert _{N\downarrow }}{\biggl ( \sum \limits _{k=-\infty }^{\infty } J_k(\beta ) \Bigl (a_k\, \cos (\Omega _\mathrm{{det}} n k+c_k)+ b_k\, \cos (2\Omega _\mathrm{{mod}} n +\Omega _\mathrm{{det}} n k+d_k)\Bigl )\biggl ) \bigg \vert _{N\downarrow }} \right) , \end{aligned}$$
(3)

where \(a_k\) and \(b_k\) are the MAF attenuations at the down- and up-converted components, respectively. \(c_k\) and \(d_k\) are the phasesFootnote 1 also for the down- and up-converted components, respectively. \(\Omega _\mathrm{{det}}\) is the normalized detector angular frequency determined by its period, \(\beta\) the modulation index and \(J_k(\beta )\) is the Bessel function of the first kind of order k [18]. The sum of components is affected by the down-sampling as it is showed using the vertical bars. After down-sampling, the spectrum folds into the first Nyquist zone as shows Eq. 4,

$$\begin{aligned} \phi ^{'}[m] = \arctan \left( \frac{\sum \limits _{k=-\infty }^{\infty } J_k(\beta ) \Bigl (a_k\, \sin (\Omega _\mathrm{{det}} m k + c_k)- b_k\, \sin (\Omega _\mathrm{{det}} m k+d_k)\Bigl )}{\sum \limits _{k=-\infty }^{\infty } J_k(\beta ) \Bigl (a_k\, \cos (\Omega _\mathrm{{det}} m k+c_k)+ b_k\, \cos (\Omega _\mathrm{{det}} m k+d_k)\Bigl )} \right) . \end{aligned}$$
(4)

As the \(b_k\) values are close to 0, the Multivariate Maclaurin Series is a suitable tool to approximate Eq. 4:

$$\begin{aligned} \begin{aligned} \phi ^{'}(b_{-K},...,b_K) =&\,\phi ^{'}(b_{-K}=0,...,b_K=0) \\&+ \sum _{k=-K}^{K} b_k \frac{\partial \phi ^{'}}{\partial b_k} \bigg \vert _{(b_{-K}=0,...,b_K=0)} \\&+ \sum _{k_1=-K}^{K} \sum _{k_2=-K}^{K} \frac{b_{k_1} b_{k_2} \gamma }{2!} \frac{\partial ^2 \phi ^{'}}{\partial b_{k_1} \partial b_{k_2}} \bigg \vert _{(b_{-K}=0,...,b_K=0)} \\&+...,\\ \end{aligned} \end{aligned}$$
(5)

where \(\gamma\) is equal to 1 if \(k_1=k_2\) and 2 otherwise. For simplicity, only the first 3 orders of the Multivariate Maclaurin Series for \(2K+1\) variables are showed in Eq. 5. The first component of Eq. 5 is the phase shift produced by the detector signal while the spurious signal caused by the demodulator is obtained by adding the remaining terms.

3.2 Simulation

To study the nonlinearity as reported in [14, 15], we simulated a \(f_\mathrm{{det}} = 15258.79\) Hz sawtooth-like detector signal and calculated its residuals. A \(f_\mathrm{{mod}} = 488281.25\) Hz SQUID signal was setted to run the simulation established by a \(N_{\Phi _0} = 2\) and a \(f_\mathrm{{ramp}} = 244140.625\) Hz. The detector signal amplitude was \(\Phi _\mathrm{{in}} = 1\,\Phi _0\) to produce a \(2\pi\) phase deviation. As the detector signal follows a negative-slope sawtooth function whose frequency is a sub-multiple of the SQUID frequency, the modulation is seen in the spectrum as a frequency shift of the SQUID signal by an amount of \(-f_\mathrm{{det}}\). Hence, the sideband components are not generated and the Maclaurin approximation results in

$$\begin{aligned} \begin{aligned} \phi ^{'}[m]&= \phi [m] + c + \sum _{l=1}^{\infty } (-1)^{l} \frac{b^l}{l} \frac{\partial ^l \phi ^{'}[m]}{\partial b^{l}} \bigg \vert _{(b=0)} \\&= \phi [m] + c + \sum _{l=1}^{\infty } (-1)^{l} \frac{b^l}{l} \cdot \sin ((2\Omega _{det} m + c - d) l), \end{aligned} \end{aligned}$$
(6)

where we considered the main lobe attenuations in the MAF (\(a_k\)) equal to 1. The demodulated signal (\(\Phi _\mathrm{{out}}[m] = \phi ^{'}[m]/(2\pi )\)) is showed in the upper part of Fig. 3. In the lower, we plot the residuals after a linear fit of one period of the demodulated signal together with its Maclaurin approximation. As a result, the nonlinearity produced by the DQD is obtained.

Fig. 3
figure 3

Top: The demodulated sawtooth detector signal with a \(2\pi\) phase deviation. Bottom: The residuals after a linear fit of one period of the demodulated signal. The Maclaurin approximation is shown too. The maximum absolute approximation error obtained is less than 6,6 \(\mu \Phi _0\)

4 Proposal

4.1 Flux Ramp Modulation Design

As the carrier frequency is determined by the slope of the FR, an increment in \(N_{\Phi _0}\) or \(f_\mathrm{{ramp}}\) translates the up-converted components toward greater attenuation in the MAF. This can be the simplest and most straightforward method to improve the nonlinearity attenuation since it could require minor hardware or software changes. However, some considerations must be taken into account when modifying the FR parameters:

  • Increasing (\(I_\mathrm{{ramp}}\)) results in higher power dissipation inside the cryostat [19].

  • The increase in the SQUID loop inductance degrades the SQUID flux noise spectral density [20].

  • Higher carrier frequency (\(f_\mathrm{{mod}}\)) requires higher resonator bandwidth [16]. This counteracts the tendency to reduce the resonator bandwidth in order to increase the number of channels in the \(\mu\)MUX.

It is also important to emphasize that this method does not significantly enhance the spurious signal attenuation as is demonstrated in Sect. 4.2.

4.2 Weighted Moving Average Filter

Equation 1 can be reinterpreted as

$$\begin{aligned} \phi ^{'}[m] = \arctan \left( - \frac{\sum \limits _{n=Nm}^{N(m+1)-1} \theta [n] \, \sin (\Omega _\mathrm{{mod}} n) \, w[n]}{\sum \limits _{n=Nm}^{N(m+1)-1} \theta [n] \, \cos (\Omega _\mathrm{{mod}} n) \, w[n]} \right) , \end{aligned}$$
(7)

where the function w[n] is an array of ones depicting the weighted coefficients of the Rectangular window function. There is a vast list of window functions that can be used to enhance the filter attenuation [21]. Each of these window functions has its own weighted coefficients. We simulated the three windows (Rectangular, Hamming and Barlett) showed in Fig. 4 to demonstrate how this modification affects the demodulated signal.

Fig. 4
figure 4

WMAF response for the Rectangular, Hamming and Bartlett window functions. The inset figure presents the attenuation for the nonlinearity obtained in Sect. 3.2 before down-sampling

The advantage of the Weighted Moving Average Filter (WMAF) immediately shows up when comparing the improvement in the spurious attenuation. Figure 5 displays the attenuation for the three window functions at \(f = 2f_\mathrm{{mod}}-f_\mathrm{{det}}\) as \(N_{\Phi _0}\) increases from 2 to 25 for the same detector signal simulated in Sect. 3.2. Here f denotes the frequency of the DQD input signal after being up-converted. The MAF attenuation improves only 20 dB by increasing 12.5 times the initial carrier frequency. In contrast, the improvement in the nonlinearity attenuation reached 21 dB and 36 dB using the Hamming and Bartlett windows for \(N_{\Phi _0} = 2\), respectively, as seen in Fig. 6.

Fig. 5
figure 5

WMAF sidelobe attenuation at \(f = 2f_\mathrm{{mod}}-f_\mathrm{{det}}\) using the Rectangular, Hamming and Bartlett window functions as \(N_{\Phi _0}\) increases from 2 to 25

Fig. 6
figure 6

Residuals resulting from a linear fit of the demodulated detector signal. A WMAF was simulating using the Hamming (top) and Bartlett (bottom) window functions. The Maclaurin approximation is also plotted in both cases. The maximum absolute approximation errors obtained are less than 518 n\(\Phi _0\) and 86 n\(\Phi _0\) for the Hamming and Barlett window function, respectively. Compared to the MAF shown in the Bottom of Fig. 3, the Hamming and Bartlett-based WMAF improve the nonlinearity attenuation by 21 dB and 36 dB, respectively

Another characteristic to consider is the main lobe response, which should be as flat as possible to avoid distorting the detector signal. The Rectangular window has a sharper fall compared to the others, as shown in Fig. 7. At half the sampling frequency imposed by the FRM, the WMAF attenuations are 3.89 dB, 1.74 dB and 1.81 dB for the Rectangular, Hamming and Bartlett window functions, respectively.

Fig. 7
figure 7

WMAF main lobes for the Rectangular, Hamming and Bartlett window functions. The filter responses are displayed up to the maximum input frequency imposed by the FRM to accomplish Nyquist–Shannon sampling theorem

However, a wider main lobe has the disadvantage of increasing the baseline noise of the demodulated signal. This is characterized by the equivalent noise bandwidth (ENBW) parameter and there is a comparative table with the most popular window functions [22]. The ENBW compares the equivalent white noise bandwidth between the window function of interest and an ideal brick-wall filter. The Hamming and Bartlett windows increase the white noise power by 1.345 dB and 1.25 dB with respect to the Rectangular window.

An important observation is that the WMAF response has nulls at different frequency values depending of the window function selected. For example, the filter using the Bartlett window has maximum attenuation only in even multiples of \(N_{\Phi _0}\) (see Fig. 4). This requires certain \(f_\mathrm{{mod}}\) values to be set so that the up-converted carrier falls in a transfer null.

In addition, it is important to remark that adding a window function reduces spectral leakage in the \(\mu\)MUX [23].

5 Measurements

To validate the results of the simulation, we assembled the setup showed in Fig. 8 in our laboratory. It consists of a software-defined radio scheme as proposed in [1], where the \(\mu\)MUX was emulated using the voltage-controlled attenuator HMC346. The synthesized signals have the same settings as described in Sect. 3.2. A 488281.25 Hz phase modulated sinusoidal waveform was synthesized using an arbitrary wave generator to control the HMC346 attenuation. Besides, we synthesized a 15258.79 Hz sawtooth-like waveform with negative envelope as modulating signal that produced a \(2\pi\) phase deviation. The Zynq UltraScale+ MPSoC ZCU102 Evaluation Kit was utilized to generate a tone at baseband. Then, a custom A/D D/A Converter Board and an RF-Mixer Board [24] were used to convert the digital signal to analog and to up-convert the tone at 5 GHz, respectively. The processing chain architecture implemented on the FPGA for the signal acquisition is described in [23, 25].

Fig. 8
figure 8

Setup assembled in our laboratory. It consists of a Zynq UltraScale+ MPSoC ZCU102 platform, a custom A/D D/A Converter Board and an RF-Mixer Board. The \(\mu\)MUX response was emulated with a voltage-controlled attenuator HMC346. The HMC346 attenuation was controlled with a phase modulated signal synthesized by an arbitrary wave generator

We measured the nonlinearity by implementing a WMAF using the Rectangular, Hamming and Bartlett window functions on the FPGA. For each window function, we acquired data frames with 131,072 samples of the demodulated signal. Subsequently, we fitted a linear function for each frame to get the residuals. Figure 9 shows the spectrum of all of them. The main component responsible for the nonlinearity appears at twice the detector frequency as described in Eq. 6. The Hamming and Bartlett windows improved the nonlinearity attenuation by 20.4 dB and 35.92 dB compared to the Rectangular one. These results are in agreement with the simulations showed in Fig. 6.

Fig. 9
figure 9

Spectrum of the residual obtained after a linear fit of the demodulated and unwrapped sawtooth-like detector signal. The measurements were performed for a WMAF utilizing the Rectangular (blue), Hamming (orange) and Bartlett (green) window functions (Color figure online)

The noise power for each data frames was also calculated. We measured a noise power increment of 1.109 dB and 1.107 dB for the Hamming and Bartlett functions compared to the Rectangular window, respectively. The differences between the measured values and the expected ENBW increment of 1.345 dB and 1.25 dB (see Sect. 4.2) are caused by the presence of a 1/f noise component which reduces the relative white noise contribution to the total noise.

6 Conclusions

Several research groups working on the \(\mu\)MUX have implemented the DQD with a MAF to recover the detector signal embedded in the instantaneous phase of the SQUID signal. However, this paper demonstrates that the DQD produces an undesired signal that aliases into the band of interest, overlapping the demodulated detector signal. When the detector signal follows a sawtooth function whose frequency is a sub-multiple of the SQUID frequency, the spurious signal is measured as nonlinearity. In addition, we presented two proposals that improve the spurious attenuation. The first is accomplished by modifying the FR amplitude or frequency, albeit with a subtle enhancement in terms of attenuation. The second proposal is to modify the MAF by using different window functions in order to improve the spurious attenuation. In this work, we implemented a WMAF using the Hamming and Bartlett window functions to compare with the MAF. Our measurements show a 20.4 dB and 35.92 dB attenuation improvement for the Hamming and Bartlett-based WMAF compared with the MAF, respectively. Another advantage of the WMAF is the increased main lobe flatness. At the Nyquist frequency imposed by the FR frequency, the main lobe attenuation are 3.89 dB, 1.74 dB and 1.81 dB for the Rectangular, Hamming and Bartlett windows, respectively. As a trade-off, increasing the main lobe width raises the noise level of the signal. This increase is tabulated for many well-known window functions and is called ENBW. Nevertheless, a difference from ENBW appears when other noise sources contribute more to the overall noise power than the white noise. Our measurements showed an increase in the noise power of 1.109 dB and 1.107 dB for the Hamming and Bartlett windows compared with the Rectangular one. By choosing the appropriate window function based on the \(\mu\)MUX parameters, the spurious signal can be attenuated below the system noise without significantly increasing it and reliably recover the detector signal.