Tip Steering of the Atomic Force Microscope by Samuel B. Kesner Submitted to the Department of Mechanical Engineering on January 31st, 2006, in partial fulfillment of the requirements for the Degree of Bachelors of Science at the Massachusetts Institute of Technology lanuary 2006 © 2006 Samuel B. Kesner All rights reserved The author hereby grants to MIT permission to reproduce and to distribute publicly paper and electronic copies of this thesis document in whole or in part. Signatureof Author ........ ........ .............................. ...... Department of Mechanical Engineering January 31, 2006 Certifiedby ...... ............ Kamal Youcef-Toumi Professor of Mechanical Engineering ____\ Accepted by ............................ ____ Thesis Supervisor ........................... John H. Lienhard V Chairman, Undergraduate Thesis Committee Tip Steering of the Atomic Force Microscope by SAMUEL B. KESNER Submitted to the Department of Mechanical Engineering on January 2 7 th, 2006, in partial fulfillment of the requirements for the Degree of Bachelors of Science in Mechanical Engineering Abstract: The Atomic Force Microscope (AFM) is a powerful tool for the imaging of extremely small objects on the scale of nanometers, like carbon nanotubes and strands of DNA. There currently is a need for methods to actively steer the probe tip of the AFM in order to greatly reduce the time required to image certain samples. This paper proposes a tip steering method that utilizes the vertical feedback information from the AFM sensor as well as the dimensions of the sample object to determine and maintain a scanning trajectory. A comparison of similar trajectory tracking methods is also presented. The AFM system and operation is discussed in order to justify the tip steering method. Finally, the method proposed is successfully simulated with a DNA strand sample in the presence of measurement noise. Thesis Supervisor: Dr. Kamal Youcef-Toumi Title: Professor of Mechanical Engineering 3 4 Table of Contents Abstract..................................................................................................... 3 Table of Contents .................................................................................... 5 List of Figures .............. 7 1 2 3 4 ............................... Introduction... . ................................... ................................................................................. 9 1.1 The Need for Tip Steering ............................................................ 10 1.2 Background: Review of Similar Research ................... 1......................12 1.3 The Tip Steering Method ......... 1.4 Thesis Outline ................... ......... ......... ................................. 12 ... Existing Tracking Methods......... ......... ......... 1...................4............. 14 ...................................... 16 2.1 Introduction ............................................................................ 2.2 Weld Seam Tracking: Through-the-Arc Sensing...................................16 16 2.3 Robotic Obstacle Avoidance ......................................................... 19 2.4 Potential Field Function Method .................................................... 20 2.5 Other Tip Steering Research ......... 2.6 Summary......... Atomic Force Microscope ......... ......... ......... .......................................22 ......... .......................... 22......... 22 ......... ....................................... 24 3.1 Introduction ................... 3.2 AFM System ............................................................................. .................. 2................... 24 24 3.3 AFM Operation ........................................................................ 26 3.4 AFM Dynamic Model ............................................................... 27 3.5 Sample Geometry ................. 2............... 29 3.6 Interaction Forces between the Probe and the Sample .......................... 3.7 Summary......... ........ ................................ ....... 30 ....................................................... 30 The Tip Steering Method ......... 3......................................3 4.1 Introduction .............................................................................. 31 4.2 Proposed Method ..................................................................... 32 5 4.2.1 Tradeoffs between Raster Amplitude, Scan Resolution and Scan Speed.. 33 4.2.2 Locating the Sample ............................................................ 5 4.3 Comparison of Methods ............................................................. 37 4.4 Summary .................................................................. 37 Simulation and Evaluation ............................................................. 38 5.1 Introduction .................................................................. 38 5.2 Simulation Assumptions and Simplifications ...................................... 38 5.3 Simulation Design ......................................... 41 5.4 5.5 6 35 5.3.1 Technical Aspects of the Simulation Design ................................. 41 5.3.2 The Goal of the Simulation ........................................ 45 Simulation Results ......................................... 46 5.4.1 Tracking Algorithm ......................................... 46 5.4.2 The Effect of Noise ......................................... 48 5.4.3 Simulation with Dynamics and Interaction Forces ........................... 50 Summary ................................................................. 51 52 Conclusion ........................................ 6.1 Introduction .................................................................. 52 6.2 Applications of the Tip Steering Method ....................................... 52 6.3 6.2.1 Implementation ....................................... 53 6.2.2 Possible Applications ........................................ 54 6.2.3 New Applications ....................................... 54 Future work ....................................... 55 6.3.1 Better Tip Steering Methods .................................................... 56 6.3.2 New Devices and Research Directions ....................................... 56 Acknowledgements............................................................................... 57 ........................................ Bibliography 58 A Matlab Code for the Tracking Algorithm ............................................. 60 B Matlab Code for the Dynamic Simulation ............................................. 63 6 List of Figures 1-1 A diagram of the AFM's main components ............................................ 1-2 A plot of an example of a AFM probe tip trajectory determined by the tracking algorithm .................. ........ 10 ................................... 14 2-1 A welding robot arc-welding a seam .................. 2-2 Cross section of a v-groove weld ........................................................ 2-3 A mobile robot path determined by a potential field function in order to avoid the .................................. 17 18 obstacles ..................................................... 2-4 20 Graphical representation of a potential field function used to navigate a mobile robot around obstacles towards a goal ................................................... 3-1 21 A diagram of the AFM system including the control system and how the topology image is generated .......................................................................... 3-2 25 The four-degrees of freedom of the AFM system represented by a simple twodimensional diagram ................................................................. 27 3-3 An image of an approximately 16 micron long stand of DNA .................... 29 5-1 An image of a DNA stand created with a scanning probe microscope. The DNA is not perfectly imaged due to the limitations of scanning such a small object....... 42 5-2 A tip trajectory determined by the tracking algorithm superimposed over a simulated DNA strand ..................................................... 43 5-3 A block diagram of the simulated tip steering method ............................... 45 5-4 The output of the tracking algorithm: a tip steering path based on a sample...... 47 5-5 A plot of a tip steering path with a rougher resolution ............................... 5-6 A plot of a tip steering path with a much finer resolution ......... 5-7 A tip trajectory determined by the tracking algorithm determined from measurements with noise ..................................................... 7 47 .............48 49 5-8 A plot of the case when the tracking algorithm fails to track the object due to the amount of noise present ................................................................. 5-9 49 A simulated response of the AFM tip being steered along a trajectory determined by the tracking algorithm ...................................... 8 ........................... 1 Chapter 1 Introduction The Atomic Force Microscope (AFM) is a popular tool for acquiring images of samples as small as a nanometer in size. The AFM is able to achieve this level of resolution because it measures the interaction forces between a very sharp probe and a sample with very high precision while scanning the probe over the sample surface. This imaging approach makes the AFM a member of the scanning probe microscope family, which includes the Scanning Electron Microscope (SEM) and the Scanning Tunneling Microscope (STM). Since it was invented by Binnig, Quate, and Gerber in 1986, the AFM has become an important tool in various manufactory industries [5]. For example, the AFM is used for quality assurance purposes in semiconductor chip and compact disc manufacturing. The AFM can even be used to ensure accurate tolerances on objects with high aspect ratios by measuring radii of curvature and surface heights. The AFM is an ideal measurement tool of choice for research interested in characterizing extremely small objects because, unlike other forms of scanning probe microscopy, the AFM does not require any special preparations of coatings on the samples and measurements can be taken in ambient air conditions. These special features allow for the AFM to be integrated directly into manufacturing lines to perform quality assurance analysis in real time during production. 9 ode Figure 1-1: A diagram of the main AFM components. Although this image is not to scale, it is clear that the probe is very sharp and actually comes into contact with the surface of the sample 181. The AFM, however, is not a perfect device. One issue with the AFM, for example, is that it is only able to produce accurate measurements in the vertical position relative to sample surface. This limitation results in an inability of the AFM to steer the probe tip in order to track objects or features across the sample surface. The following chapter outlines the motivations for incorporating tip steering into the AFM. Other work connected to this field will be briefly discussed as well as a proposed tip steering method and focus for this paper. Finally, an outline for the entire paper will be presented. 1.1 The Need for Tip Steering Creating an image with the AFM is not an instantaneous or simple process. The probe must be scanned back and forth in a raster motion over the surface of the sample at a slow enough rate so that the accurate measurements can be taken. A single image can be made up of thousands of scan lines, each taking up to one second to complete. Due to the technical limitations of the AFM, it is only able to create an image of a user-specified square or rectangular area. For some applications, this type of imaging approach is 10 acceptable. In compact disk (CD) manufacturing, for example, the purpose of scanning the CD with the AFM is to investigate the quality of the product in a specific twodimensional area. However in the case of carbon nanotube manufacturing, the feature of interest for quality assurance purposes is the dimensions and shape of the tube. Therefore for this imaging task, it is a waste of time and resources to scan the probe over anything other than the actual body of the nanotube. Not all samples offer as clear a trajectory to follow as the edge of a straight carbon nanotube. Researchers are currently investigating the use of the AFM as a possible tool for emerging fields of nanotechnology, biotechnology and single molecule chemistry. These novel applications of the AFM technology present new challenges to the standard mode of AFM operation. For example, there has been recent interest in using the AFM to sequence Deoxyribose Nucleic Acid (DNA) [8]. A single strand of DNA is a very long and thin molecule with a width that is at the very bottom of he AFM's resolution bandwidth, about 1 nanometer. In order to scan this object, the AFM has to scan the entire surface on which the strand has been deposited in order to ensure that the complete DNA strand is imaged. This is a very inefficient process considering the fact that the DNA only occupies a very small fraction of the entire surface area. The time required to create an image of an unwound strand of DNA could be greatly reduced if the AFM probe could be directed to follow the trajectory defined by the DNA sample instead of scanning the entire area around the DNA in addition to the object of interest. This new approach of steering the AFM tip would improve the imaging process by allowing the AFM to scan long and narrow objects much more rapidly than the current methods permit. This increase in speed could allow for the AFM to have a higher sample throughput, to produce higher quality images, and to ascertain more specific information from the samples. In the case of DNA, for example, a tip steering approach would allow for more of the human genome to be scanned in the same mount of time, and with a properly functionalized probe tip, the specific order of the DNA bases could also be determined [8]. 11 1.2 Background: Review of Similar Research Controlling the trajectory and motion of an actuated device has been one of the main focuses of controls and robotics research for many years. Trajectory control and path planning is essential for robotic manufacturing, missile guidance, space travel, and aviation. The applications of controls engineering that are most similar to the challenge of tip steering an AFM are the technologies and methodologies associated with robotic welding, laser cutting and robotic obstacle avoidance. These fields are comparable to tip steering because all of them assist an actuated device to determine or maintain a trajectory in real time based on sensory information and a preprogrammed goal object. One of the most challenging aspects of tip steering an Atomic Force Microscope is the limited amount of sensory information available. The AFM provides feedback data for the vertical position of the probe but no feedback information regarding the lateral position. This lack of information presents a challenge, because a control system cannot accurately command a trajectory if it has no idea what the current position is. The solution to this problem is to use the vertical feedback information to determine a path for the AFM tip. The challenge of determining a trajectory despite only having access to sensory feedback in the vertical direction is also dealt with in older robotic welding technologies. While current robotic welding technologies make use of robotic vision to ensure that it is tracking weld seam, older robots had to rely on the welding arc signal to determine if the welding tool had deviated from the seam. This approach is very similar to the tip steering method for the AFM proposed in this paper. See chapter 2 for a more thorough discussion of robotic welding and other trajectory planning methods. 1.3 The Tip Steering Method This thesis presents a novel method for controlling the lateral position and trajectory of the Atomic Force Microscope probe tip. The AFM currently does not 12 implement any tip steering schemes because of the lack of sensory feedback information regarding the lateral position of the AFM probe tip. The method proposed in this paper uses the limited sensory feedback information from the AFM and the target sample's geometry and dimensions to determine a scan path and to steer the AFM probe tip along that path. As described in greater detail later in this paper, the AFM only receives feedback information about the vertical, or Z direction, position of the probe relative to the sample surface. The fact that the AFM control system receives no feedback information about the lateral, or X and Y,positions of the probe tip means that the lateral movements of the AFM probe have to be determined in an open-loop fashion. This paper proposes to solve this issue by creating a way to steer the tip of the AFM along a specific path defined by the position of the sample object. This tip steering method relies on the assumption that the approximate dimensions of the object being imaged are known in advance. This information can be determined by scanning a single larger area to find the average length, width, and height of the object or from other research literature on the same sample object. During subsequent scans, this information regarding the dimensions of the object can be used to aid the tip steering process in order to create an image of the object in substantially less time than a regular AFM scan. The method proposed in this paper works by determining the position of the object through an analysis of the vertical feedback information produced the AFM's single sensor. After the object of interest has been located on the sample surface, the probe tip begins a raster-scanning path that tracks the position of the object. The width of each scan line is determined by the width of the object of interest and the amount of position and imaging errors that might occur. The width of the raster scan lines may be increased to compensate for the challenges associated with extremely small or hard to image objects. As the probe tip scans in a raster fashion, the vertical sensory information is used to determine the location of the center of the sample object. If the center of the object does not match the center of the raster scan, the path of the probe is adjusted to compensate for this error. The position of the object is analyzed during each subsequent scan in order to constantly maintain the focus of the scan on the object of interest. As 13 this paper will demonstrate in later sections, this approach to tip steering is most applicable to string-like sample objects, like carbon nanotubes and strands of DNA. . I I _._ ___ '1 i ! _._ _ __-_ _ _ _ _ _ '_! !I i i, ....... I ! ......__ i · i _ I I I I I _ _ _ _ _ _ _ _ _ _ _ _ I I Figure 1-2: This plot shows a tip steering trajectory determined by the algorithm proposed in this paper. The blue line represents an object of interest, while the red line represents the raster-scan trajectory the tip will be commanded to follow. 1.4 Thesis Outline This paper is organized in the following way: Chapter 2 presents a summary of the existing tracking technologies and research that most closely resemble the AFM tip steering method discussed in this paper. The second chapter also analyzes how applicable these methods are to the issue of tip steering of an AFM. Chapter 3 describes the operation of the AFM, a model of the AFM dynamics and a model for the interaction forces that exist between the AFM and a sample during scanning. A discussion of a special subcategory of very long and thin sample objects, like DNA, is also presented. 14 Chapter 4 contains a detailed explanation of the tip steering method proposed in this paper, a discussion of the tradeoffs between the resolution and efficiency of a scanning operating, and a number of techniques for searching for the sample object in order to begin the trajectory tracking algorithm. Chapter 5 presents the simulation that was used to evaluate the method as well as a discussion of the simulation results. Lastly, chapter 6 concludes the paper with a brief summary of the main points of this thesis as well as possible applications of the tip steering method and recommended directions for future work. 15 Chapter 2 Existing Tracking Methods 2.1 Introduction This chapter presents an overview of the trajectory tracking methods and applications that most closely parallel the tip-steering of an AFM. The challenge of determining and closely following a trajectory has been addressed in a number of different technologies. In the context of automated manufacturing, for example, it is essential that robotic welding and cutting operations follow trajectories precisely in order to guaranteed uniform quality of the manufactured product. It is also important for mobile autonomous robots to determine and then follow a specific trajectory around obstacles. One such method for achieving this obstacle avoidance goal, the potential function method, is discussed in detail. At the end of this chapter, the only published AFM tip steering method is reviewed. 2.2 Weld Seam Tracking: Through-the-Arc Sensing Robotic welding is an important tool for the metalworking and large-scale manufacturing industries. A common task for welding robotics is job of seam welding: the process of permanently welding together two metal objects with a contiguous interface. The robots are responsible for positioning an electric arc welding tool that melts a localized area on both metal surfaces. This process is required in most manufacturing operations that involve metal, including automotive manufacturing, ship construction, and the fabrication of pressure vessels [1]. In order to maintain the quality and strength of a weld, the welding robot must track the position of the seam throughout the welding operation. The seam is tracked in 16 order to compensate for the distortion in the material caused by the welding process [1]. The robot's controller adjusts the welding tool's trajectory in response to the feedback information regarding the position of the weld seam. Figure 2-1: An image of a welding robot arc-welding a seam 201. Robotic welding controllers sense variation in the seam trajectory with two different types of sensing technologies: through-the-arc sensing and vision-based seam tracking [1]. Through-the-arc sensing is a method that uses the known relationship between the electric arc signal of the welding robot and the contact-to-workpiece distance (CTWD) of the welding tool to determine the lateral position of the welding robot. This method works by adjusting the position of the welding robot due to variations in the electric arc signal. When welding a v-groove joint, for example, the electric arc welding robot is programmed to weld along the entire length of the groove while simultaneously oscillate back and forth inside the groove. The control system adjusts the trajectory of the robot due to two specific indicators in the feedback signal: discrepancies in the arc 17 signal at the extremes of the oscillation and variations in the arc signal at the center of the oscillation. The discrepancies between the arc signal at the extremes suggests that the welding tool is not centered in the v-groove and the variations in the signal at the center of oscillation, assuming that the tool is centered on the groove, suggests that the vertical position of the welding tool relative to the workpeice has changed [2]. The control system constantly alters the robot's trajectory in order to mitigate these position errors. This seam tracking approach is based solely on local information on the weld and lacks any knowledge of the global condition of the weld seam. Figure 2-2: A cross section view of a v-groove weld. The welding tool oscillates back and forth in this grove as it travels along the length of the groove. Unlike the through-the-arc method discussed above, vision-based seam tracking incorporates both global and local knowledge of the weld seam. This approach uses optical or thermal sensing to determine the position of the welding tool and the seam [1]. The controller thus corrects the position of the robot based on a visual comparison of the two trajectories, similar to the way people use their eyes to adjust the trajectory of their pen while writing in order to stay between the lines. The first weld seam tracking method discussed, through-the-arc sensing, is closely related to the AFM tip steering method proposed in this paper. Both methods attempt to control the lateral trajectory of an actuated device using limited sensory information. In the case of the AFM tip steering method, the lateral trajectory of the probe tip is determined solely by the vertical topology information recorded by the AFM sensor. In a similar fashion, through-the-arc sensing adjusts the lateral trajectory of the welding tool due to variations in the electric arc signal. Because the trajectory is altered based on an electric signal, through-the-arc sensing is more similar to a Scanning Tunneling 18 Microscope (STM), where the position of the probe is adjusted in order to keeping the tunneling current constant. 2.3 Robotic Obstacle Avoidance There exists a large body of research dedicated to motion planning and obstacle avoidance methods for mobile robots. The purpose of these various methods is to determine the best path for an autonomous robot to take in order to reach its goal while avoiding all of the obstacles along the way. The focus of most of the research in this field has been on the algorithms that determine the robot's trajectory, and not on methods to find out the actual positions of the obstacles in the work environment. While the goal of the AFM system is to create an image of a sample as apposed to finding a path around obstacles, something can still be learned from an analysis of the various robot obstacle avoidance methods. The Skeleton (or Roadmap) method uses a computer search algorithm to determine a path from a starting point to the objective by selecting the best pat from all possible paths given the position of known obstacles. The Cell Decomposition method breaks the workspace up into individual cells and then determines a path from the starting point to the goal through adjacent cells. Another method is to use an artificial potential function to generate a potential field. The potential field applies artificial forces to the robot that causes the goal to become the global minimum and the obstacles to become local maximums for the robot. These potential energy fields therefore affect the robot by pushing it towards the objective [3]. 19 I& Figure 2-3: A robot path determined in order to avoid the four obstacles present in the work environment. This path was determined by a potential field function [211. All of the trajectory determining methods discussed above require a complete knowledge of the topology of the work environment before a path can be determined. One of the challenges of tip steering an AFM probe is that there is no knowledge of the global topology of the scanning surface. Therefore in order to scan only a strand of DNA, for example, it is impossible to use a standard motion planning methods because all of them require a global knowledge of the surface not available to the AFM control system. Another main feature of the AFM tip steering method that is different than the obstacle avoidances methods is that the goal of tip steering is to have the system stay in contact with an object as opposed to avoiding and keeping a distance from all objects. Despite these major differences between the two methods, much can still be learned this mobile robotics research. The process of tip steering an AFM can learn a great deal in particular from the potential field function method. 2.4 Potential Field Function Method The potential field function method is the most promising robot motion planning method for the task of tip steering an AFM probe. An artificial potential field creates attractive and repulsive forces that act on the robot as a way to represent the objects that 20 exist in the environment. In a standard robotic motion planning situation, the function creates an attractive force towards the goal and a repulsive force away from the obstacles in the environment [3]. These forces are usually a function of the distance between the robot and the goal or obstacle. The implementation of the potential field method on the tip steering of the AFM probe would be a variation of the standard potential field approach because with the AFM, the object of interest should possess an attractive force as opposed to the repulsive force possessed by the obstacles in the robot motion planning case. .... . . . , . . 2. .1 a. Ka~i· 0 0.... " ... * -1.5 . -1 _ O5 0x .. ' 1.5 Figure 2-4: A graphical representation of a potential field function for mobile robot obstacle avoidance. Note how the goal is the global potential minimum while the obstacle is a maximum 1181. The potential field method is the most appealing option presented in the robotic path planning literature for a number of reasons. Firstly, this method can be implemented with the limited topology information available to the AFM after each scan line, unlike the other methods that require a complete image of the work area before a trajectory can be determined. Also, this method could be made robust to variations in the objects being scanned and errors in the measurement data. Finally, the potential field functions can be implemented in a way that allows for them to be easily included in the lower level control algorithms used to steer the AFM probe. 21 2.5 Other Tip Steering Research There are very few examples of published research that directly address the challenge of steering the tip an AFM. This could be because the need for a tip steering method has not yet become a strong enough motivator for research funding or because researchers have not yet begun to take advantage of the flexibility of the AFM as an imaging tool for string-like samples. One of the first instances of published research that deals with imaging samples with an active tip steering approach can be found in the research of Aumond, Yeo, and Youcef-Toumi [19]. This paper deals with methods of steering the AFM probe tip in order to create better images of samples with high aspect ratio features. The only published research on the type of tip steering discussed in this paper, to this author's knowledge, is the research paper presented by S. B. Anderson and J. Park at the 2005 American Control Conference [4]. The tip steering method outlined in this paper is essentially a way to estimate the position of the next scan line based on the location of the current scan line and the local curvature of the object being scanned. There are a number of unresolved issues with this method, including the fact that it can not track objects with sharp curves, it does not prove a way to search for the object of interests, and it requires that first few scan lines cross the object. The method also does not take into account the dynamic properties of the AFM device. The paper by Anderson and Park presents a simulation of the method as applied to scanning a strand of DNA and the experimental results of scanning a carbon nanotube. 2.6 Summary This chapter reviewed the existing research on motion planning and trajectory tracking. The through-the-arc method used in robotic seam welding utilizes the electric arc signal to steer the welding tool, and is therefore the trajectory tracking method that is the most similar to the AFM tip steering method proposed in this paper. The majority of 22 the robotic motion planning methods are not appropriate for the AFM tip steering task because they require a complete knowledge of the work environment before the path of the manipulator can be determined. The exception to this observation is the potential field function method that utilizes artificial forces to attract the manipulator towards its objective while repelling it away from the obstacles in its path. Finally, the tip steering method presented by Anderson and Park was shown not to offer a complete solution to tip steering of an AFM probe because it does not account for the dynamics of the AFM and the interaction forces with the sample, or offer a way to engage the object in order to begin the tip steering process. The following chapter will describe AFM system and explain how it operates. A dynamic model of the AFM will also be provided as well as an explanation of the sample-probe interaction forces. 23 Chapter 3 Atomic Force Microscope 3.1 Introduction The Atomic Force Microscope (AFM) is a powerful tool for the measurement and investigation of objects as small as a nanometer. Invented by Binnig, Quate, and Gerber in 1986, the AFM has become a popular tool for the emerging fields of single molecule chemistry, biological engineering, and nanotechnology [5]. This could be because AFM has distinct advantages over other scanning microscopes. For example, the samples viewed by the AFM do not require any special preparations and the AFM can operate in air instead of in a special fluid or in a vacuum. The following chapter will discuss the AFM system and the operation of the AFM. A dynamic model of the AFM used to create the simulation in this paper will also be presented. Finally, a model of the interaction forces between the AFM and a sample will be discussed. 3.2 AFM System The AFM is composed of three main components: a piezoelectric scanner, a silicon cantilever with a sharp probe tip, and a cantilever deflection sensor composed of a laser and a photosensitive diode (PSD) [6]. 24 Piezoelectric scanner Topogr Tm Control Signal I L Feedback Signal Figure 3-1: A diagram of the AFM system. The control system uses the sensory feedback from the photosensitive diode to determine the deflection of the cantilever. The control system adjusts the piezoelectric tube is in order to negate the cantilever deflection. This command signal is then processed and outputted as the topology image of the sample [81. The piezoelectric scanner is the main actuator for the AFM system. It is capable of three-degrees of motion relative to the sample surface and it responsible for moving the probe tip on and around the sample. Piezoelectric materials at certain types of crystals that deform a known amount in the presence of high voltages and are often used to position objects with great accuracy [10]. The actuator is composed of a tube of piezoelectric material that is dividing into four equal sections (see Figure 3-1). These sections can be actuated independently, therefore the tube can bend if two or more of the sections are actuated differentially. This type of actuation results in lateral movement of the cantilever relative to the plane of the sample. If all four of the sections are actuated together, then the tube either extends or retracts vertically relative to the sample [8]. The cantilever attaches to the free end of the piezoelectric actuator tube. The resulting force of the interaction of the probe tip and the sample causes the cantilever to bend. These interaction forces are usual Van der Waals forces, but there can also be adhesion or electrostatic forces involved. The deflection of the cantilever is measured by the PSD, which senses the change in position of the laser beam reflecting off of the back 25 of the cantilever and converts this position reading into an electric signal for the AFM control system. 3.3 AFM Operation The AFM operates by raster scanning the probe across the sample in a userdefined region. As the probe moves across the sample, the variations in the topology of the sample surface result in changes in the deflection of the cantilever. These changes in deflection are measured by the PSD sensor, which sends a signal to the AFM control system thus informing it of the current deflection of the cantilever. The control system adjusts the piezoelectric tube's length in order to keep the cantilever deflection at a userdefined constant value. The image produced by the AFM is determined from the command signal sent to the piezoelectric tube as well as the lateral position of probe. While the basic operation of the AFM remains the same for all types of scans, the motion of the probe relative to the sample surface can vary depending on the what imaging mode is selected by the user. The two major types of AFM scanning modes are contact mode and tapping mode. In contact mode, the AFM probe is kept in constant contact with the sample by adjusting the piezoelectric tube in order to maintain a constant cantilever displacement angle. Because the bending angle of the cantilever is a function of the interaction force between the probe tip and the sample, this operation mode can also be called constant force mode. During the scanning operation, the probe is dragged along the sample surface and the control system adjusts the length of the piezoelectric tube in order to keep the cantilever angle constant. This command signal sent to the piezoelectric actuator is also used to generate the topological image of the sample [8]. The second major scanning mode, tapping mode, has a more complex motion than contact mode. With tapping mode, the cantilever is oscillated at its lowest natural frequency perpendicular to the sample surface. As the cantilever approaches the sample during the downswing, the repulsive forces between the probe tip and the sample decreases the oscillation amplitude. In this scanning mode, it is the task of the control system to scan across the sample surface while maintaining the same average oscillation 26 amplitude. The image generated in tapping mode is a product of both the amplitude and oscillation phase data collected by the AFM. The fact that this mode generates two types of data is useful because it can provide a more complete picture of the sample topology as well as the interaction forces between the sample and the tip. Another benefit of tapping mode is that because the probe tip does not come into contact with the sample surface, there is less wear on the probe and minimal sample damage due to imaging [8]. 3.4 AFM Dynamic Model The AFM can be modeled as a four-degrees of freedom system, as shown in Figure 32. Z, is the vertical extension of the piezoelectric tube, 0, is the tilt of the piezoelectric tube in both the X and Y directions and 0, is the tilt of the cantilever relative to the piezoelectric tube. Figure 3-2: A simplified diagram of the AFM system. The four-degrees of freedom in the system shown are the bending of the cantilever, 0,, the extension of the piezoelectric tube, Z, and the bending of the tube in the Xand Ydirections, Op and 6p . The bending the diagram, but it is the bending of the piezo tube into the page. 27 angle Op~ is not shown in The Z, 9 py,and Op degrees of freedom can extend or retract in response to the voltage applied to the piezoelectric actuator, as discussed above. The 0c degree of freedom, the variable controlled in a standard AFM system, is maintained at a constant value in contact mode by the varying the length of the piezoelectric tube in the vertical direction. This model of the AFM system neglects the other degrees of freedom present in the system, including twisting of the cantilever about its principle axis and the deflection of the devices that holds the piezoelectric actuator because those degrees of freedom do not as directly affect the imaging capability of the AFM. The following system of equations relates the displacement of the piezoelectric actuator in the X Y, and Z directions to an applied voltage: O sX = /=1S s22s+a +24 0 Oy( ) = (1) 0 2 2 +24,)S+( 2o, os + 0 (2) ,2 S 2+ i.,V Zp(s) = s2 24o os +° 2 (3) In these three equations, presented here in transfer function form, the lettersj, i, and n represent the modes of the system [6]. piezoelectric crystal, k, k, V is the command voltage to the and k and are the gains applied to the command voltage, 4'o,,S4i, and (~pare the damping ratios for each mode for the three degrees of freedom, and j, ,, and az, are the natural frequencies of each mode for the three degrees of freedom. 28 3.5 Sample Geometry The AFM can operate in a range of environments, but in order to achieve usable measurements, the sample must be placed on an atomically flat surface. The process for preparing samples to be scanned often involves cleaving a sheet of mica in order to create an atomically flat area on which to deposit the sample. This technique is commonly used when imaging very fine objects that lie at the lower limit of the AFM's resolution, including carbon nanotubes structures or strands of DNA. Carbon nanotubes and single or double stranded DNA are in a special subcategory of objects that the AFM is able to scan. This is because these string-like samples can be as thin as a single nanometer, but can be as long as ten of microns or even more. This extremely high length to width ratio makes the standard AFM scan procedure very inefficient. For example, in order to scan a strand of DNA that is one nanometer wide and one micron long, an AFM operating in a standard mode would have to scan at least a one micron by one micron area. This is very wasteful considering the fact that the DNA only takes up 0.1% of the scan area. The tip steering method proposed in this paper will focus the probe only on the areas of interest, thus reducing scan times by orders of magnitude. Figure 3-3: An image of a DNA strand taken by an AFM in tapping mode. This image has been stitched together from a number of five 3 micron scans. The predicted length of this DNA stand is 16 microns 1221. 29 3.6 Interaction Forces Between the Probe and Sample Despite the extremely small size and mass of the AFM probe tip, the interaction forces that are present when scanning a sample with the AFM cannot be ignored. These forces are highly dependant on the medium in which the AFM is operating. For example, capillary and adhesion forces are present when imaging in air due to the contaminates and moisture naturally present in the environment [14]. While a variety of interaction forces affect the probe's dynamics in the vertical direction, it has been shown that only frictional shear forces affect the AFM's operation in the lateral directions [16]. It has been shown that the lateral friction between a probe tip and an atomically flat surface, in this case mica, is proportional to the area of contact, acontactand the shear strength r . Ffriction- aontact (4) A useful first approximation of the friction force as a function of time can be found in equation (5), where G is the approximate sheer strength at the point of contact and r2 (t) is the approximate instantaneous contact area [16, 14]. Ff(t) G*r t) (5) 3.7 Summary This chapter presented an explanation of the AFM system and how it creates an image. A dynamic model of the AFM was offered as well as a discussion of the two main modes of AFM imaging: contain and non-contact or tapping mode. The dimensions and features of a special subcategory of samples, nanoscale string-like objects, was also discussed. Lastly, a model for the interaction forces between the probe tip and the sample was presented. 30 Chapter 4 The Tip Steering Method 4.1 Introduction The following chapter will present the proposed tip steering method, including the process of starting and adjusting the scan trajectory. The various tradeoffs between performance and efficiency will also be discussed. The chapter will conclude with a comparison of the proposed method with currently existing trajectory planning methods. The Atomic Force Microscope is a very useful tool for investigating the topology and structure of extremely small objects. As discussed above, there is a need for a way to determine and then to steer the AFM probe along a sample-defined trajectory in order to more efficiently create images of certain types of objects. In order to create an image of a fine, string-like object, a standard AFM system currently must scan a much larger area in order to guarantee that the whole object was captured during scan operation. This process could be greatly expedited if a system for steering the AFM probe tip along the trajectory defined by the sample could be developed. If tip steering was implemented in a current AFM system, then a much higher throughput of certain types of objects would be possible. This increased efficiency could allow for the AFM to be able to image huge samples like the entire human genome or large quantities of mass-produced carbon nanotubes. The current issue that prevents a tip steering algorithm from being introduced into the AFM system is the challenges associated with the limited sensory feedback regarding the lateral position of the AFM probe. As discussed in chapter 3, the AFM only has a sensor that measures the vertical displacement of the probe relative to the sample surface. In normal operation, the lateral trajectory of the probe tip is determined in an open-loop fashion. This is not an issue for the normal AFM scan process because control system has a sufficient amount of accuracy to scan the probe back and forth in a relative large 31 area specified by the user. The lateral position data produced by a current AFM is only useful in creating spatial relationships between the topological data measured by the AFM in order to make an image. In order to overcome this dearth of sensory information, this paper proposed to introduce a tip steering process that uses the vertical position information as well as the dimensions of the object of interest to determine a probe tip trajectory. This tip steering algorithm is very similar to the through-the-arc sensing method for robotic welding discussed in section 2.1. 4.2 Proposed Method The tip steering method presented in this paper is a way to determine and control the lateral position of the AFM probe tip without modifying or altering any of the hardware components in the current AFM system as discussed in chapter 3. This new method is possible because the control system can use a knowledge of the dimensions of the object of interest to determine the position of the probe relative to object. For example, it the AFM probe is scanning across a carbon nanotube of a know diameter, the control system can interpret the vertical position data to find out where the point of the greatest displacement for the cantilever is. This point is the top of the carbon nanotube and is therefore also the centerline of the nanotube. This conclusion assumes that the carbon nanotube is lying on an atomically flat surface, that the nanotube has a uniform diameter and is perfectly cylindrical, and that the image produced is an accurate measurement of the object [11]. After the position of the object has been determined, the tip steering control system can use this knowledge to adjust the lateral movements of the probe. For example, if the goal is to position the center each raster scanline on the center of the carbon nanotube, then the control system can use the information regarding the position of the carbon nanotube to adjust the center of probe raster oscillation. This type of adjustment can be made every scanline to ensure that the sample remains in the center of the raster 32 scan trajectory, even if the object is positioned at an angle relative to the scan direction or if it bends or curves. This system can be further optimized if the geometry and dimensions of the object of interests are used to tune the raster scanline length and spacing. One application of tip steering that has possibility of become a reality is genetic sequencing, or carefully scanning a strand of DNA with a functionalized probe to find the order of the DNA base pairs [8]. A denatured single strand of DNA is known to be on the order of a single nanometer wide, therefore even including the convolution errors, a raster scanline width used to image of a strand of DNA does not need to be longer than 10 nanometers. However, due to the very tight spacing of DNA nucleotides, the distance between scan lines must be smaller than even the radius of curvature of a standard AFM probe tip. The spacing between DNA base pairs is 0.34 nanometers while the smallest radius of curvature of a AFM probe tip available is 1 nanometers, this a finer object like a singlewalled carbon nanotube has to be attached in order to gain the resolution needed to sequence DNA [23]. This information regarding the width and spacing of the bases in a DNA strand can be used to tune the parameters of the lateral raster scanning motion to make the imaging process as efficient as possible. 4.2.1 Tradeoffs between Raster Amplitude, Scan Resolution, and Scan Speed There are a number of tradeoffs and compromises that have to be made with regard to the raster scan parameters. For example, if raster oscillation width is set to be on the order to the object width, for example one or two nanometers for a DNA strand, then there is the chance that the object will curve to such an extend between two successive scanlines that the center of the object will no longer be present in the topological data produced by the AFM sensor. This would result in the AFM control system essentially loosing track of the object, and because it cannot determine its lateral position without the vertical position data from the object, it will not be able to correct is trajectory and follow the object. This issue can be avoided by increasing the width of the 33 raster scan lines, however this increase results in the scanning process taking a longer amount of time to scan the object. Another tradeoff discussed in the previous subsection of this paper was the spacing between raster scan lines. This decision is based primarily on the resolution needs and the speed requirements of the scan operation. For example, if the most important factor is efficiency and speed, as in a manufacturing process, then the space between subsequent can lines can be increased. For example, in the case of quality assurance of electronics on an assembly line, resolution is not as crucial a concern as is the speed of the inspection process. While in the sequencing of DNA, as discussed above, the spacing between each scan line is crucial in order to ensure that no nucleotides are skipped in the scanning process. These tradeoffs must be considered and decided for each AFM imaging task that considers implementing this proposed tip steering method. A simple approximation to determine the time required to scan an object can be made with the following equation: w*(f£) (6) tscan = Where tscanis the time required to scan the object, w is the width of the raster scan oscillation,f is the frequency of the raster scan in number of scanlines per meter, e is the length of the sample object in meters, and v is the speed of the tip. Assuming that the tip moves at a constant speed that is limited by the electronics and dynamics of the AFM system, the time required to scan an object of length e can be reduced if the raster scan width is decreased or if the scanlines are spaced a greater distance apart thus decreasing the frequency f As discussed above, lowering the frequency will affect the scan resolution and a raster scan width that is too small might result in the tracking algorithm loosing the position of the sample object. 34 4.2.2 Locating the Sample Another challenge of tip steering an Atomic Force Microscope is how to first find the object on the sample surface in order to begin the process of tracking it. It is very difficult to find a single extremely small object, like a nanotube or a DNA strand, on a sample surface. For that reason, researchers often deposit a layer of thousands or millions of a specific object with the hope that they will be able to locate at least one of them during a scan operation. This means that for at least a period of time, the AFM is imaging the surface on which the objects of interest have been deposited. It is optimal to minimize that searching period in order to not waste time scanning things other than the objects of interest. There are a number of ways to achieve the goal of quickly seeking out the object of interest in order to begin the tracking process. Which approach one takes depends of the sample being imaged and the technology available. The most straight forward way to find the object of interest, like single molecule or a carbon nanotube, is to have the probe tip raster scan a very large region until it finds a topological formation that resembles the object. After the object has been located, the tip steering method outlined above can be executed. While this approach is sufficient for larger and more obvious structures like the a silicon chip, it is not as feasible a task for finding small sensitive objects, like single molecules. A single strand of denatured DNA has a diameter of about 1 nanometer. Even with careful attention to ensure that the mica is atomically flat and that the AFM is extremely clean and in good condition, an object as small as 1 nanometer could easily be seen as background noise in the AFM measurement data. The main challenge in finding a sample of DNA is being able to recognize the object and to tell it apart from the background noise that is inherent to the scanning process. There are a number of possible solutions to the challenge of locating a DNA strand with an AFM probe. One such solution could be to associate a more obvious and recognizable molecule with each DNA strand so that the AFM could search for the larger object instead of attempting the much harder task of finding the DNA stand. This approach could be implemented by chemically bonding one of the ends of the DNA stand 35 to a more pronounced object or a marker. This is a standard practice in genetics research. With a knowledge of a short section of the genetic sequence at one of the ends of the DNA strand, researcher can create a molecule with the nucleotides that correspond and bind to that short sequence. By denaturing the DNA stand and mixing it in solution with some of these synthesized molecules, the researchers are able to add fluorescent or radioactive markers to the DNA stands in order to help with detection. This same principle can be extended to locating a DNA strand with an AFM. If an object that is easy to locate with an AFM, like a piece of silicon for example, is bonded to a DNA using the corresponding bases of the DNA's sequence, then it will be considerably easier task to begin to the process of scanning the DNA strand. Another possible way to locate a DNA strand with the AFM is to take advantage of the AFM's ability to sense extremely slight forces. The AFM probe tip can be functionalized by covalently bonding a molecule to it [12]. The process of functionalizing a probe tip results in the AFM sensing not the interaction force of the silicon probe and the sample, but the interaction force of the molecule and sample. In the case of DNA, it has been shown that it is possible to functionalize a probe tip with a single DNA nucleotide in order to sense the bonding force between individual nucleotides [8]. This functionalization process can be used to aid in finding the DNA strand because instead of looking for the slight topographic signature of the DNA, the AFM control system can look for a characteristic bonding force between the nucleotide attached to the AFM probe and the DNA strand on the atomically flat scanning surface. There are also a number of challenges associated with this approach to find the DNA strand, including the fact that the AFM must operating in tapping mode in order to few the bonding forces clearly and the fact that the bonding force between two DNA nucleotides is very small, less than 100 piconewtons [13]. While it is possible for the AFM to sense such small forces, there is again the risk that the bonding forces will be hard to find among the background noise present at such a small sensing scale. 36 4.3 Comparison of Methods The tip steering method proposed in this paper shares a number of similarities with some of the existing methods discussed in chapter 2. While the methods applied to robotic path planning are similar in their end goal to the tip steering method discussed in this paper, the most similar trajectory planning method found in the literature is the through-the-arc sensing used by robotic welding devices. Both tip steering and through-the-arc sensing share the characteristic of using a knowledge of the geometry and dimensions of the object they are tracking to determine their path. The two methods also use a feedback variable other than the lateral position to help determine the tip trajectory. In the case of the tip steering method, the control system uses a knowledge of the dimensions of the sample being scanned as well as the information from the vertical displacement feedback to steer the tip along a raster-like path that follows the sample. In the case of robotic welding using through-the-arc sensing, the control system uses the geometry of seam as well the electric arc signal to steer the welding tool in an oscillating path that follows the weld seam [2]. The greatest difference between these two techniques is that the AFM is searching for and tracking an object without the same level of instruction or preprogrammed reference points that exist in an automated manufacturing process. Also, an AFM tip steering process occurs at the nanoscale and searches for objects that are a billion times smaller than the automobiles and planes being robotically welded using the through-the-arc sensing method. 4.4 Summary This chapter described the tip steering method proposed in the paper. The workings of the method were outlined in detail, as well as an explanation of various tradeoffs associated with the selection of the method parameters. A number of ways to search for the object of interest with the AFM were mentioned as well as specific examples for how to find a carbon nanotube or a strand of DNA in order to begin the trajectory tracking algorithm. Finally, the tip steering method was briefly compared with the robotic welding sensing method described in chapter 2. 37 Chapter 5 Simulation and Evaluation 5.1 Introduction Earlier sections of this paper have discussed the need for an AFM tip steering system, what the currently existing trajectory tracking methods are and how the current methods can be applied to the Atomic Force Microscope. A model of the AFM was also present along with a description of AFM operation. In the previous chapter, a method for tip steering and AFM was present was well as examples of how to adjust the method in order to better track specific samples. The following section outlines the simulation used to test the tracking method proposed in the paper as well as the results of the simulation. The simulation presented combines the knowledge of the AFM system discussed in this paper, assumption and simplifications of AFM operation, and the computer simulation methods. The goal of this simulation is to analyze the tip steering method proposed, the ability of the AFM to operate with the new method, and the robustness of the method to noise in the feedback data. 5.2 Simulation Assumptions and Simplifications It is impossible to create a simulation of a complex device such as the AFM that incorporates all of the forces and degrees of freedom present in the system. A physical structure, for example, has infinite modes of vibration, but due to limitations on computer memory and processor speed, a simulation must limit its scope to a finite number of vibration modes. The same is true for the number forces required in simulation. In the AFM system, for example, there exists a large range of forces present: dynamic forces, 38 chemical bonding forces, electrostatic forces, various fluid forces like adhesion, friction, gravity, and other forces. It is not feasibly nor necessary to simulate all of these forces in a simulation. For example, the force of gravity is not a large concern considering the fact that at the scale the AFM operates at, the masses of the samples and the probe tip result in gravity forces of less than piconewtons. In order to create a simulation that is of a feasible scope while still sufficiently testing the performance of the tip steering method, a number of assumption and simplifications were made. The first of these assumptions was to assume that the control system had access to the exact vertical position of the probe tip during the scanning process. This is a reasonable assumption because the vertical control system is a completely separate system from the tip steering method proposed in this paper. The two systems are connected in the fact that the tip steering system takes the output of vertical position control system in order to modify the lateral tip position, and the act of moving the tip may cause the probe tip to encounter a surface of a different height, thus causing the AFM cantilever to deform and trigger the vertical control system to modify the length of the piezoelectric actuator. This simulation is not concerned with the dynamics of the AFM probe tip in the vertical direction, only the topology information provided by the control system. As a result of the fact that the vertical extension of the AFM actuator is not strongly coupled to the lateral position of the probe tip, although some amount of creep and hysteresis is present [14]. As a result only the dynamics of the lateral, or X and Y, components of the AFM probe-actuator system and the lateral control system were simulated. Furthermore, only the first mode of vibration of the piezoelectric tube and the cantilever for these two degrees of freedom was used to model the AFM in this simulation. This approximation can be made because of the fact that the frequency of the AFM actuation is slow relative to the natural vibration frequency of the higher degrees of freedom of the piezoelectric actuator and cantilever systems. The following equations represent the first order approximations used in the tip steering simulations found in this paper [17]. 9,. and 0,. are the bending angles of the piezoelectric tube in the lateral directions (see Figure 3-2): 39 0 2 C0@ apx pX+2 9py + 2; cpy p + wp, 2 py = a V1 (7) =a (8) V2 For each of these equations, V,and V2 are the voltages applied to the piezoelectric tube segments, a and a are the gains for each degree of freedom, op.and 4'o are the damping ratios of the system for the first vibration mode, and opx and wP, are the natural frequencies of the first vibration mode. The simulation discussed in this chapter has been written with the assumption that the AFM is going to be operating in contact mode instead of tapping or some other operation mode. While it is sometimes more appropriate to run the AFM in tapping mode when trying to image an object, this type of operation would needless complicate the simulation by requiring the addition of more degrees of freedom and possibly higher modes of vibration in the dynamic model. In a similar vain to prevent needless complication, the following simplification of the interaction forces between probe tip and the sample surface was employed. As discussed in section 3.5, the main interaction force on the probe tip in the lateral direction is friction. The friction is proportional to the shear strength at the interface and the contact area between the tip and the sample. Because this simulation is being conducted in contact mode, the forces in the vertical direction should also be constant (see section 3. 2 for a more complete explanation of contact mode). From Hertzian contact theory, the contact area between a flat plane and a spherical object, like the probe tip, if a function of the normal force between the objects. Because the force in the vertical direction is constant in this case, so is the contact area between the tip and the sample. Therefore, the interaction force in the lateral direction can be modeled as a constant friction force throughout the simulation. 40 5.3 Simulation Design This section presents the process of how the simulation in this paper was conceived, developed, and implemented. The technical aspects of the simulation, including the organization and implementation, will be discussed as well as how the simplification and assumptions discussed were incorporated into the simulation. Finally, this section will conclude with a brief explanation of why the simulation was created and what can be learned from the results. 5.3.1 Technical Aspects of the Simulation Design The simulation of the tip steering method proposed in this paper was designed and run on Mathwork's Matlab. The process of scanning a sample's topology was simulated by creating a matrix to represent the topology of the area, where the and X and Y coordinates are represented by the column and row values of the matrix and the vertical height of the surface is represented by the numerical value in the position in the matrix correlating to is location on the surface. For example, if the surface caused the AFM probe move by 5 nanometer at position X = i and Y = j based on some reference point, then the entry in the i h column and jth row would also be 5 nanometers. This approach to simulate the topology was taken because it allows for the scanning process to be imitated naturally. In order to simulate the information the control system would receive regarding the vertical displacement from one scan line, it simply needs to read each value of a row of the matrix in order. The sample surface was created by creating a matrix of the appropriate dimension, filling all of the entries initially with values of zero, corresponding to an atomically flat surface, and then superimposing an object representing a DNA strand over the atomically flat surface. This object was created to resemble a DNA strand deposited on a mica surface. The shape of the object is a sinusoidal wave with a small amplitude relative to its length. Due to scanning limitation errors present in the real AFM system, the cross section of the DNA strand was modeled to resemble an upside-down parabola instead of a cylinder. 41 Figure 5-1: An image of a strand of DNA created by an Atomic Force Microscope. Due to scanning limitations, the cylindrical cross section of the DNA resembles a parabola in the image. The scale bar in this image is 500 nm [241. The simulated tip steering method first scans through each line of the matrix, starting from the first row, until it finds a topological shape that resembles the object of interest, a cross section of a strand of DNA. Once the DNA has been found, the algorithm determines a raster-like trajectory that follows the centerline of the strand, as outline in chapter 4. 42 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -----------I ---------- -- - -- J I ....... -- ----------- : ------------- : ........ I ........ A .........I , Figure 5-2: This plot shows a tip steering trajectory determined by the algorithm outline in chapter 4. The blue line represents an object of interest, a strand of DNA for example, and the red line represents the raster-scan trajectory that the tip will be commanded to follow. The simulation then converts the trajectory into discrete points and simulates the movement of AFM system through each of these points. The dynamics of the AFM system were calculated with Matlab's ordinary differential equation (ODE) solvers and the first order dynamic model of the AFM discuss above. In order to force the tip to maintain the desired trajectory specified by the trajectory-determining algorithm, an adaptive control was implemented on the simulated system. The adaptive control system used in this paper is from chapter 8 of [9]. The applied voltage is determined by the following control law: Kd s V = Y- (9) Where V is the voltage applied to the piezoelectric actuator, Y a is the product of two vectors that define the system in equations (7) and (8). K,d is a proportional gain and i is an approximation of the uncertain parameters of system defined in equations (7) and (8). This approximation is updated with the following adaptive law: 43 = -PY S (10) Where P is a constant and s is defined by the following equation: S= ( Where - des)+ (T - des) (11) is a vector composed of the two degrees of freedom of the system described in equations (7) and (8), ,es, is the desired trajectory defined by the tracking algorithm, and A is a constant coefficient. The following figure explains the tip steering method simulated in this paper. The user inputs the dimensions of the desired object as well as the resolution and scan width. The tracking algorithm takes these setting as well as the vertical topology data from the PSD sensor in order to create a desired tip trajectory. The control system then takes the desired trajectory and the current bending angles of the piezoelectric tube and calculates command voltages for the piezoelectric actuator. These voltages cause the piezoelectric tube to bend in the lateral direction, thus resulting in a displacement of the probe tip in the lateral direction. The displacement of the tip can be calculated from the product of the bending angle and the length of the piezoelectric tube, L, using the small angle approximation. This approximation is valid because the bending angle is less than a hundredth of a degree. The new lateral position of the tip causes the vertical position of the probe to change as a result of the varying sample topology. This new sensor data is fed back into the tracking algorithm. In the simulation presented in 5.4.2, noise was added direction to the topology measurement in order to test the robustness of the tracking algorithm. The tracking algorithm used in this simulation works by creating a desired tip trajectory based on the position of the sample. In order to simplify the implementation, only the X position of the probe tip was actually steered along the object. Instead of steering the probe tip in both degrees of freedom, the Y position was increment every scanline by a constant value that was a function of the desired scan resolution. Also, the angle of the probe's Ytrajectory did not change relative to the scanning surface. 44 Z (PSD sensor feedback) Figure 5-3: A block diagram of the tip steering method proposed in this paper. The user specifies the imaging parameters, and the tracking algorithm and the control system determine the path of the probe tip from the topology information for the sensor. Noise is added to the feedback signal in some of the simulations in order to test the robustness of the system to measurement noise. 5.3.2 The Goal of the Simulation The goal of the tip steering simulation created for this paper was to demonstrate that the tip steering method is able to track an object and to test the method with a model that emulates the dynamics of an AFM system. While it is important to discuss the feasibility of a control system in a theoretical framework, it is essential to also simulate or implement and test the system to ensure that it will operate how it was design to operate. In the case of this tip steering method, it is outside of the scope of the paper to actually implement the control system in an actual AFM system. This is because the technical elements required to implement the system, including new hardware, signal processing, software creation and modification, and the biochemistry associated with preparing the DNA, would consume a great amount of effort without adding significantly to the findings of this paper. The following chapter will discuss implementation in more detail. Despite only testing the tip steering method in simulation instead of an experimental trial, there is a still a great deal that can be learned. By creating a simulation, the proposed method was reviewed in much greater detail and the various challenges that arose when implementing the method on a computer were addressed and 45 resolved. Also, through creating a simulation, a deeper understanding of the various issues associated with implementing a control algorithm on a real AFM system were discovered and addressed. Finally, the process of creating a simulation allowed the method to be tested quickly in a variety of situations with a range of different parameters. Instead of taking hours or days to prepare different samples and to adjust the AFM hardware and software, it took minutes to adjust the various simulation parameters to simulate completely new experimental scenarios. 5.4 Simulation Results The following section presents the results of the tip steering simulations presented above. Three different simulation results dare presented: the results of the trajectorydetermining algorithm in the idealized case, the results of the same algorithm in the presence of simulated noise in the vertical feedback data, and the simulation of the AFM system following the trajectory determined by the same method. At the end of each section that presents a specific simulation's results, a discussion of the results will be presented. 5.4.1 Tracking Algorithm The following image is a plot of the tip steering trajectory found with the algorithm described in Chapter 4. The centerline of the object was tracked by the algorithm, and the resulting trajectory was created with a scanline width specifically chosen for this scanning application. 46 Figure 5-4: A plot of a tip trajectory that was determined by the algorithm described in chapter 4. This method tracked the sample object and created a tip steering trajectory that follows the object's centerline. ..~.~...~......... ~.~.~.~~.~.~. .... .... .... .... ~..... ....'.... ------;--------i--~~------------------------------:- - - - - ------ -...._ I------)--------i--------i--------:--~lI-----~ . I ·-,~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~, 7~~ -~:'~-C = -;-~----------------------: ~-------4. "--- Figure 5-5: A plot of a tip trajectory determined when the scan resolution is less crucial. Note how each scanning line is spaced a greater distance apart, thus improving the scanning speed while decreasing the scanning resolution. 47 --------............... ~ .................................................. | I ................ I I ------------- I I I ~,1~--,--1 ; I r I I I I r , ; T I I I I I I I I I I I I* I ! i I I | I --- |~ I . | I I , |L I I I I I I _ I I _ I I I I I I I I I I I _ I I I I _ I I I I I I I _.__._ i _.__.._._ JI 'i_ . _. _ i I _ _ _ __._.._.__..! i I _ __.__._.._.._ i , I I I I I I I I I I I I I I I I i I i I I I I I I I I I I I I I I I I i _.._.__._..L I I I I I I I _ _, I l _ I _ _ I I I I I _ l I | _ , I I I _ I .i ~. . C~. . ...... _....;._....i [ I I _ _ I I I _......__ ~ I I I I I I , i __.__._.._._F I _.._.__._.._J i I I .._.__._.._. _.__._.._.__d i Figure 5-6: A plot of a tip trajectory when resolution quality is important. Notice how the scan lines are so closely spaced that the tip trajectory appears on the plot to be a solid line. While this scanning process creates an image of much higher resolution than the two previous figures, it also requires a correspondingly longer time to create the image. 5.4.2 The Effect of Noise In order to test the robustness of the search algorithm to the presence of noise in the measurement, in this simulation random noise was added to each reading. The noise was simulated by added a random value between a specific range to each of the vertical high values available to the trajectory determining algorithm. This type of background noise is a serious issue when trying to image extremely small objects, like single molecules like DNA. 48 -- - - - - - - - --- ------ - - --------- ------ -...... . ......... ----------- ~ ~~~~~~~~~~~~~~'~l ~~~~~~~~~-------------------------- ----------------------------- ---------- - - --------------- ,~------ . ......... -------------- '... ------------------- . .............. .. - -........ . ..... .------- ------------- - -- --- --- ---- --- -- --- ------- - - - - - - - - -~- - - - - ........ '~~~~~C ;r ... ~.~~_~~~~.~.. ... ---------'-- - --------------------- ....... ~.... .!......i...... -- -- -- -- - -- -- -- --- -- ---..... ---- ----------- ---------- ----------- ---------- ----------- - i - - - - - Figure 5-7: A plot of the tracking system determining a trajectory in the presence of noise. Single raster scan lines were plot to show how the noise can affect how the system determines the position of the sample during each scan. The random noise included in this example was up to 65% of the simulated objects tallest feature. ri~~r :- = -------------------49 ~ ~~~ .- = - - -,-- - - - -- --- -... :------ - - - - - - - - - - - - - - - ----- - ------- - ------ - _ ------ ---_---------- --- -- - - - - - - - -- - - - - - - ------- ------------------ Figure 5-8: A plot of a case when the tracking system is unable to determine a trajectory due to the quantity of noise present. In this case, the noise added to the vertical feedback was as large as 80% of the tallest feature on the object. The search method was able to find the sample object and track it even in the presence of noise. In the scanning case shown in Figure 5-7, there was random noise added to each measurement of a value up to 65% of the tallest sample object feature. In the simulation plotted in Figure 5-8, however, the tracking algorithm was not able to compensate for the quantity of noise present in the feedback signal. The tracking system could deal with an even greater amount of noise if a noise-reduction signal processing method was introduced into the control system. 5.4.3 Simulation with Dynamics and Interaction Forces The following simulation tested the ability of the tip to follow the trajectory determined by the tracking algorithm tested above. This simulation included the dynamic model and interaction forces discussed in Chapter 4. The simulation could not be run in real time due to the technical limitations of the Matlab software, but it would clearly take less time than a standard AFM scanning process because of the drastically reduced area that needs to be scanned. 50 Figure 5-9: This plot is a superposition of the trajectory determined by the tracking method in section 5.4.1 and the actual motion of the tip. The red line, the trajectory in Figure 5-3, is obscured by the blue line, the actual tip position. Figure 5-5 is a plot of the results of this simulation. Using an adaptive control, the probe tip is able to very accurately follow the trajectory determined in section 5.3.1, plotted on the Figure in red. This demonstrates that if the tracking algorithm is able to successful find and track the sample object, then the control system will be able to steer the tip along that trajectory. 5.5 Summary This chapter presented a description as well as the results of the simulations used to test the tip steering method outlined in chapter 4. The assumptions and simplification employed in the simulation were first discussed, followed by a description of the design of the simulations and an explanation of what they can teach about the tip steering methods. Finally, the results of the tip steering method simulation were presented along with a discussion of the results. 51 Chapter 6 Conclusion 6.1 Introduction This chapter summarizes the tip steering method presented in this paper as will as the results of simulation of the method. Possible applications of the control algorithm and the technical steps required to implement method will be discussed. Also, a suggestion for new uses of tip steering methods are presented as well as how this tip steering method can advance research fields that previously did not utilize the AFM as a research tool. Lastly, possible next steps and future work in this research field will be discussed. 6.2 Applications of the Tip Steering Method This paper has presented a new tip steering method for the Atomic Force Microscope. The method uses the dimensions of the sample object and the topology feedback information from the PSD sensor to determine a trajectory and steer the probe tip along that trajectory. After the object of interest have been found on the sample surface with one of the various possible search methods, the probe is steered in a rasterlike path along that traces the object. The length and spacing of the scan lines is specific by the dimensions of the object being scanned and image resolution necessary for the each specific imaging task. The position of the of the tip raster scanning is kept centered on the object as it progresses along the object by using the topographical information from the vertical position sensor to adjust the center of the raster scan so that is matches the center of the object. 52 The simulations presented and discussed in chapter 5 demonstrated that the tip steering method proposed in this paper is able to successfully create a trajectory for an AFM probe that tracks an object of interest. It was shown that the algorithm was able to track an object, create a trajectory, and steer the tip of the AFM probe along that trajectory. These results have prove that the system is a feasible technique for steering an AFM tip and that is should next be implemented in a real AFM system so that the method can be tested in a controlled experiment. 6.2.1 Implementation The next step in this research direction is to implement the tip steering method discussed in this paper in a real system. This would require that the control software currently used to control the lateral position of the AFM probe would have to be completely rewritten to allow for the vertical information to influence the path planning of the tip in the lateral directions. Also, a user interface would have to be created in order to permit the AFM operate to input the type of object being imaged as well as a new way to output the new and highly focused topology or force information that the AFM would produce because of the method. Due to the sensitivity required to track very small objects like strands of DNA, the AFM hardware might also have to be modified keep the imaging surface even cleaner and less disturbed than current AFM isolation chambers allow. Finally, it would be very useful if it were possible to introduce displacement sensors for the piezoelectric actuator in also the lateral positions. This would allow the AFM control system to receive some amount of sensor feedback in the X and Y positions, thus helping the system better follow the trajectory specified by the tip steering control system. 53 6.2.2 Possible Applications Successful integration of the software and hardware require to make this method a reality could have a create impact on a number of research and industry areas. For example, nanotechnology industries that manufacture processors, digital media, and micro-electrical and mechanical systems (MEMS) could use this tip steering method for quick and efficient quality assurance of their products. The method could also be used to exam nanoscale structures, like carbon nanotubes, in a much faster and efficient way to ensure that the objects are being manufactured correctly in real time during production. Finally, this tip steering could help make the proposed plan to sequence the human genome with the AFM a reality [8]. This is because current AFM technology does not allow for the probe tip to exactly follow a DNA strand, a required step to facilitate recording the sequence of nucleotides in the correct order. 6.2.3 New Applications There are research areas that have not been a viable application of the AFM as a measurement tool due to the technical limitations of the device. There is a possibility that the successful implementation of the tip steering algorithm could allow the AFM to be used previously impossible tasks. For example, a probe tip that can track an object could be used to inspect or even generate microfluidic or nanofluidic channels. Another interesting application that might become possible as a result of this tip steering algorithm is the imaging of moving objects at the nanoscale. There are a number of biological molecules that are 100 nanometers of less in diameter, including cell cilia, channels and pores in the various cell membranes, and most viruses [15]. A great deal could be learned about the structure and operation of these molecules if they could be imaged with an AFM. Besides the issues with associated with imaging an organic and sensitive molecule, the challenge of how to track and scan a mobile and possibly active object with the AFM probe is current not addressed in a standard AFM system. With slight adjustments to the parameters of the tip steering method outlined in this paper, it 54 might be possible to image moving biological objects. This ability could have a great impact on the way cellular biologists and biological chemists investigate a cellular organelle or a molecule. Perhaps the most exciting application that tip steering of an AFM could make a reality is the use of the AFM as a fabrication device. The AFM is an essentially a device that can adjust the position of a probe tip by very small amounts, less than a single nanometer. If a tip steering method cold be developed to instruct the AFM not only how to track an object, but how to perform exact and repeatable movements, then it could become a very useful tool in the field of nanoscale manufacturing and single cell chemistry. For example, an AFM with a functionalized tip could be instructed to pick up and deposit single DNA nucleotide in a controlled manner. This development could result in a rapid and efficient way to make custom strands of DNA, which can then be replicated in a standard large-scale DNA reproduction process like the polymerase chain reaction (PCR). 6.3 Future Work While this paper has demonstrated in simulation that tip steering is a viable method for efficiently scanning certain types of samples, there is still a great deal of work the remains to be done in this field. One of the most critical steps that have not been taken yet is to implement the tip steering method on an actual AFM system. This is not a trivial task because of all of the required programming, sample preparation, and signal processing that it would require. Also, each specific application of tip steering would require a customized control system and adjustments to the AFM scanning process. For example, the sequencing of DNA requires that the probe tip be functionalized with a DNA nucleotide and that the control system to monitor the probe tip forces as opposed to displacements [8]. In addition to undertaking the challenge of implementing the method, there are a number of areas that could generate interesting research. 55 These areas include the development of better tip steering methods and the development of new hardware to aid in the process of AFM imaging. 6.3.1 Better Tip Steering Methods The tip steering method proposed in the paper is able to successfully tack stringlike objects on a simulated sample surface, but little work has been done to create a method that is able to track an object that loops over on itself and takes a complex trajectory. For example, a strand of DNA deposited on an atomically flat surface may curl up into a tangled ball if the experimental conditions are not correct [8]. A tip steering method that had the intelligence to tell where it came from and where it was going would be helpful in imaging objects with complex orientations. Also, if the method was able to discern two different objects of the same dimensions, this would allow the AFM to track objects even if they are very closely packed or overlapping. 6.3.2 New Devices and Research Directions The tip steering method proposed in this paper is designed to work with the current AFM system. It is essentially a way to use the limited feedback information to control the position of the AFM tip in the lateral directions. It the AFM hardware was modified or added to, however, the tip steering method could be adapted to complete more challenging and complex tasks. For example, if two additional photosensitive diode (PSD) sensors were added to the AFM, then some amount of position feedback information could be available to the control system that will allow for more precise position control of the AFM tip in the X and Y directions. This modification could allow the AFM to run systematic searches of a sample for a particular object, create virtual or real reference points so that it can return to a position of interest later, or even manipulate the position of objects on the sample surface. These future research directions hold a great deal of promise for the fields of nanotechnology and nanoscale imaging. 56 Acknowledgments: I would like to thank Dan Bums and Dr. Youcef-Toumi for their help and guidance over the last six months. I would not have been able to achieve so much this year if not for them. I would also like to thank the rest of the Mechatronics Research Lab, Pablo Valdivia Y Aldvarado and Vijay Shilpiekandula, for their assistance and patient. Finally, I would like to thank my family and my girlfriend Jess for their support during this very hectic and stressful time. 57 Bibliography: [1] Chen X., Devenathan R., Fong A. M., Advanced Automation in Adaptive Material Processing, World Scientific Publishing Co, Singapore, 2002. [2] Cook G. E., et al. "Electronic Arc Sensing For Robot Positioning Control", Robotic Welding, edited by J. D. Lane, IFS Ltd, Bedford UK, 1987 [3] Gill M. A. C., Zomaya A., Obstacle Avoidance in Multi-Robot Systems, World Scientific Publishing Co., Singapore: 1998. [4]Anderson S. B., Park, J., "Tip Steering for Fast Imaging in AFM", 2005 American Control Conference, June 8-10, Portland OR. [5] G. Binnig, C. F. Quate, and C. Gerber. Atomic force microscope. Physical Review Letters, 56(9):930-933, 1986. [6] O. M. El-Rifai, and K. Youcef-Toumi. "Dynamics of Atomic Force Microscopes: Experiments and simulations", IEEE Conference on Control Applications, Scotland, September 2002. [7] El-Rifai, O. M. and Youcef-Toumi, K. (2001) "In-Contact Dynamics of Atomic Force Microscope." 2001 IEEE/ASME International Conference on Advanced Intelligent Mechatronics Proceedings, Como, Italy, 6-12 July 2001. [8] Burns, D. J. "On Single-Molecule DNA Sequencing with Atomic Force Microscopy using Functionalized Carbon Nanotube Probes". Master's thesis, Massachusetts Institute of Technology, 2004. [9] Slotine, J.-J. E. and Li, W., Applied Nonlinear Control, Prentice-Hall, New Jersey, 1991. [10] Wikipedia, Piezoelectricity, < http://en.wikipedia.org/wiki/Piezoelectricity>. [11] E. T. Thostenson, Z. F. Ren, and T. W. Chou. Advances in the science and technologyof carbon nanotubesand their composites:a review. CompositesScience and Technology, 61(13):1899-1912, 2001. [12] S. S. Wong, E. Joselevich, A. T. Woolley, C. L. Cheung, and C. M. Lieber. Covalentlyfunctionalizednanotubesas nanometre-sizedprobes in chemistryand biology. Nature, 394(6688):52-55, 1998. [13] T. Boland and B. D. Ratner. Direct measurement of hydrogen-bonding in dna 58 nucleotide bases by atomic-force microscopy. Proceedings of the National Academy of Sciences of the United States of America, 92(12):5297-5301, 1995. [14] El-Rifai, O. M., "Modeling and Control of Undesirable Dynamics in Atomic Force Microscopes". PhD thesis, Massachusetts Institute of Technology, 2003. [15] Wikipedia, Cell Biology, <http://en.wikibooks.org/wiki/Biology Cell biology Introduction Cell size>. [16] A. M. Homola, J. N. Israelachvili, M. L. Gee, and P. M. McGuiggan, Measurements of and RelationBetween the Adhesion and Friction of 2 Surfaces Separatedby Molecularly Thin Liquid-Films, Journal of Tribology, Vol. 111 (4), pp.675-682, 1989. [17] El-Rifai, K. "Control of AFM in Contact Modes". Master's thesis, Massachusetts Institute of Technology, 2002 [18] S. S. Ge, Y. J. Cui, New Potential Functions for Mobile Robot Path Planning, IEEE Transactions on Robotics and Automation, Vol. 16, No. 5, October 2000. [19] Y. Yeo, B. D. Aumond, K. Youcef-Toumi, Precision Atomic Force Microscope Imaging, IEEE Signal Processing Proceedings, 2000. [20] Robotic Arc Welding, <http://www.robot-welding.com/robot arc welding.htm>. [21] D. Janglova, Institute of Informatics, Slovak Academy of Sciences, <http://www.ui.savba.sk/mobsys/>. [22] Image taken by the Cambridge University Department of Pharmacology. (Link unavailable) [23] The HI'RES AFM probe made by MikroMasch have a typical probe tip radius of curvatures of Inm. < http://www.spmtips.com/products/cantilevers/datasheets/hi-res/> [24] A. T. Woolley and R. T. Kelly. Deposition and characterization of extended singlestranded dna molecules on surfaces. Nano Letters, 1(7):345-348, 2001. 59 Appendix A Matlab Code for the Tracking Algorithm %path determining W/ Qd w/ time %Sam Kesner %used to determine size of array used in the real thesis simulation clear clc size=le2; %size of initial scan tdna =1; %Dna thickness z_dna =1; %dna thickness is approx 1nm halfwidth =2*t_dna; %how wide of an area to scan s=zeros(size); amp =5 freq =12; for i=size/1 0:(0.75*size) s(i,i+round(amp*sin((i-size/1 O)*(pi/freq))))=z_dna; s(i+1 ,i+1+round(amp*sin((i-size/1 O)*(pi/freq))))=0.5*z_dna; s(i-1 ,i-1+round(amp*sin((i-size/1 O)*(pi/freq))))=0.5*zdna; s(i+2,i+2+round(amp*sin((i-size/1 O)*(pi/freq))))=0.25*z_dna; s(i-2,i-2+round(amp*sin((i-size/1 O)*(pi/freq))))=0.25*z_dna; end %initialize variables dt =.1; % the time increment for integration dist =1; % how far the probe move each increment vel =dist/dt; %prob velocity 60 time =0; time_end =0; count =1; start =size/10; center =size/1 0; linecount =start; linesearch=s(:, 1)+1 00; for j= 1:size traj(j,3)=j; end %also an if instead of a while while center <=(0.9*size) %linecount <= (0.75*size) for j=(center-halfwidth):(center+halfwidth) linesearch(j)=abs(s(linecount, j)-z_dna); %copies the scanned area into an array end %add the scan end points to the new trajectory traj(linecount,1 )=(center-halfwidth); %defines the start of the scanline traj(linecount,2)=(center+halfwidth); %defines the end of the scanline %determine qd while (time-time_end) <= ((2*halfwidth+l )/vel) %this makes sure that the probe moves along the specified scan length %creates the qdx and qdy point for every time it runs; qdx_set = vel*(time-time_end) + (center-halfwidth); qdy_set = linecount; %for testing plots qdxplot(count) = qdx_set; qdyplot(count) = qdy_set; %increments 61 time = time+dt; count = count + 1; end %resets the values for next run timeend = time; %solve for new center smallest_val =min(linesearch); %solves for the smallest value in the line for j=(center-halfwidth):(center+halfwidth) if linesearchO)==smallest_val centernew=j; end end %update the center of the scan center_dot =center_new-center; center linecount =center+center_dot; =linecount+l; %increments the line linesearch=s(:,1)+100; %resets the linesearch end figure; for i=1 :size line([traj(i,1), traj(i,2)], [traj(i,3), traj(i,3)]); end hold plot(qdxplot, qdyplot, 'r*') grid 62 Appendix B Matlab Code for the Dynamic Simulation %Samuel Kesner % thesis simulation w/ time-indep model %using Adapive control %ASSUME: that scan is perfect in the Z direction clear; close all; clc; global dt; global t_final; global t_dna; global zdna; dt =1e-6; t final =0.25; =[O:dt:t_final]; t_span size=1 e2; %size of initial scan t dna =1; %Dna thickness z dna =1; %dna thickness is approx halfwidth =2*t dna; %how wide of an area to scan nm s=zeros(size); amp =5; freq =12; 63 for i=size/1 0:(0.75*size) s(i,i+round(amp*sin((i-size/l O)*(pi/freq))))=z_dna; s(i+1,i+1 +round(amp*sin((i-size/1 O0)*(pi/freq))))=0.5*z_dna; s(i-1 ,i-1 +round(amp*sin((i-size/l O)*(pi/freq))))=0.5*z_dna; s(i+2,i+2+round(amp*sin((i-size/1 0)*(pi/freq))))=0.25*z_dna; s(i-2,i-2+round(amp*sin((i-size/1 0)*(pi/freq))))=0.25*z_dna; end %initialize variables dt =.1; % the time increment for integration dist =1; % how far the probe move each increment vel =dist/dt; time =0; timeend count start center %prob velocity =0; =1; =size/10; =size/1 0; =start; linecount linesearch=s(:,1)+1 00; for j= 1:size traj(j,3)=j; end %also an if instead of a while while center <=(0.9*size) for j=(center-halfwidth):(center+halfwidth) linesearch(j)=abs(s(linecount, j)-z_dna); %copies the scanned area into an array end 64 %add the scan end points to the new trajectory traj(linecount,1 )=(center-halfwidth); %defines the start of the scanline traj(linecount,2)=(center+halfwidth); %defines the end of the scanline %determine qd while (time-time_end) <= ((2*halfwidth+l )/vel) %this makes sure that the probe moves along the specified scan length %creates the qdx and qdy point for everytime it runs; qdx_set = vel*(time-time_end) + (center-halfwidth); qdy_set = linecount; %for testing plots qdxplot(count) = qdx_set; qdyplot(count) = qdy_set; %increments time = time+dt; count = count + 1; end %resets the values for next run time_end = time; %solve for new center smallest_val =min(linesearch); %solves for the smallest value in the line for j=(center-halfwidth):(center+halfwidth) if linesearch(j)==smallest_val center_new=j; end end %update the center of the scan center_dot =center_new-center; center linecount =center+center_dot; =linecount+l; %increments the line linesearch=s(:,1)+100; %resets the linesearch 65 end save qdxplot.mat save qdyplot.mat %ode solver zeromatrix initialvalues =(zeros(12)); =zeromatrix(:,1 ); [t, y]=ode45('AFMsys_odefun3',t_span, initialvalues'); %produces the output figure(1 ); subplot(2,2,1) plot(t, y(:,1)) ylabel('qx') xlabel('time') grid subplot(2,2,2) plot(t, y(:, 2 )) ylabel('qy') xlabel('time') grid subplot(2,2,3) plot(t, y(:,3 )) ylabel('qx_dot') xlabel('time') grid subplot(2,2,4) plot(t, y(:, 4 )) ylabel('qy_dot') xlabel('time') grid 66 figure(2); plot(y(:,1), y(:,2)) xlabel('qx') ylabel('qy') grid figure(3) plot((qdxplot.*1 e-9), (qdyplot.*1e-9), 'r') grid figure(4) plot((qdxplot.*1 e-9), (qdyplot.*1e-9), 'r') hold plot(y(:,1), y(:,2)) xlabel('qx') ylabel('qy') grid title('overlay of predicted and simulated trajectories') function state_dot=AFMsys_odefun(t, state) %desired position load qdxplot.mat load qdyplot.mat %decides what point to go for index = (round((t/tfinal)*412)+1); qdx =1e-9*qdxplot(index); qdy =1e-9*qdyplot(index); qdx_dot =0; qdy_dot =0; 67 qdx_ddot =0; qdy_ddot =0; qd =[qdx; qdy]; qd_dot =[qdx_dot; qdy_dot]; qd_ddot =[qdx_ddot; qdy_ddot]; %variables qx = state(1); qy = state(2); qx_dot= state(3); qy_dot= state(4); q = [qx; qy]; q_dot = [qx_dot; qy_dot]; % parameters to be used in adaptation a_hat = state(5:10); q_tilda =state(11:12); %system variables omega_x = 480; omega_y = 480; zetax = 0.1; zeta_y = 0.1; k x =40; k_y = 40; %approximate friction force fx= le-4; fy= le-4; %system equation matrix entries 68 M =[10; 0 1]; C = [2*zeta_x*omega_x 2*zeta_y*omega_y]; 0 K = [omega_x2 0 G 0; 0; omega_yA2]; = [k_x0; 0 k_y]; F =[fx; fY]; %control system variables (adaptive) %VARY THESE TO CHANGE THE SIMULATION SPEED Lambda P Kd = 1 0000*eye(2); = 10*eye(6); = 10000*eye(2); =q-qd; q_tilda =q_dot-qd_dot; q_tilda_dot qr_dot qr_ddot s =qd_dot-Lambda*q_tilda; =qd_ddot-Lambda*q_tilda_dot; =q_tilda_dot+Lambda*q_tilda; % build the Y matrix Y1 = qr_ddot(1); Y12 = 0; Y13 = qr_dot(1); Y14 = 0; Y15 = q(1); Y16 = 0; Y21 = 0; 69 Y22 = qr_ddot(2); Y23 = 0; Y24 = qr_dot(2); Y25 = 0; Y26 = q(2); Y = [Y11 Y12 Y13 Y14 Y15 Y16; Y21 Y22 Y23 Y24 Y25 Y26]; % build the control law V = Y*ahat - Kd*s; % build the adaptation law ahatdot =-P*Y'*s; % differential equations to solve q_ddot = (-C*q_dot - K*q + V ); %-F); state_dot=[q_dot; q_ddot; a_hat_dot; q_tilda_dot]; 70