# Practical DetailsΒΆ

**Fourier Transform and Units**. We will analyze our signal using the discrete Fourier Transform (DFT). We will display the Fourier transformed data, however, as if it had been obtained by a continuous Fourier Transform (FT). The outputs of the FT integral and the DFT sum are proportional but not equal. We can see this immediately by units analysis: for data \(a_n\) (and \(a(t)\)) having units of meters, the discrete Fourier transform \(A_k\) has units of \(\text{m}\) while the continuous Fourier transform \(\hat{a}(f)\) has units of \(\text{m} \: \text{Hz}^{-1}\).

The FT data is obtained from the DFT data as follows. Consider the continuous Fourier transform

We can convert this integral to a sum using the following correspondences. With \(\Delta t\) the time per point and \(N\) the total number of points,

and

Substituting, we find

We conclude that the continuous Fourier transform is obtained from the discrete Fourier transform using

where in writing the units we have assumed that \(a\) has units of \(\text{m}\). If \(a\) has units of \(\text{nm}\), then \(\hat{a}(f_k)\) will have units of \(\text{nm} \: \text{Hz}^{-1}\).

**Power Spectrum and Units**. To connect the continuous-frequency power spectrum to the discrete-frequency power spectrum let us, for simplicity’s sake, consider the *two-sided* power spectrum. In the continuous FT, the two-sided power spectrum is defined as

where, as before, \({\hat{a}}_{T}\) is the Fourier transform of a segment of \(a(t)\) data recorded for a total time \(T\). Substituting \(P_{a}(f) \rightarrow P_{a}(f_k)\), \(T \rightarrow N \: \Delta t\), and \({\hat{a}}_{T} \rightarrow \Delta t \: A_k\) we have that

Let us confirm that this is the right definition of the power spectrum by showing that the area under this power spectrum is indeed equal to the mean-square value of \(a(t)\). In the continuous FT case, we have Parseval’s theorem:

The discrete FT version of this equality is obtained as follows:

where we have substituted \(a_n = a_n^{*}\); this substitution is valid since \(a(t)\) is real. Expanding \(a_n\) and \(a_n^{*}\) in terms of their Fourier series, we obtain an expression for the mean-square value in terms of a sum over the Fourier coefficients:

Converting the integral in equation (3) into a sum, we obtain an equivalent expression for the mean-square value

That equations (4) and (5) are equal gives us confidence that (2) is indeed the correct expression for obtaining the continuous-FT power spectrum from the DFT array elements.

**Hilbert Transform**. In Microcantilever Frequency Noise, we defined a function \(H\) that implemented the Hilbert transform in Fourier space:

The function was given as

In the following code, we compute the Hilbert transform by a different route. Consider the function

The measured data is the real part of \({\delta z}\) while the Hilbert transform of the data is contained in the imaginary part of \({\delta z}\). How can we obtain \(\delta z\) from \(\delta x\)? The required function can be inferred by considering

The function we want is thus

So defined,

For lack of a better term, we’ll call \(\text{Hc}\) the complex Hilbert transform.

**Analysis of Thermomechanical Position Fluctuations**. We will fit the power spectrum of cantilever position fluctuations to the function

using non-linear least-squares fitting. To avoid numerical-precision problems in the curve fitting algorithm, it is important for the fit’s \(y\) axis (\(P_{\delta z}^{\text{therm}}\)), \(x\) axis (\(f\)), and parameters (\(\Gamma\), \(\tau_0\), and \(f_0\)) to be within a few orders of magnitude of 1. There are two ways to achieve this condition: (1) apply a scale factor to the \(x\) and \(y\) axis data so the scaled data ranges from 0 to 1, or (2) carefully choose units for all the quantities of interest. We will take the second approach.

Working with frequency in units of kilohertz will make the fit’s \(x\) axis data be order unity: \(f \sim [\text{kHz}]\). To make the \(y\) axis data of order unity, we will work with the cantilever position \(x(t)\) in units of nanometers, so that \(P_{\delta z}^{\text{therm}} \sim [\text{nm}^2 \: \text{Hz}^{-1}]\).

Now for the fit parameters. The second term in equation (6) is unitless as long as \(\tau_0\), \(f_0\), and \(f\) have complimentary units. We will therefore work with the resonance frequency in units of kilohertz and the ringdown time in units of milliseconds: \(f_0 \sim [\text{kHz}]\) and \(\tau_0 \sim [\text{ms}]\). Most microcantilevers have a dissipation constant within a few orders of magnitude of \(1 \times 10^{-12} \: \text{N} \: \text{s} \: \text{m}^{-1}\). We will therefore choose this as the unit of dissipation constant, \(\Gamma \sim [\text{pN} \: \text{s} \: \text{m}^{-1}]\):

For purposes of curve fitting, let us define unitless, barred versions of the variables of interest:

We will represent the temperature in units of kelvin as \(\overline{T} = T / \text{K}\). The prefactor in equation (6) is in mixed units and needs to be simplified:

We will thus fit to

with the temperature \(\overline{T}\) given. To this equation we will add two terms to account for detector noise. The first term is a constant, the frequency-indepenendent part of the power spectrum of detector noise. The second term accounts for the frequency-dependent part of the noise floor; the constant in this term corresponds to the first coefficient in a Taylor expansion of the detector noise power spectrum about \(f = f_0\). Putting both thermomechanical and detector noise terms together, we will fit the observed power spectrum of cantilever position fluctuations to

with \({\overline{P}}_{\! \delta z}^{\, \text{det}}\) the detector noise power spectrum in units of \(\text{nm}^2 \: \text{Hz}^{-1}\) and \(\overline{p}_1\) the Taylor-series coefficient in units of \(\text{nm}^2 \: \text{Hz}^{-2}\). The factor of 1000 in the above equation results from a \(\text{kHz}\) to \(\text{Hz]\) units conversion.

The power spectrum of force fluctuations, which determines cantilever force sensitivity, is easily expressed in terms of the unitless parameters. In practical units,