Dependence of the residual surface resistance of superconducting RF cavities on the cooling dynamics around $T_\mathrm{c}$

We report a strong effect of the cooling dynamics through $T_\mathrm{c}$ on the amount of trapped external magnetic flux in superconducting niobium cavities. The effect is similar for fine grain and single crystal niobium and all surface treatments including electropolishing with and without 120$^\circ$C baking and nitrogen doping. Direct magnetic field measurements on the cavity walls show that the effect stems from changes in the flux trapping efficiency: slow cooling leads to almost complete flux trapping and higher residual resistance while fast cooling leads to the much more efficient flux expulsion and lower residual resistance.


I. INTRODUCTION
Trapped magnetic flux represents one of the known contributors to the residual resistance R res of superconducting radio frequency (SRF) niobium cavities [1]. Experiments showed that R res due to trapped flux also increases with the magnitude of the RF field on the cavity surface [2], and can therefore have a significantly negative impact on the intrinsic cavity quality factor Q 0 at medium accelerating fields.
For this reason, minimization of trapped flux in niobium cavities has recently been a topic of particular interest, especially in light of its potential impact on cryogenic costs of high duty factor accelerators, i.e. LCLS-II, ERLs, and an XFEL upgrade. Studies at HZB showed that the details of the cooling procedure affect the amount of trapped flux and thus its associated additional residual surface resistance [3,4]. Based on the possible interpretation of the results, two main mechanisms of improvement of cavity performance (due to reduction of the amount of trapped magnetic flux) have been suggested: 1) slow cooling through transition temperature [3,4]; 2) reduction of thermocurrents, which are enabled by bimetal titanium-niobium junctions in dressed cavities, by minimizing temperature gradients [4]. Following HZB results, Cornell has also recommended a slow cool-down procedure based on the interpretation of their horizontal test results [5]. However, the physical mechanism of the effect has not been clearly established.
To illuminate the mechanism, it is very important to understand if the effect is specific to dressed cavities, or if it is a generic effect present also in bare niobium cavities. Furthermore, the effect of different surface treatments has to be understood as well. To do so, it is crucial to perform direct magnetic field measurements on the cavity in the cryostat to correspond with the RF measurements, which is the key component of our work.
In this paper we present a set of systematic vertical test stand measurements on bare single and nine cell 1.3 GHz TESLA elliptical shape SRF cavities made of fine grain (∼ 50µm) and single crystal RRR∼300 niobium, which reveal a strong effect of cooling protocol through T c on the residual resistance: a slow cooling leads to higher residual resistance than the fast cooling. Meissner effect measurements directly on cavity walls show that the increase in the residual resistance is due to the smaller flux expulsion (larger flux trapping) at slow cooling rates, which provides an alternative explanation for the findings in Ref. 4.

II. EXPERIMENTAL PROCEDURE
We have performed all our measurements at the vertical test stand at Fermilab. Temperature during the experiments was continuously monitored at several locations in the cryostat by four Cernox thermometers attached to the outside cavity walls. RF measurements were performed using the standard phase-lock technique in the temperature range between 2 K and 1.5 K. Surface resistance R s measured at the lowest temperature T ∼1.5 K was very close to the residual resistance R res as was reconfirmed by the explicit deconvolution following our original procedure [6]. Thus in what follows we use terms R res and R s (T ≤ 1.5 K) interchangeably.
In order to prevent the possible occurrence of thermal currents we used additional measures to improve the electrical insulation of cavities from the supporting fixtures, e.g. kapton tape between the cavity and stainless steel holding fixtures or G10 holding fixtures instead of metal. Thus our work is not designed to address the effect of thermal currents but rather any intrinsic effects of the cooling dynamics itself.
Typical fast and slow cooling procedures we used are shown in Fig. 1. In the case of the fast cooling various temperature differences up to 200 K can be present across the cavity (maximum depends on the starting temperature), and cooling rates through T c are of the order of 30-40 mK/sec. Slow cooling is very uniform with temperature differences on the order of 0.1 K and cooling rate through T c of 2-5 mK/sec.
For magnetic field measurements we used Bartington  cryogenic Mag-01H single-axis fluxgate magnetometers attached to the outside cavity walls. Similar approach was originally implemented in Ref. 2 but using Hall probes. Fluxgate magnetometers were mounted in the vertical orientation to measure the magnetic field component parallel to the vertical symmetry axis of the cryostat unless specified otherwise in the text. An example of the magnetic probe placement on a 1-cell cavity is shown in Fig. 2(a). Depending on the flux trapping efficiency, the transition to the Meissner state should lead to the expulsion of the magnetic flux from cavity walls and thus to an increase in the magnetic field amplitude measured right outside. If some of the flux remains trapped, the expulsion is smaller and the field outside changes less. COMSOL simulations assuming remnant field of B = 5 mG in the axial direction are shown in Fig. 2(b)-(c) and demonstrate that for the case of no trapping the magnetic field at the equator should be enhanced by about a factor of 2 when cavity is fully superconducting. Magnetic field measurements were taken upon both cool-down and warm-up through T c , providing full information regarding the magnetic field environment and the efficiency of flux expulsion.

III. RESULTS
We have investigated cavities prepared by different state-of-the-art processing methods as described below.
A. Electropolishing without 120 • C baking In this experiment we used fine and single crystal 1-cell cavities after bulk electropolishing with about 120 µm of material removed. Cavities were mounted on the same test stand and magnetic probes were mounted on the equator of each cavity. Initial fast cooling from 300 K was followed by two cycles of warm-up to 11 K and slow cooling back to 4.2 K, warm-up to 20 K and a fast cooling to 4.2 K, and finally a warm-up and slow cooling from 11 K down to 4.2 K. Each of the cool-downs was followed by a full RF test.
Residual resistance R res of the single crystal cavity as a function of E acc measured at T < 1.5 K is shown in Fig. 3(a). The value of R res was clearly and reproducibly dependent upon if the fast or slow cool-down had been performed. In particular, fast cool-downs from 300 K and 20 K (black squares and blue triangles) lead to similar R res about 2 nΩ lower than that after all slow cool-downs from 11 K (red circles, green triangles, and magenta diamonds). The value of the strongly temperature dependent BCS surface resistance remained approximately the same for all the RF tests.
The magnetic probe readings around T c are shown in Fig. 3(b). The magnitude of the ambient field at transition was similar for fast and slow cool-downs confirming no impact of thermal currents. In all cases it was possible to observe a jump at T c = 9.25 K, which signals the transition into Meissner state and represents the flux expulsion from the cavity walls [see Fig. 2]. The primary difference found was that fast cooling lead to a significant increase in the magnetic field right outside of the cavity walls while slow cooling lead to a much smaller change. This indicates that slow cool-down procedure seems to prevent flux from being expelled, leading to almost complete flux trapping, while a fast cool-down through T c helps pushing efficiently the flux out of the superconductor. Higher amount of trapped flux correlated strongly with the observed higher residual resistance values for slow cooling.
Exactly similar RF behavior was observed for the fine grain cavity with R res (E acc ) curves shown in Fig. 4. The magnetic field probe readings were also fully similar to those shown in Fig. 3(b).

B. Nitrogen doping
We used 9-cell and 1-cell cavities prepared by the nitrogen doping procedure [7] with the previously measured 'anti Q slope' performance after regular fast cooling.
No magnetic sensors were mounted in the 9-cell cavity  experiment and only RF measurements were performed. We sequentially investigated fast and slow cooling procedures with the drastically different cooling rates and thermal gradients across the cavity described above with the results of the Q 0 (E acc ) measurements at T = 2 K shown in Fig. 5(a). A strong decrease in Q 0 was found in the case of the slow cooling procedure versus the fast. As in the case of EP, Q 0 (T ) measurements at different E acc revealed that the change in Q 0 arose from the increase in residual re-sistance as shown in Fig. 5(b), while the BCS component remained unchanged. The low field residual resistance increased by about 8 nΩ, and a stronger field dependence appeared, which lead to a total increase of > ∼ 10 nΩ in residual resistance at medium fields.
In detail, the sequence of the tests was the following. The first RF test was performed after a typical fast cooldown from 300 K to 4.2 K. Second test followed a warm up to 20 K and slow cooldown through transition temperature similar to that in Fig. 1(c). This resulted in a large residual resistance as shown in Fig. 5(b) and a mediocre Q 0 vs. E acc performance as illustrated in Fig. 5(a). The cavity was then warmed up to 300 K and cooled down fast, similar to the cycle shown in Fig. 1(b). As a result the performance recovered, reaching a residual resistance of ∼4 nΩ and a Q 0 ∼ 3 × 10 10 at medium fields at 2 K. The cavity was then warmed up to 100 K and held at 100 K for 8 hours to rule out the potential presence of hydrogen and Q-disease. From 100 K the cavity was then cooled down rapidly through T c . This resulted again in the good performance similar to the one after previous fast cool-down from 300 K. Cavity was then again warmed up to 20 K and the slow cool-down procedure was repeated, yielding again identical poor performance as in the previous slow cool-down. Next we studied the performance of a 1-cell nitrogen doped cavity with the 2 K results of Q 0 (E acc ) shown in Fig. 6(a). Similar to the 9-cell cavity, slow cooling lead to a significantly lower Q 0 , again due to an increase in the residual resistance as was confirmed by lower temperature measurements.
Magnetic field probes mounted on the cavity equator showed that ambient field at T c was unaffected by the speed of the cool-down, but the drastic difference in the trapping efficiency between the slow and fast cooling was again observed -see Fig. 6(b) where the warm-up data is shown for clarity. Also in this case the higher amount of trapped flux correlated well with the increase in R res after slow cooling.
Notice that the increase in R res for the 9-cell cavity is significantly higher than that for the 1-cell cavity. However, it may be simply a manifestation of the higher average magnetic fields sampled by the 9-cell in dewar with multiple potentially magnetic components. Indeed, later investigations showed that some of the holding fixtures possessed higher magnetic moments and could have lead to the observed difference.
The magnitude of the R res increase was nevertheless higher for nitrogen doped cavities as compared with the EP case. We will further discuss this point below.

C. Electropolishing followed by 120 • C baking
In these experiments we investigated 9-cell and 1-cell cavities prepared by the standard ILC recipe, which consists of EP 120 µm + 800 • C baking for 3 hours + EP 20 µm + 120 • C baking for 48 hours.
The RF performance of the 9-cell was consistent with the previous findings, as shown in Fig. 7(a): fast cooldown lead at 2 K and medium fields to Q 0 ∼ 1.5 × 10 10 , and slow to a lower Q 0 ∼ 1.2 × 10 10 , again due to the residual resistance change. The same behavior was observed for the 1-cell cavity, for which the R res (E acc ) is shown in Fig. 8(a) after fast cooling from 20 K, and after a slow cooling from 11 K. The additional residual resistance of about 1-2 nΩ emerged after a slow cooling.
Magnetic probes were mounted on the equator of the second cell from the top for the 9-cell test. The magnetic field (∼3.5 mG) recorded by the probes [see Fig. 7(b)] right before transition was the same for both slow and fast cooling, while the suppression of the flux expulsion by slow cooling was again the only apparent difference correlating with the change in Q 0 of the cavity. Similar behavior was registered also by the magnetic probe placed on the equator of the 1-cell during the corresponding test as shown in Fig. 8(b), which was again correlating with the observed change in R res of the cavity. These data reconfirm that the mechanism behind the increase in residual resistance with slow cooling is lack of flux expulsion in contrast to strong and efficient flux expulsion obtained with fast cooling.
Compared to the nitrogen doped and electropolished cavities the effect on the residual resistance is smallest in the 120 • C bake case, which will be further discussed below.

D. Effect of starting temperature on fast cooldown
While cavity results above shown the same efficient flux expulsion upon fast cooling from 300, 100 and 20 K, it is important to understand if there exists a minimal starting temperature T > T c , which is required to maintain this efficiency.
To address this, we used another 9-cell nitrogen doped cavity and varied starting temperature of the cavity (and hence maximum temperature gradients) followed by multiple fast coolings through T c recording the magnetic fields only (no RF test). In this experiment the ambient magnetic field at the probe location was also slightly higher (∼12 mG). We found that the efficiency of flux expulsion was similar for starting temperatures of 300, 50, 35, 15, and 11 K -see Fig. 9 for examples of the magnetic field data taken during the warm-up. Temperature recording was interrupted during warm-ups after 15 K and 11 K cooling cycles but magnetic field recordings still showed the same jump at transition. This experiment suggests that cooling rate through T c is what matters the most for an efficient expulsion rather than a starting temperature.

IV. DISCUSSION
In our experiments flux magnetometers placed directly on cavity walls clearly showed that while the ambient field on the cavity surface was unaffected, the resulting residual resistance was strongly dependent upon the speed of the cool-down. Change in the field outside of the cavity allowed us to conclude that slow (≤2-5 mK/sec) cooling through T c leads to a much stronger external flux trapping in SRF niobium cavities than fast ( > ∼ 30 mK/sec) cooling, which allows for much more efficient flux expulsion. This effect appears to be universal and independent on the surface treatment and grain size.
However, the same amount of trapped flux translated differently into RF losses for different surface treatments. This difference can be qualitatively understood based on the simplified model of the vortex dissipation P diss under applied RF field, in which P diss is proportional to the normal core surface area A ∝ ξ 2 and the normal state resistivity ρ n . Since both the coherence length ξ and ρ n depend on the electron mean free path ℓ so does the P diss . It has been measured that ℓ ∼ 2 nm at the surface of a 120 • C baked cavity, ℓ ∼ 40 nm for nitrogen doped  cavities [8,9], and ℓ ≤ 100 nm for unbaked EP cavities, hence the possible difference.
Cooling down a cavity is a complicated process and it is quite possible that the cooling rate is not an explicit parameter that determines amount of the trapped flux, but rather the parameter that determines a type of the cooling process which, in turn, changes the amount of flux trapped in the cavity. Changing the cooling rate would also change few other parameters, most importantly evolution of the temperature distribution around the cavity.
Nevertheless, based on our results the cooling through T c has to be fast for in order to avoid the increase of the residual resistance due to trapped flux. Recent heat load measurements [10] in a cryomodule populated with 120 • C baked large grain 1.3 GHz dressed cavities seem to agree with these findings: the original fast cooldown lead to a high Q 0 (low heat load), then a slow cooldown through transition lead to significantly larger heat loads, and finally the low heat load (high Q 0 ) was recovered after warming up above and fast cooling back down through T c .
It should be emphasized that our findings do not contradict and may actually provide an alternative explana- tion/interpretation for the measurements on dressed cavities presented in Ref. 4. Indeed, in the HZB study the original cooling, which lead to the largest residual resistance, was by far the longest (18 hours) corresponding to the slowest rate of transition through T c . Thus, the magnetic flux expulsion should have been the least efficient, hence the increase in residual resistance. Corroborating this alternative interpretation of the experimental data is the fact that multiple vertical tests of dressed cavities performed at DESY [11] showed no difference in the quality factors between bare and dressed cavities.
Other important experiments at Cornell University [5,12] showed that the residual resistance of the dressed cavity in the horizontal cryostat can be decreased by warming above T c and slowly cooling back down, however the comparison is made with respect to the original cool-down, which is slow as well. Nevertheless, lack of increase in the surface resistance after fastest possible cooling from 100 K clearly suggests that the role of thermal gradients in those experiments is secondary (if any) and the same trapping efficiency dependence may be the main underlying mechanism of the observed changes. Measurements of the magnetic field at T c and instantaneous (rather than average) cooling rate may provide further insight into the mechanisms at work.
To further clarify these physical mechanisms, we plan studies similar to ours but on dressed cavities. If thermocurrents will not be ruled out and actually do also play a role in dressed cavities, then the optimal cool-down procedure would be to cool down fast though transition but from a lower temperature, e.g. 20 K.
If thermocurrents will be excluded, then attention should be paid exclusively to the rate of cooling through T c from any starting temperature.
At the moment, we offer two speculative interpretations for the observed trapping efficiency difference between fast and slow cool-downs.
The first one is the following. During a fast cooldown, liquid helium is being poured to the bottom of the warm dewar. Rising boiled-off helium gas sets a well defined temperature stratification around the cavity. In this situation the superconducting phase emerges at the bottom of the cavity and proceeds to sweep the cavity from the bottom to the top as shown in Fig. 10(a). It looks plausible that the propagating phase boundary efficiently sweeps out the magnetic flux. During a slow cool-down the dewar and the cavity is cooled down by a cold gas produced by mixing in warm helium to the liquid helium inside the supply line. The temperature of this mixture is carefully controlled by varying the amount of the added warm gas. In a rough approximation the cavity can be considered to be isothermal and in thermal equilibrium with the cooling gas. In this scenario the superconducting phase would nucleate at multiple locations throughout the cavity. During the further cooling those interfaces can encircle some areas of normal phase as schematically shown in Fig. 10(b). The magnetic flux contained in those 'islands', to get expelled, would need to pass through superconducting areas which is energetically unfavorable. This impediment would increase the amount of flux that gets trapped inside the superconductor. The same qualitative behavior in single crystal and fine grain cavities despite the difference in bulk pinning seems to be in favor of this model as well.
The second speculative possibility is that thermal gradients present during fast cooldown may exert a depinning force on the vortices, which counteracts trapping and helps pushing the flux out of the superconductor. In Fig. 11 a temperature difference between the lower iris and equator of a fine grain 1-cell EP cavity is shown as a function of the equator temperature, which shows that temperature differences of the order of 1-2 K are present during the fast cooling. This translates into local temperature gradients of < ∼ 0.4 K/cm, which may be high enough for fluxoid depinning around T c leading to the more efficient flux expulsion in the case of fast cooling. During a very slow cool-down temperature gradients are unavoidably very small, no thermal depinning force is aiding the expulsion, and the efficiency of flux expulsion may decrease.
We plan on addressing these models in further detail and explore other possibilities in future studies.

V. CONCLUSION
We have discovered a strong systematic effect of the cool-down rate through T c on the ambient flux trapping efficiency of SRF niobium cavities. While the trapping effect itself is universal among surface treatments, the magnitude of the resulting changes in the residual resistance appears to be dependent on the surface treatment.
The reported findings are of primary importance for all the proposed high duty cycle accelerators based on SRF technology since preserving the low residual resistance al- lows to minimize their required operational power. The recommended operational cooling procedure in a cryomodule that currently emerges from these studies to minimize flux trapping is therefore to pass the 9.25 K transition temperature with a cooling rate > ∼ 30 mK/sec. Furthermore, since the effect is based on the trapping of the ambient magnetic field, increased magnetic shielding is an easy additional way to avoid the degradation in cases where only slow cooling can be performed.