Background force compensation in dynamic atomic force microscopy

Background forces are linear long-range interactions of the cantilever body with its surroundings that must be compensated for in order to reveal tip-surface force, the quantity of interest for determining material properties in atomic force microscopy. We provide a mathematical derivation of a method to compensate for background forces, apply it to experimental data, and discuss how to include background forces in simulation. Our method, based on linear-response theory in the frequency domain, provides a general way of measuring and compensating for any background force and it can be readily applied to different force reconstruction methods in dynamic AFM.


I. INTRODUCTION
Accurate and reproducible measurement of material properties at the nanoscale is the main goal of dynamic atomic force microscopy (AFM). Extraction of material properties from the measurable quantities in dynamic AFM requires a deep understanding of both the tipsurface interaction and the dynamics of the AFM cantilever when it is close to the sample surface. We propose a method that uses Fourier analysis to measure and compensate for background forces, which are long range and not local to the AFM tip. These interactions produce artifacts in the measurement of tip-surface force, leading to overestimation of its attractive and dissipative components.
Background forces are observed when measuring the quality factor of a cantilever resonance which decreases when the tip-sample distance becomes comparable to the cantilever width, dropping as much as 30% at the scanning position (Fig. 1). This phenomenon has been attributed to an additional squeeze-film damping force 1-3 , arising when the fluid surrounding the cantilever is squeezed between the cantilever body and the sample surface. We also observe a slight decrease in the resonance frequency f 0 , due to increased hydrodynamic load.
Other long range forces appearing at tip-sample distances of a few micrometers have been attributed to electrostatic contributions 4 . We have also observed in different commercial AFM systems, a dependence of the cantilever's acoustic excitation on the extension of the scanning z-piezo, resulting in a change of the drive force which can be mistaken as a long range interaction. The coupling between the cantilever and the acoustic actuator could in principle also be affected by the increased hydrodynamic load, causing the effective drive power to change as a function of the tip-sample distance.
Whatever their origin, be it hydrodynamic, electrostatic, or AFM design, these effects influence force reconstruction in dynamic AFM. Previous attempts at compensating for them have used an effective resonance frequency and quality factor for the cantilever 5-7 , but a general and accurate description is still lacking. Here Relative change in quality factor Q and resonance frequency f0 as a function of tip-sample distance over a homogeneous PDMS surface. The values are obtained by fitting the thermal noise power spectral density, and plotted as the shift relative to a tip-sample distance of 1 mm. The fitted Q drops by as much as 30%, whereas the decrease in f0 is three orders of magnitude smaller (plotted values of f0 are multiplied by 100). The cantilever was a MikroMasch HQ:NSC15/AlBS.
we describe how to compensate for these effects by treating them as background forces, assuming that they have the following properties: they are linear as shown by a lack of intermodulation distortion 8 ; they act over a long range, comparable to the cantilever width; and they do not depend on the xy tip position over the sample surface, as they originate from the cantilever body rather than being local to the tip.
We can easily compensate for any such background force to reveal the true tip-surface interaction, using linear response theory in the frequency domain. Due to its generality and ease of implementation, we expect our method to be readily applied to a variety of force reconstruction methods essential for AFM researchers. In (a) and (b) linear forces act on the cantilever and only noise is measured at the undriven frequencies. In (c) the nonlinear tip-surface force gives rise to intermodulation with strong response at undriven frequencies.

II. GENERIC LINEAR MODEL
When an AFM cantilever is far away from the sample surface, its fundamental flexural mode is well-modeled as a linear system. The frequency dependent linear response functionχ(ω) relates the frequency components of any forceF (ω) to the resulting frequency components of the cantilever deflectiond(ω): In our notationd(ω) denotes a complex valued function of the real variable ω, the frequency. In particular,d(ω) is the Fourier transform of d(t). In the following, we will drop the explicit ω dependence for the sake of compact notation. When the frequency components ofd are concentrated around the cantilever resonance frequency,χ can be wellmodeled as a dampened simple harmonic oscillator: The parameters k, ω 0 and Q are the mode stiffness, resonance frequency and quality factor, respectively. These parameters, together with the optical lever responsivity, can be obtained by a non-invasive calibration procedure traceable to the measurement of the thermal fluctuations of the cantilever deflection when it is far from the surface 9,10 . The drive force with multiple frequency componentŝ F D is applied to the cantilever by means of a shaker piezo in the case of acoustic actuation, or a pulsed laser beam in the case of photo-thermal excitation. Regardless of the means of excitation, the drive force is determined by measuring the cantilever motion far away from the surface (larger than 100 µm) at what we call the "free" position ( Fig. 2(a)). Thus, we extract the driving force from a measurement of the cantilever free motiond free and the calibrated linear response functionχ As the AFM probe approaches the sample surface, background forces begin to affect the cantilever body when its separation from the surface becomes comparable to its width, as shown in Fig. 1. Background forces change the cantilever motion (compare insets of Fig. 2(a) and Fig. 2(b)), but they are clearly linear, as seen from the lack of intermodulation 8 in the spectrum of Fig. 2 When the AFM tip starts interacting with the surface at what we call the "engaged" position ( Fig. 2(c)), the measured motion is affected by all the forces at plaŷ whereF TS is the nonlinear tip-surface force, carrying all the information about the material properties, andF BG are the background forces. We can use Eq. (3) to account for the drive force, but in oder to solve for the tip-surface force we must eliminate the background forces. Note that, while the components of the drive forceF D can be treated as constant, the components of the background forcesF BG depend on the motiond which changes from pixel to pixel. For example, a squeeze-film damping force will depend on the velocity of the cantilever.
Motivated by experimental observation (lack of intermodulation distortion), we treat the problem of a general linear background force without regard to its particular origin, by expressing it in terms of a linear response functionχ BGF Equation (5) allows for the calculation ofF BG for any motiond. Our treatment assumes that there exists a linear differential equation of the cantilever deflection which describes the background forces. This equation can in principle be very complicated, e.g. involve fractional derivatives and have many parameters, but we assume that it does not change as the probe scans over the sample, consistent with the idea that the background forces act on the body of the cantilever. Lifting the probe slightly away from the surface, we find that the short rangedF TS goes to zero with an abrupt drop in intermodulation, while the long ranged F BG is barely affected. We define the "lift" position as the closest distance for which the forces acting on the cantilever are linear (see Sect. III).
At the lift position ( Fig. 2(b)), the total force is given by the drive forceF D and the linear background forceŝ F BG only. The lift motion is thereforê Solving forF BG giveŝ Combining Eq. (3), Eq. (5), and Eq. (7), we determinê χ BG from the measuredd free andd lift Going back to the engaged position, we can now compensate for the background forces in Eq. (4) usingχ BG from Eq. (8). Thus we obtain the tip-surface force: Equation (9) allows for the compensation of the background forces, and thus the calculation of the tip-surface force at every pixel of an AFM image, provided the knowledge ofF D and ofχ BG , both being constant during the AFM scan.

III. DEFINING THE LIFT POSITION
To accurately determine the linear response function of the background forcesχ BG , we need to measure the cantilever motiond lift as close to the surface as possible without tip-surface interaction. We use the notion that the tip-surface force is strongly nonlinear, while the background forces are linear, as evidenced by the measurements of Fig. 2 and Fig. 3.
We apply a multifrequency drive with a number of discrete components N D at the set of frequencies When the linear forcesF D andF BG act on the cantilever, the responsed(ω) will be non-zero only at ω ∈ {ω Dk } (see Fig. 2(a,b)). On the other hand, when the cantilever is experiencing the nonlinearF TS , response will arise at intermodulation product frequencies ω IMP given by integer linear combinations of the drive frequencies: where n k is an integer (see Fig. 2(c)). We introduce the intermodulation distortion IMD , as the ratio of the power at undriven frequencies to the power at driven frequencies: In principle, we want to measured lift at the minimum distance from the surface such that IMD = 0. In practice, however, we will always measure some non-zero noise power. We therefore choose a threshold (typically 3 dB) and measured lift at the minimum distance from the surface such that IMD lift < IMD free + threshold . Figure 3 shows the intermodulation distortion as a function of amplitude setpoint measured for drive schemes with different number of drive tones N D . As the AFM feedback setpoint increases, a characteristic behavior is visible showing a gradual decrease of IMD with increasing setpoint, due to the decrease of the non-linear tip-surface interactionF TS . When the setpoint reaches a value of about 90%, a sharp drop in IMD is observed, indicating a transition from an overall nonlinear force to an overall linear force. This sharp transition allows for unambiguous measurement ofd lift , from which we calculate the linear response function of the background forceŝ χ BG .

IV. EXTRAPOLATION TO UNDRIVEN FREQUENCIES
As discussed in Sect. III,d lift andd free will be nonzero only at the drive frequencies. Calculating the linear response function of the background forces from Eq. (8) will therefore yieldχ BG (ω) only at the drive frequencies ω ∈ {ω Dk }. On the other hand, to apply the compensation to the measured data with Eq. (9) we require the knowledge ofχ BG (ω) at all the frequencies in the spectrum of engaged motiond eng .
To overcome this issue we use the notion of narrow band measurement on a resonant system. Due to the high Q resonance in the cantilever linear response function, the motion will be concentrated at frequencies close to the resonance frequency ω 0 , within a narrow band Ω where N IMP is the number of measured frequencies (typically 32) and ω 0 /Q is typically chosen as the measurement bandwidth. We perform a polynomial expansion of the complex functionχ BG (ω) in this narrow band: where i is the imaginary constant and {a k } and {b k } are sets of real coefficients to be determined. A drive force with N D frequency components allows for the determination of up to 2N D coefficients, corresponding to two polynomial fits of degree M = N D − 1 of the real and imaginary parts ofχ BG . It is possible to perform a low degree fit with a high number of drives, M < N D − 1, in which case the coefficients are obtained with a least square optimization method. While a higher order fit could in principle describe a more complexχ BG , we find that a linear approximation of each of the two quadratures (4 coefficients, requiring 2 or more drive frequencies) is sufficient to describe the background forces. A higher order fit is not always numerically stable, and it can introduce artifacts in the compensated data.
Equation (13) is quite general, allowing for a good approximation to any type of linear background force. A special case of Eq. (13) is a polynomial with only two coefficients of the form where k is the mode stiffness and a and b are fit parameters. In this case it can be shown that the background forces result in an effective cantilever with a renormalized linear response functionχ ′ of the form of Eq. (2), where the resonance frequency and quality factor are given by This special case is often assumed when analyzing forces in dynamic AFM 5-7 .

V. EXPERIMENTAL RESULTS
We have shown how to mathematically treat the problem of compensating for arbitrary linear background forces, and we proposed a simple method to obtain their response function. We now show an application of this method on soft material surfaces where background forces are typically rather large. Figure 4 shows dynamic force quadratures 11 on two areas of a polystyrene low-density polyethylene polymer blend (Bruker). F I is the force in phase with the cantilever motion integrated over one oscillation cycle, representing the conservative forces experienced by the cantilever at different oscillation amplitudes. F Q is the force quadrature to the cantilever motion integrated over one oscillation cycle, showing the dissipative interaction of the cantilever with its environment and with the surface. The force quadratures represent a direct transformation of the measured data without any model assumptions, providing a physically intuitive way of analyzing the measured cantilever dynamics in terms of conservative and dissipative interactions.
At low amplitudes the uncompensated force quadratures (dashed lines in Fig. 4(b,c)) show a positive slope in F I , the signature of a long range attractive force. The negative slope in F Q is a signature of a linear damping, in addition to the damping contained inχ which is calibrated far away from the surface. Some hysteresis is also present in both sets of curves, indicating that the background forces are not purely of the type described by the special case of Eq. (14). Notably, the low amplitude background forces are the same for the two sets of curves, despite being measured over different areas of the sample with very different material properties, confirming that the background forces are not local to the AFM tip.
We used a drive scheme with N D = 2, measuredd lift over a polystyrene area of the sample (black circle in Fig. 4(a)), then calculatedχ BG with M = 1 in Eq. (13) and applied its compensation to the measured data. The solid lines in Fig. 4(b,c) show the force quadratures compensated for background forces. The slope at low amplitudes is now missing, as well as most of the hysteretic effects (see inset of Fig. 4(b)). We note that the compensation calculated over a polystyrene area of the sample has this effect not only for the force quadratures on the polystyrene, but also for those on polyethylene. Taken together, these observations confirm the validity of the  assumption that while the background forces change for every pixel of the image, their linear response function does not change during the whole scan. Figure 5 shows the same measurement and compensation procedure on a silicone hydrogel sample in a high humidity environment. The sample presents alternating solid and liquid-like domains (Fig. 5(a)) with very different mechanical response as shown by the peculiar shapes of the force quadratures ( Fig. 5(b,c)). Also in this sample it is clear how the background force compensation corrects for the long-range attractive forces and increased dissipation, while at the same time preserving the interesting features of the tip-surface force and the peculiar hysteresis. These will be discussed further in a forthcoming publication.
For the dynamic force quadratures shown, the generic compensation according to Eq. (13) was used. Figure 6 shows a comparison of these curves with the ones obtained from the special, simplified case of Eq. (14). While the simplified case can capture the general slope in the conservative and in the dissipative long range interactions, it fails to describe the hysteresis in the low amplitude part of the curves. Thus, the background forces cannot be described by simply redefining the parameters of the cantilever resonance, indicating that a more thorough modeling of the interactions is required.
We have shown the effect of applying the background force compensation on the dynamic force quadratures F I and F Q . The compensation procedure is however general and can be applied to any force reconstruction method. Once the frequency components of the compensated tipsurface forceF TS are obtained from Eq. (9),F TS can be fed to any force reconstruction algorithm without further modifications. As an example, in Fig. 7 we calculate the tip-surface force on the polystyrene and on the solid do- main of the hydrogel sample with amplitude-dependent force spectroscopy 12 (ADFS), with and without compensation for the background forces. Not compensating for background forces would lead to overestimating the adhesion force by 47% for polystyrene, and by 240% for the solid domain of the hydrogel. The observed peak-force would be instead underestimated by about 10% in both cases (not shown in Fig. 7).

VI. SIMULATION OF BACKGROUND FORCES
Due to the nonlinear nature of the tip-surface interaction in dynamic AFM, the dynamics is typically simulated by numerically integrating the differential equation for the cantilever deflection d(t) F D (t) is a known function of time, whereas F TS and F BG are unknown. A variety of models for F TS are available 13 to simulate different types of both conservative and dissipative tip-surface interaction as function of the cantilever motion d(t) and its velocityḋ(t), and even on the effective position of a moving surface model 14 . On the other hand, no general model for simulating background forces is available, due to the different types of interaction that can give rise to this effect.
In the frequency domain, the background forces can be treated as an effective cantilever linear response function Transformingχ ′ into a differential equation is in general very difficult, however in the special case of Eq. (14) it is possible to simply replace ω 0 and Q in Eq. (17) with ω ′ 0 and Q ′ as defined by Eq. (15) and Eq. (16): Alternatively, it is possible to more generally treat the effect of the background forces on the nonlinear response by introducing an effective drive forceF ′ D : Once the free, lift, and engaged motions are measured experimentally, Eq. (22) is used to determine the effective drive forceF ′ D (ω) which is readily transformed to the time domain F ′ D (t) via the inverse Fourier transform. The new differential equation can now be integrated numerically. A comparison of the simulated motion d sim using Eq. (20) or Eq. (23), with the measured motion d eng , allows for numerical optimization to find the best-fit parameters of a nonlinear tip-surface force model.

VII. CONCLUSIONS
We derived a mathematical procedure to account for long-range background forces in dynamic AFM, under the assumption of linear interaction and in the limit of a narrow band measurement. Using intermodulation distortion to detect the onset of tip-surface forces, we accurately measure the background forces at the driven frequencies and extrapolate their linear response function to undriven frequencies. Applying our procedure to experimental data we demonstrated compensation for background forces on dynamic force quadratures and ADFS force curves, measured on two different soft materials. Given the generality of the compensation procedure and its ease of application to any type of dynamic force reconstruction, our method will be very useful for the determination of material properties with quantitative dynamic AFM.

ACKNOWLEDGMENTS
The authors acknowledge financial support from the Swedish Research Council (VR), the Knut and Alice Wallenberg Foundation, and the Olle Engkvist Byggmästare Foundation. Gunilla Hägg (Star-Lens AB,Åmål, Sweden) is acknowledged for providing the silicone hydrogel sample.

Appendix: Experimental and implementation details
All measurements reported were performed in ambient atmosphere at room temperature with commercially available instrumentation.
The measurements on the polystyrene low-density polyethylene blend sample (Fig. 3, Fig. 4 and Fig. 7) were performed on a Bruker Dimension Icon Atomic Force Microscope. The cantilever used was a MikroMasch HQ:NSC15/AlBS. The fundamental flexural eigenmode of the cantilever and the detector were calibrated with the non-invasive thermal noise method 9,10 , which yielded resonance frequency f 0 = 231.6 kHz, quality factor Q = 392.3, mode stiffness k = 14.25 Nm −1 and inverse optical lever responsivity invOLR = 88.63 nmV −1 . The drive of the acoustic actuation was chosen to have a free oscillation amplitude of 50 nm (100 nm peak-to-peak) for all the number of drives N D . The scan in Fig. 4 was performed with a drive composed of two frequencies separated by 500 Hz and centered around the cantilever resonance. The AFM feedback kept the amplitude at the lower drive frequency constant, at 80% of its free value by adjusting the z-piezo extension. The scan size was 1.5 µm, the resolution 256x256 pixels and the pixel time 2 ms, giving a total scan time of less than 5 min.
The measurements on the silicone hydrogel ( Fig. 5 and Fig. 7) were performed on a JPK NanoWizard3 AFM. The cantilever was a Bruker Tap525. The thermal noise calibration yielded resonance frequency f 0 = 470.3 kHz, quality factor Q = 626.0, mode stiffness k = 86.39 Nm −1 and inverse optical lever responsivity invOLR = 37.84 nmV −1 . The amplitude feedback setpoint was 86% of the free value. The total free amplitude was 105 nm (210 nm peak-to-peak). The scan size was 1 µm, the resolution 128x128 pixels and the pixel time 2 ms, giving a total scan time of about 1 min.
For all the measurements reported, a multifrequency lock-in amplifier and dedicated control software (Intermodulation Products AB) were used as an add-on to the AFM hardware and software.
The automatic procedure for measuring the lift oscillation (see Sect. III) works as follows. The scan size of the AFM is set to zero. The scanning z-piezo is fully retracted (by setting a very high amplitude setpoint) and the free intermodulation distortion IMD free is measured. The original setpoint is restored to allow the tip to engage the surface again. The setpoint is repeatedly increased in steps of 0.1% (causing the z-piezo to gradually re-tract) and the IMD is measured for each of the setpoint values. To allow the AFM feedback to stabilize and to lower the noise, at each step 100 pixels are acquired (typically requiring 200 ms) and only the last 10 pixels are averaged and included in the calculation of IMD . The procedure continues until the measured IMD decreases to within 3 dB (a factor of 2) of IMD free . The first measurement that satisfies IMD < IMD free + 3 dB defines the lift oscillation d lift which is then stored. The original scan size and feedback setpoint are finally restored and the AFM scan is resumed. The whole procedure requires less than one minute and is fully automated.
When the free and lift response is known, the background forces linear response functionχ BG can then be calculated from Eq. (8) at the driven frequencies (2 in the case of Fig. 4 and Fig. 5, N D in Fig. 3). To getχ BG at all the measured frequencies (32 in the case of Fig. 4, 42 in Fig. 5), a least square optimization routine (MINPACK) is used to fit Eq. (13) to the measuredχ BG .