AFM Target Point Localization Trajectory Planning System and Method Based on Deep Learning
Through the AFM target point positioning system based on deep learning, the problem of inefficient positioning accuracy and efficiency of traditional AFM technology at the micro-nanoscale scale is solved, and high-precision micro-nano-scale target point positioning and comprehensive sample mechanical detection are achieved.
Patent Information
- Application Number
- CN202510048996.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-13
- Publication Date
- 2025-06-13
- Estimated Expiration
- 2045-01-13
AI Technical Summary
Traditional AFM target point positioning technology is difficult to achieve precise control at the micro-nanoscale, and is subject to noise interference and insufficient path planning strategies, resulting in low positioning accuracy and efficiency, which cannot meet the needs of high-precision nanofabrication and biological nanostructure research.
The AFM target point positioning trajectory planning system based on deep learning is adopted, combined with the AFM scanning module, image segmentation module, path planning module, deep learning model module, trajectory comparison module, positioning control module and mechanical detection module, the positioning trajectory is predicted through the deep learning model, and precise positioning is achieved through trajectory comparison and feedback control.
It improves the positioning accuracy and efficiency of AFM at the micro-nano-scale target points, overcomes the problem of inaccurate positioning of traditional methods at the micro-nano-scale, and provides a more comprehensive sample mechanical detection capability.
Smart Images

Figure CN119567271B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of nanomanipulation technology, and specifically to an AFM target point positioning trajectory planning system and method based on deep learning. Background Art
[0002] At present, with the booming development of nanotechnology, the application of atomic force microscopy in the field of micro-nano target point detection and positioning has become increasingly crucial. However, traditional positioning technologies face many dilemmas.
[0003] At the micro-nano scale, the surface topography of the sample is complex, and the displacement movement of the target point is difficult to accurately control. On the one hand, the image segmentation process is vulnerable to noise interference, resulting in inaccurate recognition of the sample area; on the other hand, the path planning lacks an efficient strategy and it is difficult to balance the requirements of the optimal path and obstacle avoidance. Moreover, traditional methods rely on manual experience or simple algorithms and are difficult to cope with complex and variable sample characteristics and environmental factors, leading to low positioning accuracy and efficiency, and unable to meet the urgent needs of precise positioning of micro-nano target points in fields such as high-precision nanomanufacturing and biological nanostructure research, becoming a bottleneck for the further development of nanomanipulation technology.
[0004] To solve the above problems, the present invention proposes an AFM target point positioning trajectory planning system and method based on deep learning. Summary of the Invention
[0005] The purpose of the present invention is to provide an AFM target point positioning trajectory planning system and method based on deep learning to solve the problems raised in the prior art.
[0006] To achieve the above purpose, the present invention provides the following technical solutions:
[0007] An AFM target point positioning trajectory planning system based on deep learning includes an AFM scanning module, an image segmentation module, a path planning module, a deep learning model module, a trajectory comparison module, a positioning control module, and a mechanical detection module; the AFM scanning module is used to scan the original topography image; the image segmentation module is used to process the image obtained by the AFM scanning module; the path planning module is used to generate several original paths from the starting point to the target point for the target point determined based on the image segmentation module; the deep learning model module is used to predict the positioning trajectory according to the input original path; the trajectory comparison module is used to compare the original path and the predicted trajectory output by the deep learning model module; the positioning control module accurately positions the target point through a feedback control mechanism based on the difference information obtained by the trajectory comparison module; the mechanical detection module is used to obtain and process and analyze the mechanical related data of the target point after the target point positioning is completed.
[0008] The AFM scanning module includes a probe driving unit, a signal detection and conversion unit, and a scanning parameter setting and control unit;
[0009] The probe driving unit controls the probe of the atomic force microscope to perform point-by-point scanning on the sample surface according to a preset scanning path and speed through a motor driving device, so as to obtain complete topographic information of the sample;
[0010] The signal detection and conversion unit is responsible for detecting the physical signals generated by the interaction between the probe and the sample surface and converting them into electrical signals;
[0011] The scanning parameter setting and control unit is used to set and adjust various parameters of the AFM.
[0012] The image segmentation module includes an image preprocessing unit, a feature extraction unit, and a segmentation algorithm execution unit;
[0013] The image preprocessing unit performs preliminary processing on the original image obtained by AFM scanning, and uses a median filtering algorithm to remove the noise in the image and improve the image quality;
[0014] The feature extraction unit, according to the gray distribution and texture features of the image processed by the image preprocessing unit, draws a gray histogram, and combines the gray level co-occurrence matrix method to extract image features and separate the image features from the background;
[0015] The segmentation algorithm execution unit calculates the gray features of the image through the gray level co-occurrence matrix, and analyzes the distribution of gray levels and texture information; when the image is within a preset gray interval, the gray difference between the sample and the background exceeds a preset difference threshold, and shows a concentrated distribution trend. At this time, the segmentation algorithm execution unit sets a threshold according to the above analyzed gray information, and then judges each pixel in the image, determines the pixels with gray values greater than the threshold as sample pixels, and the pixels with gray values less than the threshold as background pixels; then uses the threshold segmentation algorithm to segment the image and separate the sample area from the background.
[0016] The path planning module includes an environment modeling unit, a path search unit, and a path optimization unit;
[0017] The environment modeling unit receives the image data and measurement information from the AFM module. For each sampling point on the sample surface, it records its three-dimensional coordinates, identifies the contour and features of the sample through a point cloud data processing algorithm, converts this information into a geometric shape representation in the environment model, and at the same time marks the positions of obstacles affecting the probe movement, and constructs a virtual environment model containing complete information of the sample surface;
[0018] The path search unit determines the starting point and the target point based on the environmental model constructed by the environmental modeling unit, performs path search using the A* algorithm, marks the distance of the starting point as 0, and marks other points as infinity. Then, starting from the starting point, it searches for the point adjacent to the current point with the minimum distance and updates its distance value. The above process is repeated until the target node is found;
[0019] The path optimization unit optimizes the original path obtained by the path search unit. The optimization contents include path length, smoothness, and obstacle avoidance. For the path length, the Euclidean geometric distance between adjacent two points on the path is accumulated to obtain the path length, and the shortest path is evaluated. For the smoothness optimization of the path, a curve fitting algorithm is adopted. The key points on the original path are used as the control points of the fitting curve, and a smooth curve is generated through calculation as the optimized path. For the obstacle collision optimization, the collision points between the path and the obstacles in the environmental model are checked, and then by adjusting the positions of the path points, the local path is re-planned to avoid obstacles.
[0020] The deep learning model module includes a data preprocessing unit, a neural network architecture unit, a model training unit, and a prediction output unit;
[0021] The data preprocessing unit cleans and normalizes the data input by the path optimization module, and performs random rotation, translation, and scaling transformation operations on the original path data to increase the diversity of the training data;
[0022] The neural network architecture unit is used to construct a neural network structure suitable for the AFM processing and positioning trajectory planning task, extract data features and make predictions. A recurrent neural network is adopted, and the historical trajectory and the original path are used as time series inputs. Through the recurrent structure, the dynamic relationship between them is learned, and the time-dependent information in the path planning is captured;
[0023] The model training unit uses the preprocessed data to train the neural network model and adjusts the model parameters to minimize the prediction error. First, the mean square error loss function is defined, and the formula is as follows:
[0024]
[0025] where y i is the true trajectory coordinate value, is the trajectory coordinate value predicted by the model, and n is the number of samples. Then, the Adam optimization algorithm is selected. During the training process, the data is divided into a training set, a validation set, and a test set. The training set is used for the learning and update of the model parameters, and the validation set is used to monitor the model performance during the training process;
[0026] After the model training is completed, the prediction output unit inputs the new original path data into the trained neural network model. Through the forward propagation calculation of the model, it outputs the predicted positioning trajectory and converts the coordinate values of the prediction result into a format that can be recognized by the AFM device.
[0027] The trajectory comparison module includes an attention weight calculation unit, a weighted difference calculation unit, and a visualization unit;
[0028] The attention weight calculation unit, based on the predicted trajectory and the original path data output by the deep learning model, then compares the original path and the predicted trajectory, and calculates the attention weight of each path point. It adopts an attention weight calculation method based on distance and curvature. For each point i on the path, it calculates the average distance d from it to the adjacent point i and the local curvature k i , and then calculates the attention weight. The formula is as follows:
[0029]
[0030] where α, β, γ, δ are learnable parameters;
[0031] The weighted difference calculation unit, based on the predicted trajectory and the original path data output by the deep learning model, calculates the difference indicators of the original path and the predicted trajectory in terms of spatial position, path length, and path curvature, and weights the differences of each path point using the attention weight to highlight the differences of key points; for the spatial position difference MSE w , it is calculated using the mean square error formula, and the formula is modified as follows:
[0032]
[0033] where w i is the attention weight of point i, (x i ,y i ) and are the corresponding coordinate points on the original path and the predicted trajectory respectively;
[0034] For the path length difference, first measure the lengths of the original path and the predicted trajectory paths respectively. For discrete path points, use the method of accumulating Euclidean distances for calculation, and finally calculate the difference indicator of the path length;
[0035] For the difference in path curvature, first fit the original path and the predicted trajectory through a curve fitting algorithm, and then calculate the curvature of the two curves at each point according to the curvature calculation formula. Finally, calculate the curvature difference indicator through the root mean square error formula;
[0036] The visualization unit uses a drawing library to plot the original path and the predicted trajectory in the same coordinate system, distinguish between the two, and mark the key path points. According to the comparison results, it analyzes the model performance and the results of path planning.
[0037] The positioning control module includes an error analysis and compensation unit, a motion control unit, and a calibration and adaptation unit;
[0038] The error analysis and compensation unit receives the difference information between the original path and the predicted trajectory obtained by the trajectory comparison module, determines the current positioning error state of the AFM scanning head by quantifying the deviations of position, direction, and speed; uses the spatial vector calculation method to analyze the deviation vector between the actual position and the target position of the scanning head in three-dimensional space, and the angular deviation between the actual motion direction and the tangent direction of the ideal path; then, generates a compensation control signal according to these analysis results to correct the motion of the scanning head; during the compensation process, considering the dynamic characteristics and mechanical precision limitations of the AFM system, an algorithm based on the proportional-integral-derivative control principle is used to adjust the error in real time;
[0039] The motion control unit drives the motor drive device of the AFM scanning head according to the control signal provided by the error analysis and compensation unit, converts the digital control signal into actual mechanical motion, and controls the displacement and rotation actions of the scanning head in three-dimensional space; controls the speed and direction of the motor through pulse width modulation technology. At the same time, this unit also monitors the motion state of the scanning head, including the current position, speed, and acceleration, and feeds this information back to the error analysis and compensation unit to form a closed-loop control;
[0040] During the positioning process, the calibration and adaptation unit measures and calibrates the parameters of the AFM system; uses a standard sample for calibration measurement, compares the measurement results with the known standard values, calculates the deviation parameters of the system, and modifies the positioning control model accordingly; at the same time, this unit uses an adaptive control algorithm to automatically adjust the control parameters according to the real-time operating state and environmental changes of the AFM system.
[0041] The mechanical detection module includes a detection mode switching unit, a mechanical data acquisition unit, and a data sharing and feedback unit;
[0042] The detection mode switching unit, when the positioning control module accurately positions the AFM scanning head to the target point according to the difference information of the trajectory comparison module through the feedback control mechanism, sends a trigger signal to the mechanical detection module to inform the mechanical detection module that it can start the subsequent mechanical detection operation; after receiving the trigger signal, the detection mode switching unit selects the mechanical detection mode according to the preset information of the sample;
[0043] The mechanical data acquisition unit starts to work in the selected detection mode, acquires mechanical data related to the surface of the sample, and records and stores the positioning information at the acquisition moment.
[0044] For the data sharing and feedback unit, after the mechanical detection module completes data acquisition and preliminary processing, it will feedback some key data to the positioning control module; the positioning control module optimizes subsequent positioning operations according to this feedback information; at the same time, the positioning control module will also inform the mechanical detection module of the information during the positioning process, providing analysis factors for the mechanical detection module in subsequent data processing and analysis.
[0045] A method for AFM target point positioning trajectory planning based on deep learning, characterized by comprising the following steps:
[0046] S1. Utilize the probe driving unit in the AFM scanning module, and control the probe of the atomic force microscope to perform point-by-point scanning on the surface of the sample according to a preset scanning path and speed through a motor driving device.
[0047] S2. Preprocess the original image transmitted by the scanning module, extract features from the preprocessed image, and use a segmentation algorithm to determine the sample area.
[0048] S3. Generate an original path by the path planning module according to the obtained sample data.
[0049] S4. Perform deep model training on the generated original path data to predict the positioning trajectory.
[0050] S5. Input the trained path data, and after the trajectory comparison module compares the differences, the positioning control module performs positioning.
[0051] S6. Transmit the positioned data to the mechanical detection module to detect the mechanical data of the target point.
[0052] Compared with the prior art, the beneficial effects of the present invention are:
[0053] 1. Precise positioning accuracy: In terms of positioning accuracy, through the in-depth analysis and prediction of the positioning trajectory of the original path by the deep learning model module, combined with the precise difference calculation of the trajectory comparison module and the precise feedback control of the positioning control module, high-precision positioning of micro-nano scale target points by the atomic force microscope can be achieved, improving the accuracy of positioning and overcoming the problem of inaccurate positioning of traditional methods at the micro-nano scale.
[0054] 2. Efficient path planning: The environmental modeling unit, path search unit, and path optimization unit in the path planning module work together. Based on the point cloud data processing algorithm, an environmental model is constructed, and efficient search and optimization algorithms are used to quickly generate the optimal path from the starting point to the target point, improving the efficiency of path planning and reducing the time cost of AFM operations.
[0055] 3. Comprehensiveness of sample detection: After the target point is located, the mechanical detection module can promptly obtain the mechanical-related data of the target point and perform processing and analysis, providing an important basis for studying the mechanical properties of the sample and making the understanding of the sample deeper and more comprehensive, which is lacking in traditional AFM technology. Brief Description of the Drawings
[0056] Figure 1 is a flowchart of the AFM target point positioning trajectory planning system based on deep learning of the present invention;
[0057] Figure 2 is a schematic diagram of the results of the AFM target point positioning trajectory planning system based on deep learning of the present invention. Detailed Embodiments
[0058] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0059] Embodiment: As Figure 1 - Figure 2 shown, the present invention provides a technical solution,
[0060] The AFM target point positioning trajectory planning system based on deep learning includes an AFM scanning module, an image segmentation module, a path planning module, a deep learning model module, a trajectory comparison module, a positioning control module, and a mechanical detection module; the AFM scanning module is used to scan the original topography image; the image segmentation module is used to process the image obtained by the AFM scanning module; the path planning module is used to generate several original paths from the starting point to the target point for the target point determined based on the image segmentation module; the deep learning model module is used to predict the positioning trajectory according to the input original path; the trajectory comparison module is used to compare the original path and the predicted trajectory output by the deep learning model module; the positioning control module accurately locates the target point through a feedback control mechanism based on the difference information obtained by the trajectory comparison module; the mechanical detection module is used to obtain the mechanical-related data of the target point and perform processing and analysis after the target point is located.
[0061] The AFM scanning module includes a probe driving unit, a signal detection and conversion unit, and a scanning parameter setting and control unit;
[0062] The probe driving unit controls the probe of the atomic force microscope to perform point-by-point scanning on the sample surface according to a preset scanning path and speed through a motor driving device, so as to obtain complete topographic information of the sample;
[0063] The signal detection and conversion unit is responsible for detecting the physical signals generated by the interaction between the probe and the sample surface and converting them into electrical signals;
[0064] The scanning parameter setting and control unit is used to set and adjust various parameters of the AFM.
[0065] The image segmentation module includes an image preprocessing unit, a feature extraction unit, and a segmentation algorithm execution unit;
[0066] The image preprocessing unit performs preliminary processing on the original image obtained by AFM scanning, uses a median filtering algorithm to remove the noise in the image, and improves the image quality;
[0067] The feature extraction unit, according to the gray-scale distribution and texture features of the image processed by the image preprocessing unit, draws a gray-scale histogram, combines the gray-level co-occurrence matrix method to extract image features, and separates the image features from the background;
[0068] The segmentation algorithm execution unit calculates the gray-scale features of the image through the gray-level co-occurrence matrix, analyzes the distribution of gray-scale and texture information; when the image is within a preset gray-scale interval, the gray-scale difference between the sample and the background exceeds a preset difference threshold, and shows a concentrated distribution trend, at this time, the segmentation algorithm execution unit sets a threshold according to the above-analyzed gray-scale information, and then judges each pixel in the image, determines the pixels with gray-scale values greater than the threshold as sample pixels, and the pixels less than the threshold as background pixels; then uses the threshold segmentation algorithm to segment the image and separate the sample area from the background.
[0069] The path planning module includes an environment modeling unit, a path search unit, and a path optimization unit;
[0070] The environment modeling unit receives the image data and measurement information from the AFM module. For each sampling point on the sample surface, it records its three-dimensional coordinates, identifies the contour and features of the sample through a point cloud data processing algorithm, converts this information into a geometric shape representation in the environment model, and at the same time marks the positions of obstacles affecting the probe movement, and constructs a virtual environment model containing complete information of the sample surface;
[0071] The path search unit determines the starting point and the target point based on the environment model constructed by the environment modeling unit, performs path search using the A* algorithm, marks the distance of the starting point as 0, and marks other points as infinity. Then, starting from the starting point, it searches for the point adjacent to the current point with the minimum distance and updates its distance value. The above process is repeated until the target node is found;
[0072] The path optimization unit optimizes the original path obtained by the path search unit. The optimization contents include path length, smoothness, and obstacle avoidance. For the path length, the Euclidean geometric distance between adjacent two points on the path is accumulated to obtain the path length, and the shortest path is evaluated. For the smoothness optimization of the path, a curve fitting algorithm is adopted. The key points on the original path are used as the control points of the fitting curve, and a smooth curve is generated through calculation as the optimized path. For the obstacle collision optimization, the collision points between the path and the obstacles in the environment model are checked, and then by adjusting the positions of the path points, the local path is re-planned to avoid obstacles.
[0073] The deep learning model module includes a data preprocessing unit, a neural network architecture unit, a model training unit, and a prediction output unit;
[0074] The data preprocessing unit cleans and normalizes the data input by the path optimization module, and performs random rotation, translation, and scaling transformation operations on the original path data to increase the diversity of the training data;
[0075] The neural network architecture unit is used to construct a neural network structure suitable for the AFM processing and positioning trajectory planning task, extract data features and make predictions. A recurrent neural network is adopted, and the historical trajectory and the original path are input as time series. Through the recurrent structure, the dynamic relationship between them is learned to capture the time-dependent information in the path planning;
[0076] The model training unit uses the preprocessed data to train the neural network model and adjusts the model parameters to minimize the prediction error. First, the mean square error loss function is defined, and the formula is as follows:
[0077]
[0078] where y i is the true trajectory coordinate value, is the trajectory coordinate value predicted by the model, and n is the number of samples. Then, the Adam optimization algorithm is selected. During the training process, the data is divided into a training set, a validation set, and a test set. The training set is used for learning and updating the model parameters, and the validation set is used to monitor the model performance during the training process;
[0079] The prediction output unit, after the model training is completed, inputs the new original path data into the trained neural network model. Through the forward propagation calculation of the model, it outputs the predicted positioning trajectory and converts the coordinate values of the prediction result into a format that can be recognized by the AFM device.
[0080] The trajectory comparison module includes an attention weight calculation unit, a weighted difference calculation unit, and a visualization unit;
[0081] The attention weight calculation unit, based on the predicted trajectory and the original path data output by the deep learning model, then compares the original path and the predicted trajectory, and calculates the attention weight of each path point. It adopts an attention weight calculation method based on distance and curvature. For each point i on the path, it calculates the average distance d from it to the adjacent point i and the local curvature k i , and then calculates the attention weight. The formula is as follows:
[0082] w i = α·exp(-β·d i ) + γ·exp(-δ·|k i |)
[0083] where α, β, γ, and δ are learnable parameters;
[0084] The weighted difference calculation unit, based on the predicted trajectory and the original path data output by the deep learning model, calculates the difference indicators of the original path and the predicted trajectory in terms of spatial position, path length, and path curvature, and weights the differences of each path point using the attention weight to highlight the differences of key points. For the spatial position difference MSE w , it is calculated using the mean square error formula, and the formula is modified as follows:
[0085]
[0086] where w i is the attention weight of point i, (x i , y i ) and are the corresponding coordinate points on the original path and the predicted trajectory respectively;
[0087] For the path length difference, first measure the lengths of the original path and the predicted trajectory paths respectively. For discrete path points, use the method of accumulating Euclidean distances for calculation, and finally calculate the difference indicator of the path length;
[0088] For the difference in path curvature, first fit the original path and the predicted trajectory through a curve fitting algorithm, then calculate the curvatures of the two curves at each point according to the curvature calculation formula, and finally calculate the curvature difference indicator through the root mean square error formula;
[0089] The visualization unit uses a drawing library to plot the original path and the predicted trajectory in the same coordinate system, distinguish between the two, and mark the key path points. According to the comparison results, it analyzes the model performance and the results of path planning.
[0090] The positioning control module includes an error analysis and compensation unit, a motion control unit, and a calibration and adaptation unit;
[0091] The error analysis and compensation unit receives the difference information between the original path and the predicted trajectory obtained by the trajectory comparison module. By quantifying the deviations in position, direction, and speed, it determines the current positioning error state of the AFM scanning head; uses the spatial vector calculation method to analyze the deviation vector between the actual position and the target position of the scanning head in three-dimensional space, and the angular deviation between the actual motion direction and the tangent direction of the ideal path; then, generates a compensation control signal based on these analysis results to correct the motion of the scanning head; during the compensation process, considering the dynamic characteristics and mechanical accuracy limitations of the AFM system, an algorithm based on the proportional-integral-derivative control principle is used to adjust the error in real time;
[0092] The motion control unit drives the motor drive device of the AFM scanning head according to the control signal provided by the error analysis and compensation unit, converts the digital control signal into actual mechanical motion, and controls the displacement and rotation actions of the scanning head in three-dimensional space; controls the speed and direction of rotation of the motor through pulse width modulation technology. At the same time, this unit also monitors the motion state of the scanning head, including the current position, speed, and acceleration, and feeds this information back to the error analysis and compensation unit to form a closed-loop control;
[0093] During the positioning process, the calibration and adaptation unit measures and calibrates the parameters of the AFM system; uses a standard sample for calibration measurement, compares the measurement results with known standard values, calculates the deviation parameters of the system, and modifies the positioning control model accordingly; at the same time, this unit uses an adaptive control algorithm to automatically adjust the control parameters according to the real-time operating state and environmental changes of the AFM system.
[0094] The mechanical detection module includes a detection mode switching unit, a mechanical data acquisition unit, and a data sharing and feedback unit;
[0095] The detection mode switching unit, when the positioning control module accurately positions the AFM scanning head to the target point based on the difference information of the trajectory comparison module through a feedback control mechanism, sends a trigger signal to the mechanical detection module to inform the mechanical detection module that it can start the subsequent mechanical detection operation; after receiving the trigger signal, the detection mode switching unit selects the mechanical detection mode according to the preset information of the sample;
[0096] The mechanical data acquisition unit starts to work in the selected detection mode, acquires the mechanical related data on the surface of the sample, and records and stores the positioning information at the acquisition moment.
[0097] For the data sharing and feedback unit, after the mechanical detection module completes data acquisition and preliminary processing, it will feedback some key data to the positioning control module; according to this feedback information, the positioning control module optimizes the subsequent positioning operations; at the same time, the positioning control module also informs the mechanical detection module of the information during the positioning process, providing analysis factors for the mechanical detection module in subsequent data processing and analysis.
[0098] A method for AFM target point positioning trajectory planning based on deep learning, characterized by including the following steps:
[0099] S1. Using the probe driving unit in the AFM scanning module, the probe of the atomic force microscope is controlled by a motor driving device to perform point-by-point scanning on the surface of the sample according to a preset scanning path and speed.
[0100] S2. Preprocess the original image transmitted by the scanning module, extract features from the preprocessed image, and use a segmentation algorithm to determine the sample area.
[0101] S3. Generate an original path by the path planning module according to the obtained sample data.
[0102] S4. Perform deep model training on the generated original path data to predict the positioning trajectory.
[0103] S5. Input the trained path data, and after the trajectory comparison module compares the differences, the positioning control module performs positioning.
[0104] S6. Transmit the positioned data to the mechanical detection module to detect the mechanical data of the target point.
[0105] Taking the detection of a specific target point on the surface of a nanomaterial sample as an example, first, the probe driving unit of the AFM scanning module controls the probe to scan the sample according to the set path and speed. The signal detection and conversion unit converts the signal generated by the interaction between the probe and the sample into an electrical signal. The scanning parameter setting and control unit adjusts the parameters to obtain a topographic image. In the image segmentation module, after the image preprocessing unit removes noise using median filtering, the feature extraction unit extracts features, and the segmentation algorithm execution unit segments the sample area according to the gray-scale features. The environmental modeling unit of the path planning module records the three-dimensional coordinates of the sample sampling points to construct a model and mark obstacles. The path search unit uses the A* algorithm to find the path from the starting point to the target point, and the path optimization unit optimizes the path length, smoothness, and obstacle avoidance. After the data preprocessing unit of the deep learning module processes the data, the neural network architecture unit constructs a recurrent neural network for training. The model training unit uses the mean squared error loss function and the Adam algorithm for training, and the prediction output unit outputs the positioning trajectory. The trajectory comparison module calculates the attention weights and difference metrics and visualizes them. The positioning control module, based on the difference information, the error analysis and compensation unit analyzes the error, the motion control unit drives the scanning head for positioning, and the calibration and adaptive unit calibrates the parameters. Finally, after positioning, the mechanical detection module, the detection mode switching unit selects the mode, the mechanical data acquisition unit acquires data and records the positioning information, and the data sharing and feedback unit exchanges data with the positioning control module.
[0106] For those skilled in the art, it is obvious that the present invention is not limited to the details of the above-described exemplary embodiments, and without departing from the spirit or basic characteristics of the present invention, the present invention can be implemented in other specific forms. Therefore, from any point of view, the embodiments should be regarded as exemplary and non-limiting. The scope of the present invention is defined by the appended claims rather than the above description. Therefore, all changes falling within the meaning and scope of the equivalent elements of the claims are intended to be included in the present invention. Any reference signs in the claims should not be construed as limiting the claims concerned.
Claims
1. AFM target point positioning trajectory planning system based on deep learning, characterized by: It comprises an AFM scanning module, an image segmentation module, a path planning module, a deep learning model module, a trajectory comparison module, a positioning control module, and a mechanical detection module; the AFM scanning module is used to scan the original topographic image; the image segmentation module is used to process the image acquired by the AFM scanning module; the path planning module is used to generate a number of original paths from the starting point to the target point based on the target point determined by the image segmentation module; the deep learning model module is used to predict the positioning trajectory according to the input original path; the trajectory comparison module is used to compare the original path with the predicted trajectory output by the deep learning model module; the positioning control module accurately locates the target point through a feedback control mechanism based on the difference information obtained by the trajectory comparison module; the mechanical detection module is used to obtain the mechanical related data of the target point and process and analyze it after the target point is located; The trajectory comparison module includes an attention weight calculation unit, a weighted difference calculation unit and a visualization unit; The attention weight calculation unit compares the original path and the predicted trajectory according to the predicted trajectory and the original path data output by the deep learning model, and calculates the attention weight of each path point. The attention weight calculation method based on distance and curvature is used. For each point i on the path, the average distance d between it and the adjacent points is calculated. i and the local curvature k i , and then calculate the attention weight, the formula is as follows: w i =α·exp(-β·d i )+γ·exp(-δ·|k i |) Among them, α, β, γ, and δ are learnable parameters; The weighted difference calculation unit calculates the difference indicators in spatial position, path length, and path curvature between the original path and the predicted trajectory according to the predicted trajectory and original path data output by the deep learning model, and uses the attention weight to weight the difference of each path point to highlight the difference of key points; for the spatial position difference MSE w , calculated using the mean square error formula, the formula is modified as follows: where w i is the attention weight of point i, (x i ,y i )and They are the corresponding coordinate points on the original path and the predicted trajectory; For the path length difference, first measure the length of the original path and the predicted trajectory path respectively, and for discrete path points, use the Euclidean distance accumulation method to calculate, and finally calculate the path length difference index; For the difference in path curvature, the original path and the predicted trajectory are first fitted using a curve fitting algorithm, and then the curvatures of the two curves at each point are calculated using the curvature calculation formula. Finally, the curvature difference index is calculated using the root mean square error formula. The visualization unit uses a drawing library to draw the original path and the predicted trajectory in the same coordinate system, distinguishes the two, and marks key path points. Based on the comparison results, the model performance and path planning results are analyzed.
2. The AFM target point positioning trajectory planning system based on deep learning according to claim 1, characterized in that: The AFM scanning module includes a probe driving unit, a signal detection and conversion unit, and a scanning parameter setting and control unit; The probe driving unit controls the probe of the atomic force microscope through a motor driving device to scan the sample surface point by point according to a preset scanning path and speed to obtain complete morphological information of the sample; The signal detection and conversion unit is responsible for detecting the physical signal generated by the interaction between the probe and the sample surface, and converting it into an electrical signal; The scanning parameter setting and control unit is used to set and adjust various parameters of the AFM.
3. The AFM target point positioning trajectory planning system based on deep learning according to claim 1, characterized in that: The image segmentation module includes an image preprocessing unit, a feature extraction unit and a segmentation algorithm execution unit; The image preprocessing unit performs preliminary processing on the original image obtained by AFM scanning, and uses a median filtering algorithm to remove noise in the image to improve the image quality; The feature extraction unit draws a grayscale histogram according to the grayscale distribution and texture features of the image processed by the image preprocessing unit, extracts image features by combining a grayscale co-occurrence matrix method, and separates the image features from the background; The segmentation algorithm execution unit calculates the grayscale features of the image through the grayscale co-occurrence matrix and analyzes the grayscale distribution and texture information; when the image is within a preset grayscale interval, the grayscale difference between the sample and the background exceeds a preset difference threshold and presents a concentrated distribution trend, at this time, the segmentation algorithm execution unit sets a threshold according to the grayscale information analyzed above, and then judges each pixel in the image, and determines the pixels with grayscale values greater than the threshold as sample pixels, and the pixels with grayscale values less than the threshold as background pixels; then the threshold segmentation algorithm is used to segment the image to separate the sample area from the background.
4. The AFM target point positioning trajectory planning system based on deep learning according to claim 1, characterized in that: The path planning module includes an environment modeling unit, a path search unit and a path optimization unit; The environment modeling unit receives image data and measurement information from the AFM module, records the three-dimensional coordinates of each sampling point on the sample surface, identifies the contour and features of the sample through a point cloud data processing algorithm, converts this information into a geometric shape representation in the environment model, and marks the position of obstacles that affect the movement of the probe, thereby constructing a virtual environment model containing complete information on the sample surface; The path search unit determines the starting point and the target point based on the environment model constructed by the environment modeling unit, uses the A* algorithm to perform path search, marks the distance of the starting point as 0, marks other points as infinity, and then starts from the starting point to search for the point adjacent to the current point with the smallest distance, and updates its distance value, and repeats the above process until the target node is found; The path optimization unit optimizes the original path obtained by the path search unit, and the optimization contents are path length, smoothness and obstacle avoidance. For the path length, the path length is obtained by accumulating the Euclidean geometric distances between two adjacent points on the path, and the shortest path is evaluated; for the smoothness optimization of the path, a curve fitting algorithm is used, and the key points on the original path are used as control points of the fitting curve, and a smooth curve is generated by calculation as the optimized path; for the obstacle collision optimization, the collision point between the path and the obstacle in the environment model is checked, and then the position of the path point is adjusted to re-plan the local path to avoid the obstacle.
5. The AFM target point positioning trajectory planning system based on deep learning according to claim 1, characterized in that: The deep learning model module includes a data preprocessing unit, a neural network architecture unit, a model training unit and a prediction output unit; The data preprocessing unit cleans and normalizes the data input by the path optimization module, and performs random rotation, translation, and scaling transformation operations on the original path data to increase the diversity of the training data; The neural network architecture unit is used to construct a neural network structure suitable for AFM processing positioning trajectory planning tasks, extract data features and make predictions, adopt a recurrent neural network, take the historical trajectory and the original path as time series input, learn the dynamic relationship between them through the recurrent structure, and capture the time-dependent information in path planning; The model training unit trains the neural network model using the preprocessed data and adjusts the model parameters to minimize the prediction error. First, the mean square error loss function is defined, and the formula is as follows: where y i is the actual trajectory coordinate value, is the trajectory coordinate value predicted by the model, and n is the number of samples; then the Adam optimization algorithm is selected. During the training process, the data is divided into a training set, a validation set, and a test set. The training set is used to learn and update the model parameters, and the validation set is used to monitor the model performance during the training process; After the model training is completed, the prediction output unit inputs the new original path data into the trained neural network model, outputs the predicted positioning trajectory through the forward propagation calculation of the model, and converts the coordinate value of the prediction result into a format that can be recognized by the AFM device.
6. The AFM target point positioning trajectory planning system based on deep learning according to claim 1, characterized in that: The positioning control module includes an error analysis and compensation unit, a motion control unit and a calibration and adaptation unit; The error analysis and compensation unit receives the difference information between the original path and the predicted trajectory obtained by the trajectory comparison module, and determines the current positioning error state of the AFM scanning head by quantifying the deviation of the position, direction and speed; Using the space vector calculation method, the deviation vector between the actual position of the scanning head and the target position in three-dimensional space, as well as the angular deviation between the actual motion direction and the tangent direction of the ideal path are analyzed; Then, based on these analysis results, compensation control signals are generated to correct the movement of the scanning head. During the compensation process, the dynamic characteristics and mechanical precision limitations of the AFM system are considered, and an algorithm based on the proportional-integral-differential control principle is used to adjust the error in real time. The motion control unit drives the motor drive device of the AFM scanning head according to the control signal provided by the error analysis and compensation unit, converts the digital control signal into actual mechanical motion, and controls the displacement and rotation of the scanning head in three-dimensional space; The speed and direction of the motor are controlled by pulse width modulation technology. At the same time, the unit also monitors the motion state of the scanning head, including the current position, speed and acceleration, and feeds this information back to the error analysis and compensation unit to form a closed-loop control; The calibration and adaptation unit measures and calibrates the parameters of the AFM system during the positioning process; Calibration measurements are performed using standard samples, and the measurement results are compared with known standard values to calculate the system deviation parameters, and the positioning control model is corrected accordingly. At the same time, the unit uses an adaptive control algorithm to automatically adjust the control parameters according to the real-time operating status of the AFM system and environmental changes.
7. The AFM target point positioning trajectory planning system based on deep learning according to claim 1, characterized in that: The mechanical detection module includes a detection mode switching unit, a mechanical data acquisition unit and a data sharing and feedback unit; The detection mode switching unit, when the positioning control module accurately positions the AFM scanning head to the target point through the feedback control mechanism according to the difference information of the trajectory comparison module, sends a trigger signal to the mechanical detection module to inform the mechanical detection module that it can start the subsequent mechanical detection operation; after the mechanical detection module receives the trigger signal, the detection mode switching unit selects the mechanical detection mode according to the preset information of the sample; The mechanical data acquisition unit starts working in the selected detection mode, collects mechanical data related to the sample surface, and records and stores the positioning information at the time of collection; The data sharing and feedback unit, after completing data collection and preliminary processing, the mechanical detection module will feed back some key data to the positioning control module; the positioning control module optimizes subsequent positioning operations based on these feedback information; at the same time, the positioning control module will also inform the mechanical detection module of the information during the positioning process, providing analysis factors for the mechanical detection module in subsequent data processing and analysis.
8. A deep learning-based AFM target point positioning trajectory planning method, applied to the deep learning-based AFM target point positioning trajectory planning system according to any one of claims 1 to 7, characterized in that: The following steps are involved: S1, using the probe driving unit in the AFM scanning module, controlling the probe of the atomic force microscope through a motor driving device to scan the sample surface point by point according to a preset scanning path and speed; S2, preprocessing the original image transmitted by the scanning module, extracting features from the preprocessed image, and determining the sample area using a segmentation algorithm; S3, generating an original path by a path planning module according to the obtained sample data; S4, training the generated original path data with a deep model to predict the positioning trajectory; S5, input the trained path data, compare the differences in the trajectory comparison module, and then locate the position in the positioning control module; S6. Transmit the located data to the mechanical detection module to detect the mechanical data of the target point.
Citation Information
Patent Citations
Long-distance precise micro nanometer operation method for atomic force microscope
CN109669058A
Track planning method and device for mechanical arm, storage medium and program product
CN116265203A