The challenge with FM-AFM mode (or NC-AFM for Non-Contact Atomic Force Microscopy) is that tip-sample interaction can be either attractive (negative frequency shift, -df) or repulsive (positive frequency shift, +df) which leads to different parameter settings for the Z feedback loop with, respectively, either a positive or negative slope. For atomically smooth surfaces this is usually not a major issue as the tip excursion around set-point will be small, but any sudden change in the interaction (highly corrugated surfaces, dust particles, etc.) might induce the tip to fall into the potential well and therefore change the slope for the feedback. This behavior will provoke a tip-crash. or at least generate feedback instability by 'jumping' from one attractive regime to a repulsive one. This is best illustrated in Figure 1 below where, depending on the choice of set-point, one can be sensitive to various parts of the interaction. The steeper and more linear the slope is around set-point, the more stable the PID loop will be.
Figure 1: Force-Distance curve (or df-Z) to identify possible set-point for Z-feedback
In this blog I would like to describe 3 methods of preventing Z-feedback instability, or at least to better secure the tip, avoiding crashes from 'set-point 1' to 'set-point 2'. Each method has its pros and cons and therefore might depend on the set-up and sample under investigation.
Absolute Frequency Shift for Z-Feedback
This method does not require any change in the control electronics or PLL, it only being necessary to use the absolute value of the frequency shift as input for the Z-feedback. The minimum frequency shift will become a maximum thus preventing the tip falling into the well. This can be understood from Figure 1, when set-point 1 and set-point 2 both have a positive slope. There are commercially available SPM Controllers, such as Nanonis from SPECS ,that offer this feature for the Z-Controller (this is not a PLL feature) as standard. This method however does not prevent the 'jump' from the attractive (2) to repulsive (1) regime occuring, but at least maintains the feedback in a stable condition and secures the tip.
Bimodal NC-AFM with Dual Mechanical Excitation
The basis for Z-feedback stability is large amplitude oscillations because the frequency shift noise scales as 1/A. Of course, PLL demodulation bandwidth also plays an important role (as sqrt(BW)) but cannot be reduced to a very small value because one needs to maintain a reasonable pixel dwell time, especially for a reasonable fast scan image. On the other hand, the larger the amplitude, the less sensitive is the resonator to small range forces (required for good topographical images, especially for atomic resolution). The trade-off consists therefore in using 2 PLL for both long range (large amplitude, more stable feedback) and short range forces (smaller amplitude, better sensitivity). This cannot be achieved with the same resonance frequency and therefore it is necessary to track the first (fundamental) and second eigenmode of the cantilever. In terms of excitation, both resonances will be mechanically actuated, therefore it is often referred to as Bimodal excitation, described here in Figure 2. This work was first introduced by Kawai et al  for the NC-AFM mode from the original work of Rodriguez and Garcia for Bimodal Phase imaging .
Figure 2: Bimodal force excitation (click to enlarge)
The advantage of this method is that the Z-feedback remains as simple as usual, the complex cantilever oscillations being handled directly from the Dual PLL with distinct frequency domains.
Minimal Frequency Shift Set-Point or 'dip-df' Method
This new method, first described in the paper from Rode et al , operates in a new regime where the set-point remains at the minimum of the frequency shift (or, let's say, at the inflection point when the interaction changes slope). For a linear PID loop, it is not possible to feed in such a df set-point directly but rather we use its derivative, or df/dz, which crosses zero at the minimum of the interaction. Figure 1 above illustrates how a small Z modulation is cancelled precisely at the minimum frequency shift which therefore become the set-point for this new type of AFM feedback.
Figure 3: Lock-in technique on PLL output to derive df/dz
In such cases, the set-point for the Z-feedback will not be the frequency shift output from the PLL but the subsequent demodulated df with respect to the z-modulation on the scanner tube. The set-point will be 'zero' amplitude or, in practice, the X-Component of the second lock-in output (because it can change sign). Figure 3 shows the connection diagram with 2 imbricated feedback loops on frequency shift and Z. This method can either make use of both HF2PLL inputs (one for the PLL, one for second lock-in) for tandem demodulation, or alternatively direct sideband detection with the HF2LI-MOD option. The method is somewhat similar to FM-KPFM but, instead of recovering the AC-component of the frequency shift due to a bias modulation, it is now due to a Z-modulation.
Of the 3 methods described here the first one is the easiest to implement, albeit not the most stable, the second one is the most robust because one can play with both amplitude parameters and the third one is certainly the most elegant and probably the most sensitive, especially for probing attractive forces in, for example, a liquid environment or with a strong electrostatic contribution.
 Kawai et al, PRL, 103, 220801 (2009)  Rodriguez et al, APL, 84, 449 (2004)  Rode et al, RSI, 85, 043707 (2014)