## Resolution, Scanning Speed and Demodulation Bandwidth

Introduction

In this post, I will demonstrate you the interplay between resolution, scanning speed and demodulation bandwidth. In case you ever used a scanning probe microscope (SPM) or a laser scanning microscope, you know that the image you acquired at the end of the day is your sample convoluted by the response of your scanning system. In standard AFM imaging, this is the shape of your scanning tip, in laser scanning microscopy, this is the shape of your focus, also known as the point spread function. However, during the actual scanning process, you are dealing with a continuous time measurement signal and need to ensure sensitive signal detection. I will therefore describe the scanning process in the time and frequency domain. With help of some calculations, I will show you how filters acting on the scanning signal influence the imaging resolution and how you can use these results in practice.

Scanning: Filtering in time-domain

In the spatial domain, the resolution along one line can often be described by a Gaussian function

$R(x) = \exp(\frac{-x^2}{2\sigma_x^2})$

with the relation

$\sigma_x = \frac{\text{FWHM}_x}{2\cdot \sqrt{2\log(2)}}$

to the full width half maximum (FWHM), which approximates the smallest resolvable feature. In the scanning process, R(x) moves across the sample X(x) at a constant velocity vs. Consequently, a continuous-time measurement signal y(t) is generated. The scan controller samples this signal at distinct points, which correspond to equidistant points in the spatial domain: image pixels. For now, I want to focus on the properties of the continuous-time measurement signal y(t). With the substitution (x = vs t) into R(x), it is straightforward to see that R(t) is again a Gaussian with

$\sigma_t = \frac{\sigma_x}{\text{v}_s}$

In analogy to spatial filtering of the sample by R(x), R(t) is the impulse response of a Gaussian filter, which filters X(x = vs t). Assuming that the sample contains more features than those resolvable by R(x), the bandwidth of the measurement signal y(t) is limited by the Gaussian filter R(t). To calculate this bandwidth, I use the unitary Fourier transform for the frequency domain equivalent R(ω), similar as in (1)

$S(\omega) = \sigma_t \exp(\frac{-\omega^2\sigma_t^2}{2})$

which has the 3dB frequency

$\omega_{3\text{dB}} = \frac{1}{\sigma_t} \sqrt{\log(2)} = 2\sqrt{2}\log(2) \frac{\text{v}_s}{\text{FWHM}_x} \Longrightarrow f_{3\text{dB}} \approx 0.312 \frac{\text{v}_s}{\text{FWHM}_x}$

In consistence with basic intuition, the bandwidth is proportional to the scanning speed and inversely proportional to the smallest resolvable feature. I plotted R(x), R(t) and R(ω) in the Figure below (from left to right). The abscissa for R(x) and R(t) is in units of the corresponding FWHM, whereas for R(ω), units of the 3dB frequency are chosen.

Note that I start in spatial domain, then transform to time substituting (x = vs t) and finally apply the Fourier transform. For completeness, keep in mind that imaging resolution and contrast can also be described by the modulation transfer function, which is the spatial Fourier transform of R(x). In case you are used to think in terms of modulation transfer functions, you can simply transform the frequency domain to the reciprocal space by substituting (ω = vs k), where k is 2π/x: It is therefore only a rescaling of the frequency axis.

Role of the Lock-in Amplifier

In many applications, R(ω) is modulated by a carrier ωc, whose frequency is well above the bandwidth of R(ω). In AFM/SPM, ωc is the probe oscillation in spatial domain; in laser scanning microscopy, ωc is the modulation frequency of the laser-beam in time domain. Accordingly, the measurement signal needs to be demodulated at ωc and filtered prior to pixel mapping by the scan controller. To keep things simple and general, I skip application details on AFM, where the demodulated signal is part of a feedback loop. A schematic on this is given in the figure below. On the left hand side, the moving tip/focus with modulation at ωc is depicted. This analog signal is demodulated by the HF2LI and routed to the scan controller by the auxiliary analog outputs. Because the HF2LI is a digital lock-in, an analog to digital (A/D) conversion on the input and a digital to analog (D/A) conversion on the auxiliary output is performed. This internal sampling is at a much higher rate than the pixel sampling in the scan controller. To avoid resolution degradation due to demodulation, the demodulation filter should thus leave R(ω) as it is. On the contrary, an efficient rejection of out of band noise requires a demodulation filter bandwidth as narrow as possible. To handle this tradeoff, I will show you some simulations for different filter settings and scanning speeds.

Fast Scanning

If you want to scan as fast as possible, the maximum demodulation bandwidth limits the scan speed. In practice, such situations arise in laser scanning microscopy at fast frame rates. The question I highlight is therefore: What is the fastest possible scan speed with the HF2LI?

First of all, the maximum demodulation bandwidth needs to be known. For the demodulator, the maximum bandwidth is 200 kHz for a first order filter with a time constant of 780 ns. I will refer to this demodulation filter as D. In addition, there is a second order 200 kHz analog filter on the auxiliary output. For this filter, I use A as reference.  These two filters together (D·A) have a bandwidth of 147 kHz. To find out how these filters affect the spatial resolution, I filter R(ω) with D and A and examine the resulting signal (R·D·A) in the spatial domain. By sweeping the scanning speed, I then get the effective FWHM, which I term as the effective resolution, in dependence of the scanning speed. The procedure is depicted in the figure below. In case you want the plots with a better resolution, just get the svg [drain file 4 url here].

On the left hand side, the frequency domain signals and filters are illustrated. The D·A filter with 147 kHz bandwidth is depicted in magenta by the dashed line. The scanning signal R(ω) in red has here a bandwidth of 156 kHz and is therefore slightly above the demodulation bandwidth. The resulting R·D·A is shown in blue.

In the middle, you see R(x) and R·D·A(x). For R(x), I used a FWHM of 0.5 μm, which is a typical value for laser scanning setups. Because there is no analytical solution for a filtered Gaussian function, I needed to calculate R·D·A(x) with help of the inverse Fourier transform. Since the filters narrow the signal in frequency, the spatial equivalent is broader and results in a higher FWHM. For the illustrated curves, the effective FWHM is 1.43 times the physical FWHM of R(x). I did not include contrast degradation and phase shift due to the low pass filter. In the subsequent section on slow scanning, I include the delay due to the filter in my calculations.

On the right hand side, I plotted the effective resolution against the scanning speed in units of the physical FWHM. The abscissa is swept from 0 to 5E5. The maximum value on the abscissa therefore corresponds to R(ω) with a bandwidth of 156 kHz, which is shown on the illustrations on the left and in the middle. At the fastest speed, where the demodulation bandwidth is equal to the bandwidth of R(ω), the spatial resolution can be degraded by 30% (1 – 1/1.43).

To have an idea how the results for fast scanning are related in practice, I give a numerical example:
Suppose I do not want to increase my FWHM by more than 5%. With a physical FWHM of 0.5 μm, I therefore end up with an effective FWHM of 0.525 μm. From the plot on the right hand side of the figure above, I get a scanning speed vs of 82.9 mm/s. With this scanning speed, I can now calculate how many frames per second are possible for some predefined frame sizes. Without loss of generality, I use a pixel spacing of 0.25 μm, which is half the FWHM. The resulting frame rates are shown in the table below. I also show the results for an FWHM increase of 10% , 20%, 30% and 40% for even faster frame rates. These rates are also valid for other FWHM values, as long as you sample the FWHM with two pixels. I did not include any delays for beam repositioning within frames, which corresponds to scanning the sample up-down and down-up. For the 5%, 10% and 20% rates, the values are also found in the application note on nonlinear optical microscopy at high speed (not yet published). The highest scanning speed with an FWHM increase of 40% corresponds to equal bandwidths for R(ω) and the 147 kHz demodulation filter.
 Frame Pixels 5% Rate 10% Rate 20% Rate 30% Rate 40% Rate 512 x 512 1.2 fps 1.7 fps 2.3 fps 2.9 fps 3.5 fps 256 x 256 4.9 fps 6.7 fps 9.4 fps 11.7 fps 13.8 fps 175 x 175 10 fps 14 fps 20 fps 25 fps 29.6 fps

Slow Scanning

At slower scan speeds, you have a lot of choices for the demodulation filter. You can choose between different filter orders as well as between different 3dB cutoff frequencies. To show you the related effects, I again made some simulations. Here, I used 1st, 2nd and 4th order filters – D1, D2 and D4 respectively – at different filter bandwidths. I expressed the filter bandwidth in units of the 3dB frequency of R(ω). The analog filter A on the auxiliary output is not considered, because it has a much higher bandwidth. Results are shown in the figure below. In case you want the plots with a better resolution, just get the svg [drain file 5 url here].

On the left hand side, the frequency domain signals and filters are illustrated. The demodulation filters D1, D2 and D4 all have their bandwidth equal to the bandwidth of R(ω). Due to the filter steepness, higher order filters attenuate the signal stronger above their 3dB frequency compared t0 lower order filters, which can be readily seen in the figure below. Below their 3dB frequency, lower order filters attenuate the signal stronger compared to higher order filters, which is difficult to see in the illustrated figure.

In the middle, the curves are shown in the spatial domain. The demodulation filter bandwidth is also in this case identical to the bandwidth of R(ω). In the slow scanning case discussed here, I accounted for the phase shift of the demodulation filter. The phase shift in the frequency domain corresponds to a time delay of the filtered measurement signal. By mapping this delay to the spatial domain, the filtered curves are shifted in space. Accordingly, the spatial shift is the distance that the tip/focus travels until the demodulated signal is at the auxiliary output of the lock-in amplifier. The numerical values for the shift are 0.33, 0.52 and 0.79 times the FWHM for a 1st, 2nd and 4th order filter, respectively. In a regular imaging process, this shift/delay can be corrected by the pixel sampling in the scan controller. The situation is different in feedback systems, where an instantaneous feedback signal is essential for stability. In AFM systems, the conditions are even stricter, because you usually want the feedback system to react before crashing your tip against some sharp feature.

On the right hand side, the spatial shift and the effective resolution, both in units of the FWHM, are plotted against the demodulation filter bandwidth in units of the 3dB frequency of R(ω). On this figure, you see that the higher the demodulation filter bandwidth, the lower the spatial shift and effective FWHM, as less high frequency components in R(ω) are attenuated/delayed by the demodulation filter. When looking at these results, keep in mind that a higher demodulation filter bandwidth also degrades the SNR. If you increase the bandwidth by a factor of 4, the noise power doubles. In addition to that, a higher order filters suppress out of band noise better due to their higher steepness.

If the filters and R(ω) have equal 3dB frequencies, you can actually make some approximations to calculate the effective FWHM yourself. You get an analytical solution, if the demodulation filter would also be a Gaussian function. On the left hand side of the figure below, you see that a Gaussian decays much faster than a low pass filter. Approximating the demodulation filter as Gaussian therefore yields an upper limit to the spatial FWHM for the filter orders studied here. The analytical bound is easy to calculate, since the multiplication of two Gaussians with equal bandwidth results in a Gaussian with a √2 times lower bandwidth. The effective spatial FWHM is therefore higher by a factor of √2 ~ 1.414. The numerical values found here are all smaller: 1.24, 1.29 and 1.33 for the 1st, 2nd and 4th order filter, respectively.

For the spatial phase shift, you can also easily calculate an analytical upper bound. Consider a first order filter with its bandwidth equal to the bandwidth of R(ω). At the signals 3dB frequency, the filter introduces a phase shift of 45°, which corresponds to a time delay of one eighth of the 3dB frequency’s oscillation period. Transforming this delay back to the spatial domain results in a shift of 1/8·FWHM/0.312 ~ 0.4. The numerically calculated value for the first order filter is 0.33.

Usage in Practice

In practice, you might not know how your R(x) looks like. In this case, the ziControl software of the HF2LI has a very useful tool: ZoomFFT. This tool shows you the frequency spectrum of the demodulated signal. By scanning your sample and observing ZoomFFT with peak hold averaging and demodulation filter compensation, you can at first determine the 3dB bandwidth of R(ω) and find out at which level your noise floor is. If you are scanning a sample with a multitude of sharp features, you can even determine R(ω) with help of ZoomFFT and then calculate R(x) from this, because the scanning speed is a known quantity. This is a different approach than the widely used resolution determination at one single step.

With the bandwidth of R(ω) at hand, it is up to you to choose a demodulation filter. In case of very weak signals, you need to make a tradeoff in imaging resolution and SNR.

In special cases where you are not capable of spatial oversampling, the demodulation filter can also be used for higher aliasing suppression in the resulting image. The transformation of a low pass filter to an image filter is very easy, because the frequency domain is transformed into the reciprocal domain by substituting (ω = vs k).

References

1. Weisstein, Eric W. “Fourier Transform–Gaussian.” From MathWorld–A Wolfram Web Resource. http://mathworld.wolfram.com/FourierTransformGaussian.html