A method and system for detecting surface of precision components based on laser parallel control
Through deep reinforcement learning algorithms and fine control strategies, the problems of multi-laser head parallel scanning system in multi-axis linkage control, process parameter adjustment and interference avoidance are solved, and efficient and accurate surface detection and scanning of precision components are achieved.
Patent Information
- Application Number
- CN202411827227.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-12
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2044-12-12
AI Technical Summary
The existing multi-laser head parallel scanning system is difficult to achieve real-time and accurate multi-axis linkage control, especially when processing large amounts of data, and it is difficult to quickly and accurately determine the optimal process parameters, dynamically adjust the process parameters and avoid physical interference problems.
Deep reinforcement learning algorithms and fine control strategies are adopted to initialize the state space and action space, select the action to control the working status of the laser head through the policy network, monitor and update the status space in real time, and dynamically adjust the power and scanning speed of the laser head to avoid interference.
It improves the efficiency and quality of laser scanning on the surface of precision components, shortens the scanning cycle, improves the utilization rate of equipment, reduces the risk of manual intervention and errors, and ensures the consistency of surface quality.
Smart Images

Figure CN119260164B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of parallel control systems, and in particular to a method and system for detecting the surface of a precision component based on laser parallel control. Background Art
[0002] Multi-laser head parallel scanning systems usually involve the simultaneous control of multiple laser heads, which makes the design of the control system extremely complicated. Existing control systems often find it difficult to achieve real-time and accurate multi-axis linkage control, especially when a large amount of data needs to be processed. This not only limits the flexibility of the system, but also increases the difficulty of maintenance. The quality of laser scanning is highly dependent on the selection of process parameters, such as power, scanning speed, etc. For different materials and surface features, it is necessary to find a suitable combination of process parameters. However, in actual operation, how to quickly and accurately determine the optimal process parameters remains a difficult problem. In addition, when it is necessary to scan multiple features of different types or sizes, how to dynamically adjust the process parameters is also a challenge. In the process of multi-laser head parallel scanning, physical interference is prone to occur due to the close spatial positions between the laser heads. This interference not only causes equipment damage, but also affects the scanning quality, causing problems such as inconsistent surface roughness and dimensional deviation. At present, most systems rely on pre-programmed path planning to avoid interference, but this often requires a lot of preliminary preparation and is difficult to adapt to complex and changing scanning environments.
[0003] For example, the Chinese patent application with the authorization announcement number CN103630088B discloses a high-precision tunnel section detection method and device based on dual laser bands. The device is used to measure the cross-sectional dimensions and limit detection of tunnels, and is mainly suitable for high-precision and high-density cross-sectional detection of railway tunnels. The invention uses multiple linear lasers to photograph the tunnel surface to form two complete tunnel cross-sectional contour light bands, uses a high-speed vision system to collect light band images, performs high-speed parallel processing on the images to extract the light band positions, and calculates the actual tunnel cross-sectional coordinates through system calibration technology to realize high-speed real-time tunnel cross-sectional detection functions. The invention makes reasonable use of the camera acquisition area to double the cross-sectional detection accuracy and density. It has a compact structure and high integration, and can also be used for high-speed detection of local sensitive areas of tunnels.
[0004] For example, the patent application with publication number CN117269169A discloses a parallel scanning detection device and method for nano-level defects on the surface of large-aperture optical components, including: a single-frequency ultraviolet laser for generating a detection laser beam; a Dammann beam splitter grating for splitting the laser beam emitted by the single-frequency ultraviolet laser to generate a detection sub-beam with uniform intensity distribution; a multi-focus spatial filtering system for focusing each detection sub-beam and performing spatial filtering to filter out high-frequency stray light to form a "clean" detection sub-beam; a scanning detection system for scanning the optical component to be detected and recording surface defects and their spatial distribution. Rapid detection of surface defects of large-aperture optical components is achieved by controlling the scanning speed of the scanning reflector and the CCD camera turntable. The invention adopts an ultraviolet coherent laser light source and combines it with parallel beam scanning technology to solve the problem of high-resolution and rapid detection of nano-level defects on the surface of large-aperture optical components, and provides technical support for scanning and detection of ultra-smooth large-aperture optical components.
[0005] The above invention patents all have the problems existing in the background technology: how to quickly and accurately determine the optimal process parameters is still a difficult problem, and when it is necessary to scan multiple features of different types or sizes, how to dynamically adjust the process parameters is also a challenge.
[0006] The information disclosed in this background technology section is only intended to enhance the understanding of the overall background of the invention and should not be regarded as an acknowledgement or any form of suggestion that the information constitutes the prior art already known to ordinary technicians in this field. Summary of the invention
[0007] The technical problem to be solved by the present invention is to overcome the defects of the prior art and provide a method and system for precision component surface detection based on laser parallel control, which improves the efficiency and quality of laser scanning on the surface of precision components and reduces scanning costs through deep reinforcement learning and sophisticated control strategies.
[0008] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0009] A method for detecting the surface of a precision component based on laser parallel control comprises the following steps:
[0010] S1: Acquire all surface features to be scanned on the component surface, and set preset working parameters of the laser for each surface feature to be scanned; set the number of laser heads and the control cycle of the laser heads;
[0011] S2: Initialize the state space and action space of the deep reinforcement learning algorithm based on the surface features to be scanned and the number of laser heads;
[0012] S3: At the beginning of any control cycle, an action is selected from the action space through the trained policy network;
[0013] S4: Control the working state of each laser head based on the selected action and obtain the surface height data of the precision component;
[0014] S5: At the end of the control cycle, the state space is updated based on the state of each laser head, and the action space is regenerated based on the updated state space;
[0015] S6: Repeat S3 to S5 until all surface features of the component surface are scanned and a three-dimensional model of the surface of the precision component is established;
[0016] S7: Based on the three-dimensional model of the surface of the precision component, perform surface defect detection on the precision component.
[0017] As a preferred solution of the precision component surface detection method based on laser parallel control described in the present invention, wherein: the surface features to be scanned include holes, grooves, and textures; the preset working parameters of the laser are set for each surface feature to be scanned, including the moving path, power and scanning speed of any laser head when scanning the surface feature, specifically including a moving path and 1 to Group power and scan speed;
[0018] The control cycle of the laser head is continuous and has a fixed cycle length. At the beginning of each control cycle, the working state of all the laser heads is controlled once.
[0019] As a preferred solution of the precision component surface detection method based on laser parallel control described in the present invention, wherein: the state space includes a list to be scanned, a three-dimensional coordinate range of each surface feature to be scanned, a preset working parameter of each surface feature to be scanned, a three-dimensional coordinate of each laser head, a scanning state of each laser head, and a power and scanning speed of each laser head; wherein the list to be scanned is composed of all surface features to be scanned; the scanning state of each laser head includes the number of the surface feature being scanned by each laser head and a category label indicating whether the laser head has completed the scan, 1 represents a completed scan, and 0 represents an incomplete scan;
[0020] The action space is a list of actions, and any action is generated based on the state space; any action includes a control strategy for each laser head; the control strategy included in any action is generated as follows:
[0021] Read the list of surface features to be scanned and the scanning state of each laser head; assign a surface feature to be scanned to each laser head with a category label of 1 in each scanning state for scanning in turn, and set the power and scanning speed for the laser head based on the preset working parameters of the assigned surface feature to be scanned, and the assigned surface feature to be scanned is read from the list of surface features to be scanned; for a laser head with a category label of 0 in any scanning state, if the surface feature being scanned contains more than one set of preset power and scanning speed, reselect a set of preset power and scanning speed for the laser head.
[0022] As a preferred solution of the precision component surface detection method based on laser parallel control described in the present invention, the control strategy for each laser head also includes: in the process of the laser head scanning the component surface, the distance between any two laser heads is calculated in real time based on the three-dimensional coordinates of each laser head; an interference threshold is set, and when the distance between any two laser heads is less than the interference threshold, a laser head is randomly selected to trigger interference avoidance, and the scanning of the surface features is suspended until the distance between the two laser heads is not less than the interference threshold, and the scanning of the surface features continues; in any control cycle, if any laser head completes the scanning of the surface features, the laser head stops working until the next control cycle.
[0023] As a preferred solution of the method for precision component surface detection based on laser parallel control described in the present invention, the method for selecting an action from the action space through the trained strategy network is as follows:
[0024] The state space is encoded into a state feature vector of fixed dimension through the encoder; the action space is encoded into an action feature vector through the encoder;
[0025] The policy network calculates the probability distribution of each action according to the state feature vector and the action feature vector;
[0026] The action space is sampled based on the probability distribution of each action to obtain the selected action.
[0027] As a preferred solution of the precision component surface detection method based on laser parallel control described in the present invention, the training method of the strategy network is as follows:
[0028] S100: Conduct laser parallel scanning control experiments on the surface of precision components, initialize the state space and action space; build a strategy network and initialize parameters;
[0029] S200: At the beginning of any control cycle, an action is selected and executed through the policy network, and a penalty value is calculated according to the penalty function;
[0030] S300: When the control cycle ends, the state space is updated and the action space is regenerated;
[0031] S400: Calculating a cumulative penalty value and updating parameters of a policy network according to the cumulative penalty value;
[0032] S500: Repeat S200 to S400 until the maximum number of iterations is reached, completing the training of the policy network;
[0033] S600: Save the trained policy network and deploy the application.
[0034] As a preferred solution of the precision component surface detection method based on laser parallel control of the present invention, the penalty function equation is as follows:
[0035] ;
[0036] Among them, R represents the penalty value; It indicates the number of times the i-th laser head triggers interference avoidance in the control cycle; the value range of i is 1, 2, ..., M, where M indicates the number of laser heads; is the weight coefficient; It represents the duration of scanning the surface features by the i-th laser head in the control cycle; It represents the idle distance of the ith laser head in the control cycle; V represents the idle speed of any laser head.
[0037] As a preferred solution of the precision component surface detection method based on laser parallel control of the present invention, wherein: the control of the working state of each laser head specifically includes:
[0038] For any laser head that has completed scanning of the surface feature in the previous control cycle, obtain the assigned three-dimensional coordinate range of the surface feature to be scanned and the moving path in the working parameters; move the laser head to the starting point of the moving path of the assigned surface feature to be scanned; scan the surface feature along the preset moving path based on the set power and scanning speed;
[0039] For any laser head that has not completed scanning the surface features in the previous control cycle, the laser head continues to scan the surface features along the preset moving path based on the reselected power and moving speed.
[0040] As a preferred solution of the precision component surface detection method based on laser parallel control described in the present invention, the method for updating the state space is as follows: real-time monitoring and updating of the three-dimensional coordinates of each laser head; real-time monitoring and updating of the scanning state of each laser head; for each laser head with a category label of 0 in the scanning state, the power and scanning speed of the laser head are acquired and updated based on the action selected in this round of control cycle; based on the selected action, the surface features to be scanned assigned in this round of control cycle are removed from the list to be scanned.
[0041] In a second aspect, the present invention provides a precision component surface detection system based on laser parallel control, comprising a control strategy module, a laser control module, a data acquisition module, a preprocessing module, a modeling module, a surface detection module, and a user interface module; wherein:
[0042] The control strategy module is configured with a deep reinforcement learning algorithm to generate the control strategy for each laser head;
[0043] The laser control module is used to execute the control strategy and control the moving path, power and scanning speed of each laser head;
[0044] The data acquisition module is used to collect the surface height data generated during the laser head scanning process;
[0045] The preprocessing module is used to preprocess the collected surface height data;
[0046] The modeling module is used to convert the pre-processed surface height data into a three-dimensional model of the surface of the precision component;
[0047] The surface inspection module performs surface defect inspection based on the three-dimensional model of the surface of precision components;
[0048] The user interface module is used to provide a visual interface to display the scanning process, 3D model and defect detection report in real time.
[0049] Compared with the prior art, the beneficial effects achieved by the present invention are as follows:
[0050] By having multiple laser heads working in parallel, multiple surface features can be scanned in a short time, greatly shortening the scanning cycle; the working state of the laser head can be dynamically adjusted based on the deep reinforcement learning algorithm, reducing idle waiting time and unnecessary pauses, and improving equipment utilization.
[0051] Automatically match the most suitable laser power and scanning speed for different types of surface features to ensure the best balance between scanning quality and efficiency. From task allocation to scanning completion, the entire process is automated, reducing the need for manual intervention and errors caused by human factors.
[0052] By real-time monitoring of the relative positions of the laser heads, interference can be automatically avoided, reducing the risk of equipment damage, ensuring the continuity and stability of production, avoiding scanning defects caused by interference, and ensuring the consistency of surface quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative labor. Among them:
[0054] Figure 1 A flow chart of a precision component surface detection method based on laser parallel control provided by the present invention;
[0055] Figure 2 A flow chart of the training method of the strategy network provided by the present invention;
[0056] Figure 3 A flow chart of a method for selecting an action from an action space provided by the present invention. DETAILED DESCRIPTION
[0057] The technical solution of the present invention is described in detail below through the accompanying drawings and specific embodiments. It should be understood that the embodiments of the present invention and the specific features in the embodiments are detailed descriptions of the technical solution of the present invention, rather than limitations on the technical solution of the present invention. The embodiments of the present invention and the technical features in the embodiments may be combined with each other unless there is a conflict.
[0058] Example 1
[0059] This embodiment introduces a method for detecting the surface of a precision component based on laser parallel control. Figure 1 , the method comprises the following steps:
[0060] S1: Acquire all surface features to be scanned on the component surface, and set preset working parameters of the laser for each surface feature to be scanned; set the number of laser heads and the control cycle of the laser heads;
[0061] The surface features to be scanned include holes, grooves, and textures; the preset working parameters of the laser are set for each surface feature to be scanned, including the moving path, power, and scanning speed of any laser head when scanning the surface feature, specifically including a moving path and 1 to Group one-to-one correspondence between power and scanning speed; is a positive integer, which is set by those skilled in the art based on actual needs; the selectable power and the scanning speed corresponding to the power are set for different surface features through experience and a large number of experiments.
[0062] For each component material and surface feature, there is an optimal range of power and scanning speed combination, namely the "operating window". Within this range, good scanning quality and efficiency can be obtained. Factors such as the size, shape and depth of the surface features will affect the choice of power and scanning speed. For small and deep features, such as holes, higher power and slower scanning speed are required to ensure that the reflected laser intensity meets the standard; while for large and shallow features, such as textures, lower power and faster scanning speed are required to minimize the damage of the laser to the surface of the precision component and improve the scanning efficiency. Choose a low-power laser for scanning detection, usually between tens of milliwatts and hundreds of milliwatts, to avoid damage to the processed surface. Choose a suitable wavelength according to the absorption characteristics of the material to be detected. Common wavelengths are 532nm (green), 638nm (red) and 1064nm (near infrared). Choose a suitable spot size, usually between tens of microns and hundreds of microns, to ensure the resolution of the detection.
[0063] The control cycle of the laser head is continuous and has a fixed cycle length. At the beginning of each control cycle, the working state of all the laser heads is controlled once.
[0064] S2: Initialize the state space and action space of the deep reinforcement learning algorithm based on the surface features to be scanned and the number of laser heads;
[0065] The state space includes a list of surface features to be scanned, a three-dimensional coordinate range of each surface feature to be scanned, preset working parameters of each surface feature to be scanned, three-dimensional coordinates of each laser head, scanning state of each laser head, power and scanning speed of each laser head; wherein the list of surface features to be scanned is composed of all surface features to be scanned; the scanning state of each laser head includes the number of the surface feature being scanned by each laser head and a category label indicating whether the laser head has completed the scan, 1 represents the scan has been completed, and 0 represents the scan has not been completed;
[0066] The action space is a list of actions, and any action is generated based on the state space; any action includes a control strategy for each laser head; the control strategy included in any action is generated as follows:
[0067] Reading a list of surface features to be scanned and a scanning state of each laser head; sequentially assigning a surface feature to be scanned to each laser head with a category label of 1 in each scanning state for scanning, and setting a power and a scanning speed for the laser head based on preset working parameters of the assigned surface feature to be scanned, wherein the assigned surface feature to be scanned is read from the list of surface features to be scanned; for a laser head with a category label of 0 in any scanning state, if the surface feature being scanned includes more than one set of preset powers and scanning speeds, reselecting a set of preset powers and scanning speeds for the laser head;
[0068] The control strategy for each laser head also includes: in the process of the laser head scanning the surface of the component, the distance between any two laser heads is calculated in real time based on the three-dimensional coordinates of each laser head; an interference threshold is set, and when the distance between any two laser heads is less than the interference threshold, a laser head is randomly selected to trigger interference avoidance, and the scanning of the surface features is suspended until the distance between the two laser heads is not less than the interference threshold, and the scanning of the surface features continues; in any control cycle, if any laser head completes the scanning of the surface features, the laser head stops working until the next control cycle.
[0069] When multiple laser heads are working in parallel, physical collisions may occur when the distance between two or more laser heads is too close. Physical interference may cause damage to the equipment and interrupt the production process. Even if there is no physical contact, if two laser heads scan the same area at the same time, it may result in poor scanning results, causing problems such as inconsistent surface roughness and dimensional deviation. Use sensors (such as lidar, visual sensors, ultrasonic sensors, etc.) to monitor the position of each laser head in real time, and calculate the distance between each laser head and other laser heads based on three-dimensional coordinates, set a safe distance threshold, that is, the interference threshold, and when the distance between the two laser heads is less than the interference threshold, it is considered that interference may occur. The interference threshold can be set according to the size of the laser head and the characteristics of the precision component being scanned. In this way, physical collisions between laser heads can be avoided, and equipment can be protected from damage. At the same time, scanning defects caused by interference can be prevented to ensure scanning quality.
[0070] S3: At the beginning of any control cycle, an action is selected from the action space through the trained policy network; see Figure 3 , the method is as follows:
[0071] The state space is encoded into a state feature vector of fixed dimension through the encoder; this state feature vector contains all the information of the state space; the action space is encoded into an action feature vector through the encoder;
[0072] The policy network calculates and outputs the probability distribution of each action according to the state feature vector and the action feature vector;
[0073] The action space is sampled based on the probability distribution of each action to obtain the selected action. The roulette algorithm can be used to sample the action space, that is, the higher the probability of the action being sampled, the higher the probability of being selected.
[0074] The policy network is a deep learning model, including an input layer, a hidden layer, and an output layer; wherein the output layer uses a softmax activation function to output the probability distribution of each action.
[0075] Reference Figure 2 , the training method of the policy network is as follows:
[0076] S100: Conduct laser parallel scanning control experiments on the surface of precision components, initialize the state space and action space; build a strategy network and initialize parameters;
[0077] S200: At the beginning of any control cycle, an action is selected and executed through the strategy network, and a penalty value is calculated according to the penalty function; executing the action means controlling the working state of each laser head based on the selected action; the equation of the penalty function is as follows:
[0078] ;
[0079] Among them, R represents the penalty value; It indicates the number of times the i-th laser head triggers interference avoidance in the control cycle; the value range of i is 1, 2, ..., M, where M indicates the number of laser heads; is a weight coefficient, which is set by technicians in this field based on actual needs; It represents the duration of scanning the surface features by the i-th laser head in the control cycle; It represents the idle distance of the ith laser head in the control cycle; V represents the idle speed of any laser head.
[0080] Based on the guidance of the above penalty function, the number of interference stops can be minimized, while the cumulative laser scanning time and the cumulative empty line time can be minimized; since each interference stop may introduce a new source of error or the risk of restart, the probability of error in the production process can be reduced; the laser is a high-energy consumption device, and shortening the cumulative laser scanning time helps save energy, reduce operating costs, and improve system throughput; reducing the empty line time can help reduce unnecessary waiting time and avoid ineffective use of resources.
[0081] S300: When the control cycle ends, the state space is updated and the action space is regenerated;
[0082] S400: Calculating a cumulative penalty value and updating parameters of a policy network according to the cumulative penalty value;
[0083] The calculation formula of the cumulative penalty value is as follows:
[0084] ;
[0085] in, represents the current cumulative penalty value; N represents the number of actions that have been executed; β represents the discount factor, which ranges from (0, 1], represents the jth power of the discount factor β, j and the state space ,action Correspondingly, the value range is 1, 2, ..., N; Represented in state space Next action The penalty value of
[0086] The formula for updating the parameters of the policy network is as follows:
[0087] ;
[0088] Among them, δ represents any parameter in the policy network; represents the updated value of δ; Indicates that the function in the brackets is used to find the gradient of δ; η is the learning rate; is the loss function, and the calculation formula is as follows:
[0089] ;
[0090] in, Represented in state space Next action The probability of selection;
[0091] After the above parameter updates, the policy network will assign a greater selection probability to actions with lower cumulative penalty values; this update process will be repeated continuously, and the policy network will gradually learn the optimal probability distribution of each executable action in different state spaces to minimize the cumulative penalty value.
[0092] S500: Repeat S200 to S400 until the maximum number of iterations is reached, completing the training of the policy network;
[0093] After multiple iterations, the cumulative penalty value tends to be stable and no longer fluctuates significantly. The policy network is able to make action decisions that minimize the cumulative penalty value.
[0094] S600: Save the trained policy network and deploy the application.
[0095] In the working scenario of multi-laser head parallel control, the action space of each control cycle changes with the current state, which is challenging. However, the policy network based on the deep learning model is able to select the best control strategy for each laser head in this dynamic environment. The powerful representation and nonlinear mapping capabilities of the deep learning model enable it to learn complex feature representations and consider these features in the decision-making process, that is, learn the mapping relationship from state to action, and select the best action based on the current state at each decision. In each control cycle, the legal action list of each laser head is redefined according to the current state, and the probability distribution of each action is output using the deep learning model, which can achieve efficient multi-laser head parallel control.
[0096] S4: Control the working state of each laser head based on the selected action and obtain the surface height data of the precision component;
[0097] The controlling of the working state of each laser head specifically includes: for any laser head that has completed scanning of the surface feature in the previous control cycle, obtaining the assigned three-dimensional coordinate range of the surface feature to be scanned and the moving path in the working parameters; moving the laser head to the starting point of the moving path of the assigned surface feature to be scanned; scanning the surface feature along the preset moving path based on the set power and scanning speed;
[0098] For any laser head that has not completed scanning the surface features in the previous control cycle, the laser head continues to scan the surface features along the preset moving path based on the reselected power and moving speed.
[0099] The method for obtaining the surface height data of the precision component is as follows: when any laser head is scanning, a short pulse laser is emitted to the surface of the precision component, the corresponding photodetector receives the reflected laser pulse, and the laser round-trip time is measured by a high-precision clock and timer; the round-trip distance of the laser is calculated based on the laser speed and round-trip time, thereby obtaining the surface height data of the precision component.
[0100] S5: At the end of the control cycle, the state space is updated based on the state of each laser head, and the action space is regenerated based on the updated state space;
[0101] The method for updating the state space is as follows:
[0102] Monitor and update the three-dimensional coordinates of each laser head in real time; monitor and update the scanning status of each laser head in real time; for each laser head with a category label of 0 in the scanning state, obtain and update the power and scanning speed of the laser head based on the action selected in this control cycle; based on the selected action, remove the surface features to be scanned assigned in this control cycle from the list to be scanned.
[0103] Optionally, at the end of each control cycle, the empty distance of each laser head, the number of times the interference avoidance is triggered, and the duration of scanning the surface feature are recorded so as to regularly optimize the strategy network. The empty distance refers to the distance traveled by the laser head to the starting point of the movement path of the assigned surface feature to be scanned.
[0104] After updating the state space, the action space is regenerated. For the laser head that has completed scanning a surface feature in the current control cycle, it is necessary to assign it another surface feature to be scanned; and for the laser head that has not completed scanning a surface feature in the current control cycle, it may be necessary to adjust its power and scanning speed to achieve a better parallel scanning effect. The adjustment and control of any laser head must be determined according to the current state space.
[0105] S6: Repeat S3 to S5 until all surface features of the component surface are scanned and a three-dimensional model of the surface of the precision component is established;
[0106] The method of establishing the three-dimensional model of the surface of the precision component is as follows:
[0107] Perform data cleaning and data alignment on the height data of the surface of precision components; for example, use filtering algorithms (such as Gaussian filtering, median filtering) to remove noise in the data; for missing data points, use interpolation methods (such as linear interpolation, spline interpolation) to fill in. Calibration plates or known reference points can be used for data alignment to ensure that the data collected by all laser heads are in the same coordinate system, and then the data from multiple laser heads are spliced into a complete data set. The data set contains height data of surface feature areas collected by the laser head, as well as height data of preset non-feature areas, which together constitute a complete height data set for the surface of precision components;
[0108] Converting the surface height data in the data set into point cloud data, each data point containing three-dimensional coordinates; using a gridding algorithm (such as Delaunay triangulation, Voronoi diagram) to convert the point cloud data into a grid model;
[0109] Use surface fitting algorithms (such as B-spline and NURBS) to smooth the mesh model and generate a smooth surface; then use subdivision algorithms (such as Loop subdivision and Catmull-Clark subdivision) to further refine the surface and improve the accuracy of the model;
[0110] Use professional 3D modeling and visualization software (such as Blender, MeshLab, MATLAB, Python's Mayavi library) to visualize the model; use color coding to represent different height values, intuitively display the height changes of the surface, and obtain a 3D model of the surface of the precision component.
[0111] S7: Based on the three-dimensional model of the surface of the precision component, the surface defect detection of the precision component is performed. The method is as follows: the three-dimensional model of the surface of the precision component is tested for flatness, and the flatness of the three-dimensional model surface is calculated to detect whether there are uneven areas. The three-dimensional model of the surface of the precision component is tested for curvature, and the curvature of the model surface is calculated to detect whether there are abnormal curvature changes. The three-dimensional model of the surface of the precision component is tested for thickness, and the thickness of the model surface is calculated to detect whether there are areas of uneven thickness.
[0112] Through the above steps, the collection of surface height data of precision components, the construction of three-dimensional models and surface inspection can be completed, ensuring the accuracy and completeness of the data, providing efficient defect detection and geometric analysis methods, and helping to improve the product quality and production efficiency of precision components.
[0113] Example 2
[0114] This embodiment is the second embodiment of the present invention; based on the same inventive concept as the first embodiment, this embodiment introduces a precision component surface detection system based on laser parallel control, including a control strategy module, a laser control module, a data acquisition module, a preprocessing module, a modeling module, a surface detection module, and a user interface module; wherein:
[0115] The control strategy module is configured with a deep reinforcement learning algorithm to generate the control strategy for each laser head;
[0116] The control strategy module includes an initialization unit for initializing the state space and action space, setting the number of laser heads and the control cycle; a state update unit for updating the parameters in the state space at the end of each control cycle; and an action selection unit for selecting the optimal action from the action space as the control strategy for each laser head based on a deep reinforcement learning algorithm.
[0117] The laser control module is used to execute the control strategy, control the moving path, power and scanning speed of each laser head, and ensure that the laser head scans the surface features according to the preset working parameters;
[0118] The data acquisition module is used to collect the surface height data generated during the laser head scanning process;
[0119] The data acquisition module includes a photoelectric detection unit, a clock unit, and a calculation unit; wherein: the photoelectric detection unit is used to receive the reflected laser pulse; the clock unit is used to measure the laser round-trip time; and the calculation unit calculates the surface height data based on the laser round-trip time and the speed of light.
[0120] The preprocessing module is used to preprocess the collected surface height data, including data cleaning, alignment and splicing;
[0121] The modeling module is used to convert the pre-processed surface height data into a three-dimensional model of the surface of the precision component;
[0122] The surface inspection module performs surface defect detection based on the three-dimensional model of the surface of the precision component; it includes: a flatness detection unit, which is used to calculate the flatness of the surface and detect uneven areas; a curvature detection unit, which is used to calculate the curvature of the surface and detect abnormal curvature changes; a thickness detection unit, which is used to calculate the thickness of the surface and detect areas with uneven thickness; a defect marking unit, which is used to mark the detected defective areas and generate a defect detection report.
[0123] The user interface module is used to provide a visual interface to display the scanning process, three-dimensional model and defect detection report in real time; it includes: a graphic display unit, which is used to display the three-dimensional model and defect detection report in real time; a data visualization unit, which uses color coding to represent different height values and defect areas in the three-dimensional model; an operation guide unit, which is used to provide detailed operation guides and help documents.
[0124] The specific functional implementation of each of the above modules can be referred to the relevant contents of the precision component surface detection method based on laser parallel control described in Example 1, and will not be elaborated here.
[0125] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0126] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the purpose and scope of protection of the present invention, which are all within the protection of the present invention.
Claims
1. A method for detecting the surface of a precision component based on laser parallel control, characterized in that: The following steps are involved: S1: Acquire all surface features to be scanned on the component surface, and set preset working parameters of the laser for each surface feature to be scanned; set the number of laser heads and the control cycle of the laser heads; S2: Initialize the state space and action space of the deep reinforcement learning algorithm based on the surface features to be scanned and the number of laser heads; The action space is a list of actions, and any action includes a control strategy for each laser head; the control strategy includes the surface features to be scanned, power, and scanning speed assigned to the corresponding laser head; The control strategy for each laser head also includes: in the process of scanning the surface of the component by the laser head, the distance between any two laser heads is calculated in real time based on the three-dimensional coordinates of each laser head; setting an interference threshold, when the distance between any two laser heads is less than the interference threshold, randomly selecting a laser head to trigger interference avoidance, pausing scanning of surface features until the distance between the two laser heads is not less than the interference threshold, and continuing scanning of surface features; in any control cycle, if any laser head completes scanning of surface features, the laser head stops working until the next control cycle; S3: At the beginning of any control cycle, an action is selected from the action space through the trained policy network, specifically including: the policy network calculates the probability distribution of each action; based on the probability distribution, the action space is sampled to obtain the selected action; The training method of the strategy network includes calculating a penalty value according to a penalty function; calculating a cumulative penalty value and updating the parameters of the strategy network according to the cumulative penalty value; wherein the penalty function includes calculating the penalty value based on the number of times the laser head triggers interference avoidance in a control cycle, the duration of the laser head scanning the surface features in the control cycle, the empty line distance of the laser head in the control cycle, and the empty line speed of the laser head; S4: Control the working state of each laser head based on the selected action and obtain the surface height data of the precision component; S5: At the end of the control cycle, the state space is updated based on the state of each laser head, and the action space is regenerated based on the updated state space; S6: Repeat S3 to S5 until all surface features of the component surface are scanned and a three-dimensional model of the surface of the precision component is established; S7: Based on the three-dimensional model of the surface of the precision component, perform surface defect detection on the precision component.
2. A method for detecting the surface of a precision component based on laser parallel control as claimed in claim 1, characterized in that: The surface features to be scanned include holes, grooves, and textures; the preset working parameters of the laser are set for each surface feature to be scanned, including the moving path, power, and scanning speed of any laser head when scanning the surface feature, specifically including a moving path and 1 to Group power and scan speed; The control cycle of the laser head is continuous and has a fixed cycle length. At the beginning of each control cycle, the working state of all the laser heads is controlled once.
3. A method for detecting the surface of a precision component based on laser parallel control as claimed in claim 2, characterized in that: The state space includes a list of surface features to be scanned, a three-dimensional coordinate range of each surface feature to be scanned, preset working parameters of each surface feature to be scanned, three-dimensional coordinates of each laser head, scanning state of each laser head, power and scanning speed of each laser head; wherein the list of surface features to be scanned is composed of all surface features to be scanned; the scanning state of each laser head includes the number of the surface feature being scanned by each laser head and a category label indicating whether the laser head has completed the scan, 1 represents the scan has been completed, and 0 represents the scan has not been completed; The action space is a list of actions, and any action is generated based on the state space; any action includes a control strategy for each laser head; the control strategy included in any action is generated as follows: Read the list of surface features to be scanned and the scanning state of each laser head; assign a surface feature to be scanned to each laser head with a category label of 1 in each scanning state for scanning in turn, and set the power and scanning speed for the laser head based on the preset working parameters of the assigned surface feature to be scanned, and the assigned surface feature to be scanned is read from the list of surface features to be scanned; for a laser head with a category label of 0 in any scanning state, if the surface feature being scanned contains more than one set of preset power and scanning speed, reselect a set of preset power and scanning speed for the laser head.
4. A method for detecting the surface of a precision component based on laser parallel control as claimed in claim 3, characterized in that: The method of selecting an action from the action space through the trained policy network is as follows: The state space is encoded into a state feature vector of fixed dimension through the encoder; the action space is encoded into an action feature vector through the encoder; The policy network calculates the probability distribution of each action according to the state feature vector and the action feature vector; The action space is sampled based on the probability distribution of each action to obtain the selected action.
5. A method for detecting the surface of a precision component based on laser parallel control as claimed in claim 4, characterized in that: The training method of the policy network is as follows: S100: Conduct laser parallel scanning control experiments on the surface of precision components, initialize the state space and action space; build a strategy network and initialize parameters; S200: At the beginning of any control cycle, an action is selected and executed through the policy network, and a penalty value is calculated according to the penalty function; S300: When the control cycle ends, the state space is updated and the action space is regenerated; S400: Calculating a cumulative penalty value and updating parameters of a policy network according to the cumulative penalty value; S5 00: Repeat S200~S400 until the maximum number of iterations is reached and the training of the policy network is completed; S600: Save the trained policy network and deploy the application.
6. A method for detecting the surface of a precision component based on laser parallel control as claimed in claim 5, characterized in that: The penalty function equation is as follows: ; Among them, R represents the penalty value; It indicates the number of times the i-th laser head triggers interference avoidance in the control cycle; the value range of i is 1, 2, ..., M, where M indicates the number of laser heads; is the weight coefficient; It represents the duration of scanning the surface features by the i-th laser head in the control cycle; It represents the idle distance of the ith laser head in the control cycle; V represents the idle speed of any laser head.
7. A method for detecting the surface of a precision component based on laser parallel control as claimed in claim 6, characterized in that: The controlling of the working state of each laser head specifically includes: For any laser head that has completed scanning of the surface feature in the previous control cycle, obtain the assigned three-dimensional coordinate range of the surface feature to be scanned and the moving path in the working parameters; move the laser head to the starting point of the moving path of the assigned surface feature to be scanned; scan the surface feature along the preset moving path based on the set power and scanning speed; For any laser head that has not completed scanning the surface features in the previous control cycle, the laser head continues to scan the surface features along the preset moving path based on the reselected power and moving speed.
8. A method for detecting the surface of a precision component based on laser parallel control as claimed in claim 7, characterized in that: The method for updating the state space is as follows: real-time monitoring and updating of the three-dimensional coordinates of each laser head; real-time monitoring and updating of the scanning state of each laser head; for each laser head with a category label of 0 in the scanning state, obtaining and updating the power and scanning speed of the laser head based on the action selected in this round of control cycle; based on the selected action, removing the surface features to be scanned assigned in this round of control cycle from the to-be-scanned list.
9. A precision component surface detection system based on laser parallel control, used to implement a precision component surface detection method based on laser parallel control as claimed in any one of claims 1 to 8, characterized in that , including control strategy module, laser control module, data acquisition module, preprocessing module, modeling module, surface detection module, user interface module; among them: The control strategy module is configured with a deep reinforcement learning algorithm to generate the control strategy for each laser head; The laser control module is used to execute the control strategy and control the moving path, power and scanning speed of each laser head; The data acquisition module is used to collect the surface height data generated during the laser head scanning process; The preprocessing module is used to preprocess the collected surface height data; The modeling module is used to convert the pre-processed surface height data into a three-dimensional model of the surface of the precision component; The surface inspection module performs surface defect inspection based on the three-dimensional model of the surface of precision components; The user interface module is used to provide a visual interface to display the scanning process, 3D model and defect detection report in real time.
Citation Information
Patent Citations
High-precision tunnel cross-section detection method and device based on double laser bands
CN103630088B
Large-aperture optical element surface nanoscale defect parallel scanning detection device and method
CN117269169A
Deep reinforcement learning for robotic manipulation
CN112313044A