Fast Specimen Boundary Tracking and Local Imaging with Scanning Probe Microscopy

An efficient and adaptive boundary tracking method is developed to confine area of interest for high-efficiency local scanning. By using a boundary point determination criterion, the scanning tip is steered with a sinusoidal waveform while estimating azimuth angle and radius ratio of each boundary point to accurately track the boundary of targets. A local scan region and path are subsequently planned based on the prior knowledge of boundary tracking to reduce the scan time. Boundary tracking and local scanning methods have great potential not only for fast dimension measurement but also for sample surface topography and physical characterization, with only scanning region of interest. The performance of the proposed methods was verified by using the alternate current mode scanning ion-conductance microscopy, tapping, and PeakForce modulation atomic force microscopy. Experimental results of single/multitarget boundary tracking and local scanning of target structures with complex boundaries demonstrate the flexibility and validity of the proposed method.


Introduction
Scanning probe microscopes (SPMs) [1] are commonly used in the field of nanoscience and technology for high-resolution imaging and quantitative measurements of nanoscale properties. Atomic force microscopy (AFM) [2] and scanning ion-conductance microscopy (SICM) [3] are well-established SPM techniques. In SPM, a probe with a very sharp tip is utilized to detect the sample surface. Generally, the probe or sample is moved to follow a predefined raster scan trajectory in xy-plane with the tip-sample distance controlled on the -axis for imaging the specimen surface, which is a time-consuming process. Therefore, significant research efforts have been invested to minimize the scanning time by either improving SPM hardware or scanning algorithms, for example, specially designed optical beam deflection setup [4,5], innovative mechanical body design [6,7], high resonance frequency [8][9][10][11] or wide-area [12] nanopositioners, advanced modern control techniques, such as feedforward/feedback controller [13][14][15], active damping algorithm [16], and dynamic proportional-integral-differential controller [17], for the piezo actuators to eliminate the mechanical resonant vibrations in high-speed imaging. On the other hand, several interesting methods are developed for high-speed scanning with smooth scanning trajectories without modification in hardware such as sinusoidal waveform [18,19], spiral scanning [20,21], cycloid-like scanning [22], and Lissajous scanning paths [23,24].
However, one significant similarity in the above-mentioned approaches is the larger subregion outside the region of interest during scanning, which severely limits the scanning performance. In contrast, a series of local scanning methods [25][26][27][28] for imaging the desired target regions have been developed. Andersson et al. [26,27] proposed a highlevel feedback control approach for rapidly imaging the sample with string-like boundaries. This method is designed for tracking the edge of the object to reduce the overall imaging time by reducing the total sampling area. Zhang et al. [28] presented a novel scanning method for specimens of fairly simple structure, where its contours are smooth. Sample topography is constructed from the surface edge at different height without crossing the specimen during scanning process to minimal interaction with the specimen.
In this work, we focus on local scanning of the target by reducing the overall scanning area to minimize the imaging time. A boundary tracking algorithm is used to locate the 2 Scanning target of interest without entering its interior according to the view of optical microscopy. A local scan area is determined by combining the moving least squares method with a mathematical analytical method. At last, the corresponding scan path is planned to get the topography of the target. The applicability and versatility of the method are confirmed with the experimental results by using SICM and AFM. In order to extend the application of the proposed method in the field of biological sciences [29], a bacterial cell was scanned to obtain the physical properties of the surface. This method has several promising potential applications, for example, automatically tracking and scanning the scattered targets with the optical guiding and path planning, tracking the shape of cellular motility or growth, and investigating the selfassembly processes of structures.

Boundary Tracking and Local Scanning
The boundary tracking and local scanning are accomplished in three steps. Firstly, criteria for the boundary point tracking are defined and the boundary of the target structure is determined by using the criteria defined in the first step. In case of sharp corners or edges, a sinusoidal wave cannot track the boundary of the target structure. Therefore, an additional step of lost-step processing and adaptive step size adjustment is used to correct the trajectory of the probe for tracking the sample boundary correctly. Secondly, the edge of the target is locally fitted with the moving least squares method (MLS) according to the obtained boundary points. An analytical method is adopted to obtain the discrete points on the equidistant curve with downsampling subsequently. Finally, the local scanning algorithm is initiated for imaging the target topography.

Boundary Tracking.
Firstly, boundary point determination criterion (BPDC) for searching boundary points based on the height difference of adjacent sampling points is defined. The BPDC is a function that determines whether the current point is a boundary point or not. A schematic diagram of the BPDC function is shown in Figure 1(a), where h 0 represents the height difference between adjacent sampling points due to the sample inclination and h 1 indicates the height difference between adjacent sampling points due to the contaminants in the vicinity of the target. The height h 2 is regarded as the real boundary point when BPDC is satisfied. A proportional-integral-differential (PID) feedback controller is used to adjust the probe to follow the height variations of the sample contour (SC). By recording theposition of the probe, the boundary point can be recognized with the difference of the current ( , ) and previous ( , −1 ) z-position and a set threshold (Δ thre ). So, a decision function ( , ) of boundary point can be given as where i is the searched ith boundary point, j is the jth discrete sample point in a sinusoidal waveform cycle, s , is the -position of the jth discrete sampling point in the ith sinusoidal waveform, and Ps , is the z-position of the probe which represents the surface topography. For the target features that are lower than the substrate (e.g., microhole), consecutive boundary point is determined by ( , −1 − , ). The tip is steered with a sinusoidal waveform with the current boundary point (r ) as the starting point. Once the next boundary point (r +1 ) is detected, it is used as the starting point of the next sinusoidal cycle. This iteration is repeated to detect all the boundary points. As shown in Figure 1(b), a coordinate transformation of the three coordinate systems is introduced to determine the trajectory of probe (PT). Assume that the global coordinate system (GCS) ( , ) is fixed on the scanner. The coordinates of the known boundary point (KPB) r −2 , r −1 , and r in GCS are A( 0 , 0 ), B( 1 , 1 ), and C( 2 , 2 ), respectively. A relative coordinate system (RCS) ( , ) is consistent with GCS and its origin is located at r . The origin of the local coordinate system (LCS) ( , ) is also located at r , and its -axis direction is consistent with the motion of r . The position of each discrete sample point in LCS can be given as where Δ is the distance between arbitrary adjacent discrete samples on the -axis and Aml is the tracking amplitude of the sinusoidal waveform which is divided into n parts along the -axis. A vector → is defined as The azimuth angle can be calculated by → ⋅ → = | → || → | cos ( → is the unit vector along the -axis of GCS).
Particularly, after correctly searching for the first boundary point (as shown in the blue dashed box in Figure 2), 0 should be chosen carefully to prevent the lost-step phenomenon as described in Section 2.2. Since the trajectory of the probe is set to the left side of the target structure as the starting position (clockwise), the corresponding 0 is usually selected as 90 ∘ (or 45 ∘ ), and 0 = − 0 . For the second boundary point, 1 is determined by the first and second boundary points via 1 = arccos( → ⋅ → /(| → || → |)).
The coordinates (x, y) in RCS can be expressed as   Scanning where is an angle from the -axis to the x-axis (counterclockwise): Thus, the coordinates ( , ) of the next boundary point (NBP) can be predicted according to the KBP:

Lost-Step Processing and Adaptive
Step Size Adjustment. Lost-step (Figure 1(c)) occurs when the predicted next boundary point cannot be found in a sinusoidal cycle at the sharp position; it indicates that the probe has been away from the desired boundary, so we need to correct the movement direction of probe to correctly track the target boundary.
Here, the prediction is recalculated by adding 90 ∘ to the previous [ = −1 + 90 ∘ ] and an expanded amplitude (two times of the original amplitude) is used to broaden the search range.
To obtain more abundant contour information and reduce the possibility of the lost-step phenomenon, an approximation radius (̃) at r is calculated in real time. It is clear that lower value of̃represents sharp region, while larger̃shows smoother regions. Therefore, we can adjust the step size adaptively by detecting the variations of̃. It can be determined by the circumscribed circle of the triangle of three adjacent boundary points (Figure 1(d)): where = ( + + )/2 is the semiperimeter of the triangle defined by the three boundary points r −3 , r −2 , and r −1 , where a, b, and c represent the side length of triangle, respectively. The radius ratio can be calculated by ratio =̃( )/̃( −1), and the step size of the next sinusoidal cycle can be predicted as

Local Scanning Based on Boundary
Tracking. Unavoidable contaminants near the target edge can cause incorrect boundary points detection or the fitted boundary curve cannot accurately represent the true target boundary, which can have impact correct estimation of the local scan area. To avoid this, the obtained boundary curve is extended before planning the scanning route. However, the problem of equidistant curve has always been a difficult problem in Mathematics because a very small number of special functions of the equidistant curve can be obtained by mathematical methods.
Here, we introduce a more appropriate method by combining an analytical method with an improved moving least squares method (MLS) [30] to get the equidistant curve as shown in Figure 1 where is the offset distance between M( , ) and point (x, y), which is defined by user. = 1 for the equidistant curves upward at the original curve; otherwise, = −1.
A local approximation of the improved MLS method is applied to the original curve for better results by increasing the sampling density of the original data. The local approximation function̂( ) is expressed aŝ where p( ) = [ 1 ( ), 2 ( ), . . . , ( )] T is a polynomial basis function and m represents the total terms of the basis function. a( )= [ 1 ( ), 2 ( ), . . . , ( )] T is the coefficients vector. Thus, a weighted discrete L 2 norm of (10) can be calculated as where ( ≤ ) is the number of discrete boundary points in the support domain (SD). is the total number of these discrete points and ( − ) is the weight function, which is defined with a cubic spline function: ( ) could be defined as where , = 1, 2, . . . , ; and where represents points between adjacent discrete points x and +1 ; = 1, 2, . . . , . Equation (11) is solved by using least squares principle: According to (10) and (16),̂( ) can be derived: Thus, its derivativê( ) can be expressed aŝ According to (9) and (18), we can get the approximate fitting function of (x , y ), and the discrete point on equidistance curve can be obtained by downsampling. Figure 1(f) shows a simulation result of the local scanning algorithm. Slow and fast scan directions (SSD and FSD) of the probe are along x-axis and -axis, respectively. min on the equidistant curves is set as the starting position of scan. max and min in the fast direction are first calculated and the scanning is initiated in the fast scan direction until max position is reached. Then scan direction is reversed and the sample is scanned up to min position. Now the probe moves a unit step length in the slow direction to scan rest area of the target. This process is repeated for each line scan and the imaging is stopped when the tip position on the slow direction reaches max .
To sum up, a flowchart showing boundary tracking and scanning method is illustrated in Figure 2.

Experimental Setup.
In the preceding sections, we assume that the sample is fixed, while probe is moving. In the experiments, sample is moved, while the probe is fixed. In which is further mounted on an micropositioning stage for locating the desired position under an optical microscope (20x). An oscillation controller (Dual-OC4, Nanonis GmbH, Switzerland) is used to control the probe dynamics. A data acquisition card (PCI-6363, National Instruments, USA) is utilized for sampling feedback control signal from the lockin amplifier. A multithread planning and control system has been developed for the feedback control of the -axis and controlling the scanner motion on the -plane for sample boundary tracking and imaging.
A home-built AFM is used with necessary hardware and software modification [31] to construct SICM as shown in Figure 3. A fine tapered borosilicate nanopipette (BF100-58-10, Sutter, USA) with inner tip diameter about 100 nm, filled with 0.1 M KCl aqueous solution, was fabricated through a CO 2 -laser-based micropipette puller (P-2000, Sutter Instrument, Novato, CA). A bias (100 mV) is applied between the Ag/AgCl electrodes inside the pipette and bath. A sinusoidal signal from the oscillation controller is used to drive piezo which sets the nanopipette into vibration. The resulting AC ion current is amplified by a commercial current amplifier (DLPCA-200, FEMTO Messtechnik GmbH, Germany) and fed into the lock-in amplifier. The amplitude of the AC current is applied to the feedback controller to regulate the tip-sample separation against the setpoint.

Boundary Tracking of Microholes.
The probe tracks the outer edge of the microhole without entering into the trench to facilitate the diameter measurement. However, in conventional AFM scan, the tip may be damaged in case of deep microhole with vertical sidewalls. The tracking processes of microhole array can be summarized as follows: The distance (Δ ℎ ) between the centers of two adjacent microholes can be estimated under the optical microscope.
(ii) The tracking procedure is started after the first microhole (the number 1 microhole in Figure 4(b)) is brought near the probe tip with the view field of the optical microscope. The tracking trajectory for the first boundary point of each hole is shown as dashed pink line in Figure 4(b).
(iii) The nanostage is moved along the preset route (moving distance = ℎ +Δ ℎ ; the blue dashed line in Figure 4(b)) to track the next microhole after completing the first microhole. Then a more accurate distance (Δ ℎ ) between the centers of two adjacent holes can be calibrated. (iv) Follow the microhole array along the predesigned path automatically (as shown in Figure 4(b)).  Figure 3: Schematic diagram of integrated SPM system. A sinusoidal signal from an oscillation controller is fed into a piezo driver to drive the piezo for probe oscillation. The modulation distance between the probe and sample surface results in a feedback signal, which is detected by a lock-in amplifier to regulate the tip-sample distance. Although (Δ ℎ ) can be calibrated in advance, it may not detect any boundary of the next microhole due to the unavoidable inclination of the sample mounting when the forward or retractive position (A in or B out in Figure 4(b), almost same position) is far away from the center of the microhole. Therefore, the position difference (e.g., e ℎ in Figure 4(b)) between B out and the center of the current microhole needs to be compensated to track edges of the microhole array effectively.

Local Scanning of Tapping Mode AFM.
To demonstrate the local scanning performance of the proposed algorithm, a structure of multilayer graphene on silicon substrate was tracked and locally scanned. Figure 5(a) shows the boundary tracking result that was completed in 6.87 s (tracking velocity: 2.55 m/s; step length: 10 nm), where blue star and pink squares represent the boundary point (BP) on the sample contour and discrete points on the equidistant curve, respectively. Black, red, and green curve are the nanostage trajectory (NT), fitting sample contour, and equidistant curve (EC), respectively. The sharp corners (indicated by the arrows) appear in numerical results, which are caused by the large variation in the local slope. Figure 5(b) shows AFM topography obtained by local scanning with the same scanning frequency as conventional raster scanning which was completed in 2.54 min. Inset shows AFM image obtained by the traditional raster scanning (scanning frequency: 0.75 Hz, resolution: 220 × 340 pixels, and step length: 20 nm) which was completed in 4.89 min. As a result, the scan time is saved by 47.97%. It is evident that the edge of the tracked profile (red curve) extracted from Figure 5(a) has a good coincidence with the result image of the raster scan. Both images are matching very well in the small features (dashed box and circle in Figure 5(b)).

Local Scanning with PeakForce Modulation AFM. E. coli
TOP10 bacterial cell (freshly dried within 1 hour) was locally scanned by the proposed method to obtain its topography and mechanical properties with PeakForce modulation AFM. Figure 6(a) shows the boundary tracking result that was completed in 5.57 s (tracking velocity: 1.68 m/s; step length: 8 nm). Figure 6(b) shows AFM image obtained by the traditional raster scanning (scanning frequency: 0.75 Hz, resolution: 360 × 350 pixels, and step length: 7 nm) which was completed in 8 min. Figure 6(c) shows the AFM topography obtained by local scanning with the same scanning speed as conventional raster scanning which was completed in 2.44 min. As a consequence, the scan time is saved by 69.49%.

Local Scanning with SICM.
A self-made PDMS sample (Sylgard 184, A/B = 10 : 1, diameter: 6 m, height: 300 nm) was used to verify the feasibility of the proposed local scanning algorithm with AC-SICM. Figure 7(a) shows the boundary tracking result that was completed in 10.85 s (tracking velocity: 2.4 m/s; step length: 10 nm). The sharp corners (indicated by arrows) appear in Figure 7(a), which are caused by the large variation in the local slope. Figure 7(b) shows AFM topography obtained by local scanning with the same scanning frequency as conventional raster scanning which was completed in 2.69 min (saving about 29.19% of the scan time). Both images are matching very well in the small features (dashed circle in Figure 7(b) and inset image). Inset shows that SICM image is obtained by the traditional raster scanning (scanning frequency: 1 Hz, resolution: 228 × 240 pixels, and step length: 30 nm) which was completed in 3.8 min. The red curve shows that the boundary curve extracted from the boundary tracking data has a good coincidence with 2D SICM image.

Conclusions
A boundary tracking and local scanning method is developed for fast scanning of the region of interest. The prior boundary information of the target is recorded with boundary tracking  method in the first pass; the local scanning is performed in a second pass for only mapping the region that is confined by the first pass. Moreover, the boundary tracking algorithm can be separately used for the fast dimension metrology, and the reliability and practicality of this algorithm are validated by fast tracking of single/multimicroholes. Experimental results demonstrate that the proposed method is faster than traditional raster scanning by lots of the saving time. The applicability and versatility of the method are confirmed by using SICM and AFM experiments. The developed local scanning method would show great potential in the field of morphology measurement and the method is expected to be widely used in scanning probe microscopy.

Conflicts of Interest
The authors declare that they have no conflicts of interest.