A bending compensation surface rolling processing method and system based on CNC machine tools
Through dynamic simulation and adaptive optimization algorithm of CNC machine tools, combined with image processing technology to optimize the rolling path, the bending compensation accuracy and quality problems in the existing technology are solved, and high-precision surface rolling treatment is achieved.
Patent Information
- Application Number
- CN202411337658.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-25
- Publication Date
- 2024-12-10
- Estimated Expiration
- 2044-09-25
AI Technical Summary
The existing bending compensation surface rolling treatment method is difficult to accurately match the workpiece surface, resulting in a decrease in processing accuracy and quality, and fail to effectively solve the deformation problems caused by stress and deformation.
Using a CNC machine tool method, the initial surface data of the workpiece is obtained for preprocessing, a digital model is constructed for dynamic simulation, the bending compensation position is determined, and the target parameters are optimized using an adaptive optimization algorithm, and the crushing path is optimized in combination with image processing technology to ensure the crushing The path matches the workpiece shape.
Improve the accuracy and processing quality of bending compensation, ensure that the workpiece surface reaches its optimal state in each area, and avoid excessive or insufficient processing.
Smart Images

Figure CN118875084B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of metal plate surface treatment, and in particular to a bending compensation surface rolling treatment method and system based on a numerically controlled machine tool. Background Art
[0002] Workpiece bending compensation refers to the process of offsetting or reducing the bending deformation of the workpiece to achieve the desired shape and size by adjusting the processing parameters or taking specific process means during the processing. This compensation involves: adjustment of processing parameters, such as feed speed, cutting depth, etc. Process means, such as pre-applying reverse deformation, using fixtures, etc. Specifically, a method of correcting the bending deformation of the workpiece surface through a mechanical rolling process. The rolling process applies pressure on the surface of the workpiece to cause plastic deformation of the material layer, thereby eliminating or reducing the bending. For example, the surface of the workpiece is processed by a roller, and the surface of the workpiece is plastically deformed by applying continuous pressure to achieve the purpose of improving the surface quality and correcting the bending deformation.
[0003] In the existing bending compensation surface rolling treatment, for example, Chinese patent CN114682628B discloses a bending compensation surface rolling treatment method, which rolls the surface of the metal plate a set number of times according to set parameters under predetermined temperature conditions, so that the surface layer of the metal plate forms a gradient structure, thereby improving the performance of the metal plate to meet predetermined requirements.
[0004] However, the above method still has the following shortcomings: how to solve the deformation problem caused by stress and deformation of the workpiece during processing, that is, how to effectively improve the processing accuracy through bending compensation. In addition, the rolling path of the workpiece surface in the traditional method is difficult to accurately match the workpiece surface, which reduces the quality of surface processing.
[0005] Currently, no effective solution has been proposed for the problems in the related technologies. Summary of the invention
[0006] In view of this, the purpose of this application is to provide a bending compensation surface rolling processing method and system based on a CNC machine tool to overcome the above-mentioned technical problems existing in the existing related technologies.
[0007] To this end, the specific technical solution adopted by the present invention is as follows:
[0008] According to one aspect of the present invention, a bending compensation surface rolling processing method based on a CNC machine tool is provided, and the bending compensation surface rolling processing method based on a CNC machine tool comprises the following steps:
[0009] S1, obtaining initial surface data of a workpiece, and preprocessing the obtained initial surface data;
[0010] S2. Build a digital model of the CNC machine tool, simulate the movement and load of the CNC machine tool through the digital model, and perform dynamic simulation of the machining process based on the initial surface data of the workpiece;
[0011] S3. According to the dynamic simulation results, the position of the workpiece where bending compensation is required is determined, and the target parameters of the bending compensation are determined by using an adaptive optimization algorithm;
[0012] S4, generating a workpiece surface rolling path according to the target parameters of the bending compensation, and optimizing the workpiece surface rolling path based on the image processing technology to obtain the surface rolling target path;
[0013] S5. Based on the target path of surface rolling and the target parameters of bending compensation, the rollers configured in the CNC machine tool are controlled to perform surface rolling on the workpiece.
[0014] Furthermore, obtaining the initial surface data of the workpiece and preprocessing the obtained initial surface data include the following steps:
[0015] S11, acquiring original point cloud data of the workpiece based on scanning technology, and acquiring original coordinate data of the workpiece based on detection technology;
[0016] S12, performing denoising, smoothing and formatting processing on the original point cloud data and the original coordinate data.
[0017] Furthermore, constructing a digital model of a CNC machine tool, simulating the movement and load of the CNC machine tool through the digital model, and performing a dynamic simulation of the machining process based on the initial surface data of the workpiece include the following steps:
[0018] S21, constructing a digital model of the CNC machine tool according to the parameter set of the CNC machine tool, importing the digital model into a simulation environment, setting the simulation environment and defining a machining process;
[0019] S22, start dynamic simulation, collect dynamic simulation analysis data, and the dynamic simulation analysis data includes deformation data and stress data of the workpiece during the processing.
[0020] Further, according to the dynamic simulation results, determining the position of the workpiece where bending compensation is required, and using an adaptive optimization algorithm to determine the target parameters of the bending compensation includes the following steps:
[0021] S31, based on the deformation data and stress data of the workpiece during the processing, performing deformation analysis on the workpiece, determining the maximum deformation position and corresponding deformation amount of the workpiece in each direction, and performing stress analysis on the workpiece to identify high stress areas;
[0022] S32, combining the deformation analysis results and stress analysis results of the workpiece to determine the position where the workpiece needs to be bent and the compensation bending amount in each direction;
[0023] S33, defining an optimization objective function and setting constraint conditions according to the position where the workpiece needs to be bent and the amount of compensation bending in each direction;
[0024] S34, selecting and executing an adaptive optimization algorithm, and after the convergence condition is met, outputting target parameters of bending compensation.
[0025] Further, selecting and executing the adaptive optimization algorithm, and after the convergence condition is met, outputting the target parameters of the bending compensation includes the following steps:
[0026] S341, randomly initializing a population including a number of individuals, each of which represents a bending compensation scheme, and setting parameters of an adaptive optimization algorithm;
[0027] S342. For each individual in the population, calculate the fitness value according to the defined optimization objective function;
[0028] S343, updating the position of the individual according to the fitness value, and selecting the individual with the high fitness value in the current population as the discoverer;
[0029] S344, based on the finder formula, the global optimal individual position is introduced to enhance the global search capability, and the adaptive expansion coefficient is used to adjust the search range;
[0030] S345, randomly select a number of individuals as joiners, and the joiners move closer to the discoverer and search around themselves;
[0031] S346. Randomly select a number of individuals as sentinels, and the sentinels are used to increase population diversity;
[0032] S347, use non-dominated sorting to determine the dominance relationship of individuals, and use the roulette algorithm to select the global optimal individual;
[0033] S348, check whether the adaptive optimization algorithm reaches the preset stop criterion. If it does, the individual with the highest fitness value is output.
[0034] Furthermore, generating a workpiece surface rolling path according to the target parameters of the bending compensation, and optimizing the workpiece surface rolling path based on the image processing technology, and obtaining the surface rolling target path includes the following steps:
[0035] S41, generating a preliminary rolling path according to the initial surface data of the workpiece, the position where bending compensation is required, and the determined rolling area;
[0036] S42, before rolling, obtaining image data of the workpiece surface, and applying an edge detection algorithm to extract edge features of the workpiece surface;
[0037] S43, adjusting and optimizing the preliminary rolling path based on the edge features of the workpiece surface, the target parameters of the bending compensation and the compensation bending amount to obtain the surface rolling target path.
[0038] Furthermore, before rolling is performed, obtaining image data of the workpiece surface and applying an edge detection algorithm to extract edge features of the workpiece surface includes the following steps:
[0039] S421, acquiring image data of the workpiece surface, and preprocessing the image data of the workpiece surface;
[0040] S422, applying a gradient operator to calculate the gradient amplitude and direction of the workpiece surface image in the horizontal and vertical directions, and using a gradient template to increase the direction of the gradient calculation, and calculating the total gradient amplitude and main gradient direction of each pixel;
[0041] S423, performing non-maximum suppression on each pixel according to the gradient direction map to obtain a refined edge map;
[0042] S424, setting a first threshold and a second threshold to distinguish obvious edges, potential edges and non-edges; wherein the first threshold is greater than the second threshold;
[0043] S425, marking pixels whose gradient magnitude is higher than a first threshold as obvious edges, and marking pixels whose gradient magnitude is lower than a second threshold as non-edges;
[0044] S426, taking pixels between the first threshold and the second threshold as potential edges, checking whether the pixels as potential edges are connected to pixels of obvious edges, if so, marking the corresponding pixels as obvious edges, otherwise marking them as non-edges; obtaining a binary edge map according to the distinction between obvious edges and non-edges;
[0045] S427. Extract edge features of the workpiece surface from the binary edge map, including the position, length and direction of the edge.
[0046] Further, the preliminary rolling path is adjusted and optimized based on the edge features of the workpiece surface, the target parameters of the bending compensation and the compensation bending amount, and the surface rolling target path is obtained, which includes the following steps:
[0047] S431, adjusting the preliminary rolling path according to the edge features of the workpiece surface so that the path fits the shape of the workpiece surface;
[0048] S432, applying a path smoothing algorithm to smooth the path;
[0049] S433. Adjust the density of the rolling path according to the target parameters of the bending compensation, and adjust the number of times the rolling path covers the compensation key area according to the compensation bending amount to obtain the surface rolling target path.
[0050] Further, based on the surface rolling target path and the target parameters of the bending compensation, controlling the rollers configured in the CNC machine tool to perform surface rolling processing on the workpiece includes the following steps:
[0051] S51, setting processing parameters of the CNC machine tool according to the target path of the surface rolling and the target parameters of the bending compensation;
[0052] S52, during the rolling process, collecting feedback data of the workpiece surface;
[0053] S53. Dynamically adjust the processing parameters of the CNC machine tool according to the feedback data of the workpiece surface.
[0054] According to another aspect of the present invention, a bending compensation surface rolling processing system based on a CNC machine tool is also provided. The bending compensation surface rolling processing system based on a CNC machine tool includes a surface data acquisition module, a CNC machine tool simulation module, a target parameter acquisition module, a target path acquisition module and a surface rolling implementation module.
[0055] The surface data acquisition module is used to acquire the initial surface data of the workpiece and pre-process the acquired initial surface data.
[0056] The CNC machine tool simulation module is used to build a digital model of the CNC machine tool, simulate the movement and load of the CNC machine tool through the digital model, and perform dynamic simulation of the machining process based on the initial surface data of the workpiece.
[0057] The target parameter acquisition module is used to determine the position of the workpiece that needs to be bent according to the dynamic simulation results, and to determine the target parameters of the bending compensation by using an adaptive optimization algorithm.
[0058] The target path acquisition module is used to generate a workpiece surface rolling path according to the target parameters of the bending compensation, and optimize the workpiece surface rolling path based on the image processing technology to obtain the surface rolling target path.
[0059] The surface rolling implementation module is used to control the rollers configured in the CNC machine tool to perform surface rolling processing on the workpiece based on the surface rolling target path and the target parameters of the bending compensation.
[0060] The present invention includes the following beneficial effects:
[0061] (1) The present invention can simulate the deformation and stress distribution of the workpiece during the machining process through the digital model and dynamic simulation of the CNC machine tool. The deformation of the workpiece can be accurately predicted before machining, thereby determining the specific position that requires bending compensation.
[0062] (2) The present invention adopts an adaptive optimization algorithm to optimize the bending compensation parameters according to the deformation data and stress data during processing. By introducing a method combining global search and local search, the optimization target can be found more effectively. Not only is the accuracy of the final bending compensation improved, but it can also be adaptively adjusted according to the actual situation of the workpiece to ensure the high quality of the processing results.
[0063] (3) In the process of generating the surface rolling path, the present invention uses image processing technology and edge detection to extract the surface features of the workpiece, ensuring that the rolling path can closely fit the actual shape of the workpiece, making the surface rolling treatment more accurate, especially on complex curved surfaces, avoiding the problem of over-processing or inadequate processing. At the same time, by adjusting the rolling path density and the number of coverage times, not only can the processing accuracy be improved, but also the workpiece surface treatment process can be effectively optimized to ensure that the surface quality of the workpiece in each area reaches the best state. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. 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 paying creative work.
[0065] Figure 1 is a flow chart of a bending compensation surface rolling processing method based on a CNC machine tool according to an embodiment of the present invention;
[0066] Figure 2 It is a structural block diagram of a bending compensation surface rolling processing system based on a CNC machine tool according to an embodiment of the present invention.
[0067] In the figure:
[0068] 1. Surface data acquisition module; 2. CNC machine tool simulation module; 3. Target parameter acquisition module; 4. Target path acquisition module; 5. Surface rolling implementation module. DETAILED DESCRIPTION
[0069] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0070] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0071] According to an embodiment of the present invention, a bending compensation surface rolling processing method and system based on a numerically controlled machine tool are provided.
[0072] The present invention is further described with reference to the accompanying drawings and specific embodiments. Figure 1 As shown, according to one embodiment of the present invention, a bending compensation surface rolling processing method based on a CNC machine tool is provided, and the bending compensation surface rolling processing method based on a CNC machine tool comprises the following steps:
[0073] S1. Obtain the initial surface data of the workpiece, including laser scanning, tactile detection and other methods, and pre-process the acquired initial surface data, including denoising, smoothing and formatting, to ensure the accuracy and consistency of the data.
[0074] In a further embodiment, obtaining initial curved surface data of a workpiece and preprocessing the obtained initial curved surface data comprises the following steps:
[0075] S11, acquiring original point cloud data of the workpiece based on scanning technology, and acquiring original coordinate data of the workpiece based on detection technology;
[0076] For example, a laser scanner is started to scan the surface of a workpiece to generate original point cloud data. The original point cloud data obtained by scanning is stored in a computer.
[0077] Install the tactile detection equipment (such as tactile probe) on the CNC machine tool or special detection device. According to the size and shape of the workpiece, set the detection equipment's detection distance, speed, path and other parameters. Start the detection equipment, detect the workpiece surface point by point, and record the original coordinate data of each detection point.
[0078] S12, performing denoising, smoothing and formatting processing on the original point cloud data and the original coordinate data;
[0079] Specifically, select a suitable denoising method (such as mean filtering, median filtering, or Gaussian filtering). Select a suitable smoothing method (such as Laplace smoothing, bilateral filtering, or surface fitting). Determine the storage format of the data (such as XYZ format, PLY format, or STL format).
[0080] S2. Build a digital model of the CNC machine tool in the cloud server, simulate the movement and load of the CNC machine tool through the digital model, and perform dynamic simulation of the machining process based on the initial surface data of the workpiece.
[0081] In a further embodiment, constructing a digital model of a CNC machine tool, simulating the movement and load of the CNC machine tool through the digital model, and performing a dynamic simulation of the machining process based on the initial surface data of the workpiece includes the following steps:
[0082] S21. Constructing a digital model of the CNC machine tool according to the parameter set of the CNC machine tool, specifically:
[0083] Collect physical parameters: including machine tool structure, moving parts, load capacity, etc. Collect operating parameters: including machine tool feed speed, spindle speed, cutting force, etc. Collect control parameters: including machine tool control system, servo drive parameters, etc. Select suitable modeling software and create a geometric model of the CNC machine tool in the modeling software. Add material properties, kinematics and dynamic characteristics to the geometric model. Set the operating conditions of the model according to the collected parameters. Modeling software types include CAD / CAM software and finite element analysis software; specific modeling software, such as SolidWorks (a three-dimensional computer-aided design software), ANSYS (a set of engineering simulation software), etc.
[0084] Import the digital model into the simulation environment, set up the simulation environment and define the processing technology, specifically:
[0085] Import the digital model of the CNC machine tool into the simulation environment. Set the simulation time step, accuracy requirements, boundary conditions, etc. Import the pre-processed initial surface data of the workpiece.
[0086] Define the machining path according to the initial surface of the workpiece and the machining requirements. Set the machining sequence and steps according to the machining process. Set machining parameters such as cutting speed, feed speed, spindle speed, cutting depth, etc.
[0087] S22, start dynamic simulation, collect dynamic simulation analysis data, and the dynamic simulation analysis data includes deformation data and stress data of the workpiece during the processing, specifically:
[0088] Start dynamic simulation on the cloud server. Monitor the status of the CNC machine tool and workpiece during the simulation process, and extract key data recorded during the simulation process, such as the deformation, stress distribution, surface roughness, etc. of the workpiece. Analyze the simulation data and evaluate the deformation and stress data of the workpiece during the processing.
[0089] Among them, deformation data mainly focuses on deformation data, that is, the deformation of the workpiece as a whole during the processing and the deformation of specific areas or key points. Stress data mainly focuses on stress distribution, including the stress state of each part of the workpiece, the distribution of the maximum principal stress, the minimum principal stress, the intermediate principal stress, and the shear stress distribution in all directions. Collecting these dynamic simulation analysis data can fully understand the deformation and stress of the workpiece during the processing process, and provide strong support for subsequent bending compensation and surface rolling treatment.
[0090] In addition, the simulation results can be visualized, such as generating deformation diagrams, stress distribution diagrams and other visualization results.
[0091] S3. According to the dynamic simulation results, the position of the workpiece that needs to be bent is determined, and the target parameters of the bending compensation are determined by using an adaptive optimization algorithm.
[0092] In a further embodiment, determining the position of the workpiece where bending compensation is required according to the dynamic simulation results, and using an adaptive optimization algorithm to determine the target parameters of the bending compensation includes the following steps:
[0093] S31. Based on the deformation data and stress data of the workpiece during the processing, deformation analysis is performed on the workpiece to determine the maximum deformation position and corresponding deformation amount of the workpiece in each direction, and stress analysis is performed on the workpiece to identify high stress areas to infer stress concentration positions that may cause bending.
[0094] S32, combining the deformation analysis results and stress analysis results of the workpiece to determine the position where the workpiece needs to be bent and the compensation bending amount in each direction;
[0095] S33, defining an optimization objective function according to the position where the workpiece needs to be bent and the amount of compensation bending in each direction. For example, the objective function may be to minimize the bending deformation or stress concentration of the workpiece in a specific area;
[0096] Set constraints: define the constraints of compensation parameters, such as the range of compensation, the limitation of machining path, etc. For example, the compensation is between 0-1mm, and the machining path cannot exceed the workpiece boundary.
[0097] S34, selecting and executing an adaptive optimization algorithm, and after the convergence condition is met, outputting target parameters of bending compensation.
[0098] In a further embodiment, selecting and executing the adaptive optimization algorithm, and after the convergence condition is met, outputting the target parameters of the bending compensation includes the following steps:
[0099] S341. Randomly initialize a population containing several individuals, and each individual represents a bending compensation scheme, which includes the compensation bending amount in each direction, and set the parameters of the adaptive optimization algorithm, including population size, number of iterations, mutation probability, etc.
[0100] S342. For each individual in the population, the fitness value is calculated according to the defined optimization objective function.
[0101] S343. Update the position of the individual according to the fitness value, select the individual with a high fitness value in the current population as the discoverer, and the discoverer is used to guide the entire population towards a better solution;
[0102] S344. Based on the finder formula, the global optimal individual position is introduced to enhance the global search capability, and the adaptive expansion coefficient is used to adjust the search range.
[0103] The finder formula is:
[0104] In the formula, Represents an individual i In the iteration t The position in the wheel represents the solution of the current individual in the solution space. This is the core of the discoverer formula, which represents the state of the current individual. The position of each individual represents a bending compensation solution. Represents an individual i In the iteration t +1 New position in round 1. The new position calculated by the formula means the new bending compensation scheme generated by the individual adjustment. P i Represents an individual i The best historical position, in bending compensation, is the best compensation solution obtained by the individual in a previous round of iterations. G represents the global optimal position, which means the best bending compensation solution found so far. c 1 and c 2 represents the learning factor or acceleration constant, which is used to adjust the degree to which an individual follows its own historical optimal solution and the global optimal solution. c 1. Control the ability of individuals to move toward their own optimal solution. c 2. Control the ability of individuals to move toward the global optimal solution of the group. r 1 and r 2 represents a random number, ranging from [0, 1], which is used to introduce randomness to enhance the diversity of the search. The discoverer individual guides the group to explore the search space more effectively and find a better bending compensation solution.
[0105] S345. Several individuals are randomly selected as joiners, and the joiners move closer to the discoverer and search around themselves.
[0106] S346. Randomly select several individuals as sentinels, and the sentinels are used to increase population diversity and help escape from local optimality.
[0107] S347. Use non-dominated sorting to determine the dominance relationship of individuals, and use the roulette algorithm to select the global optimal individual.
[0108] S348, check whether the adaptive optimization algorithm reaches the preset stop criterion. If it does, the individual with the highest fitness value is output.
[0109] S4. Generate a workpiece surface rolling path according to the target parameters of the bending compensation, and optimize the workpiece surface rolling path based on image processing technology to obtain a surface rolling target path.
[0110] In a further embodiment, generating a workpiece surface rolling path according to the target parameters of the bending compensation, and optimizing the workpiece surface rolling path based on the image processing technology, and obtaining the surface rolling target path includes the following steps:
[0111] S41, generating a preliminary rolling path according to the initial surface data of the workpiece, the position where bending compensation is required, and the determined rolling area;
[0112] Specifically, a coverage path is generated within a determined rolling area, and the path generation adopts a standard path planning algorithm, such as a contour path or an adaptive grid division method, to ensure that the path is smooth and evenly distributed.
[0113] S42. Before rolling, image data of the workpiece surface is obtained, and edge features of the workpiece surface are extracted by applying an edge detection algorithm.
[0114] S43, adjusting and optimizing the preliminary rolling path based on the edge features of the workpiece surface, the target parameters of the bending compensation and the compensation bending amount to obtain the surface rolling target path.
[0115] In a further embodiment, before rolling is performed, acquiring image data of the workpiece surface and applying an edge detection algorithm to extract edge features of the workpiece surface comprises the following steps:
[0116] S421, acquiring image data of the workpiece surface, and preprocessing the image data of the workpiece surface, including grayscale conversion, denoising, contrast enhancement, etc.
[0117] S422. Apply a gradient operator (such as the Scharr operator) to calculate the gradient amplitude and direction of the workpiece surface image in the horizontal and vertical directions, and use a 3x3 gradient template to increase the direction of gradient calculation, such as 45° and 135° directions, to enhance the accuracy of edge detection, and calculate the total gradient amplitude and main gradient direction of each pixel.
[0118] Among them, the Scharr operator is used to calculate the gradient magnitude and direction of the image in the horizontal and vertical directions:
[0119] The Scharr operator is a gradient operator for edge detection that performs convolution operations on an image to calculate gradients in the horizontal and vertical directions. These gradients reflect the intensity and direction of changes in image brightness and are the basis for edge detection. The Scharr operator uses a 3x3 convolution kernel to calculate gradients in the horizontal and vertical directions separately. These convolution kernels have higher weights in the diagonal direction, making the operator more sensitive to directional changes in the edge. Using a 3x3 gradient template, the 45° and 135° directions are considered to enhance the accuracy of edge detection. By adding gradient calculations in the 45° and 135° directions, the edge information in the image can be more fully captured, especially when the edge direction is not completely parallel to the image coordinate axis.
[0120] After obtaining the gradient information in multiple directions, it is necessary to combine this information to determine the total gradient magnitude (edge strength) and main gradient direction (edge direction) of each pixel, which is crucial for subsequent non-maximum suppression and threshold processing. By combining the gradient magnitudes in each direction (for example, using the Euclidean norm calculation), the total gradient magnitude of each pixel is obtained, which represents the edge strength of the point. The main direction of the edge is determined by analyzing the relative magnitude of the gradient magnitudes in each direction. This is usually achieved by comparing the gradient magnitudes in each direction and selecting the direction of the maximum value.
[0121] S423. According to the gradient direction map, non-maximum suppression is performed on each pixel, and only the local maximum value in the gradient direction is retained. Through this process, the edge is refined, and non-edge pixels near the edge are removed to obtain a refined edge map.
[0122] S424, setting a first threshold and a second threshold (i.e., a high threshold and a low threshold) to distinguish obvious edges, potential edges, and non-edges, wherein the first threshold corresponds to the high threshold, the second threshold corresponds to the low threshold, and the first threshold is greater than the second threshold.
[0123] S425: Mark pixels whose gradient magnitude is higher than the first threshold as obvious edges, and mark pixels whose gradient magnitude is lower than the second threshold as non-edges.
[0124] S426, taking pixels between the first threshold and the second threshold as potential edges, checking whether the pixels as potential edges are connected to pixels of obvious edges, if so, marking the corresponding pixels as obvious edges, otherwise marking them as non-edges; and obtaining a binary edge map based on the distinction between obvious edges and non-edges.
[0125] S427. Extract edge features of the workpiece surface from the binary edge map, including the position, length and direction of the edge.
[0126] In a further embodiment, adjusting and optimizing the preliminary rolling path based on the edge features of the workpiece surface, the target parameters of the bending compensation and the compensation bending amount to obtain the surface rolling target path includes the following steps:
[0127] S431. According to the edge features of the workpiece surface, adjust the initial rolling path so that the path fits the shape of the workpiece surface more closely.
[0128] S432. Apply a path smoothing algorithm (such as B-spline curve, Bezier curve) to smooth the path to reduce discontinuity and sharp turns in the path.
[0129] S433. Adjust the density of the rolling path according to the target parameters of the bending compensation. For example, areas with larger bending compensation require higher density rolling paths. And according to the compensated bending amount, adjust the number of times the rolling path covers the key compensation area to ensure the best compensation effect and obtain the surface rolling target path.
[0130] S5. Based on the target path of surface rolling and the target parameters of bending compensation, the rollers configured in the CNC machine tool are controlled to perform surface rolling on the workpiece, and the processing status is monitored in real time.
[0131] In a further embodiment, the controlling of the rollers configured in the CNC machine tool to perform surface rolling processing on the workpiece based on the surface rolling target path and the target parameters of the bending compensation comprises the following steps:
[0132] S51. According to the target path of surface rolling and the target parameters of bending compensation, the processing parameters of the CNC machine tool are set, including the appropriate roller diameter, width and material hardness, the pressure, speed, feed rate, etc. of the rolling tool, to ensure the stability and effect of the rolling process.
[0133] S52. During the rolling process, the processing status is monitored in real time through sensors or monitoring systems to collect feedback data from the workpiece surface, including deformation data, stress change data, and feedback from the rolling tool.
[0134] S53. According to the feedback data of the workpiece surface, the processing parameters of the CNC machine tool are dynamically adjusted to adapt to the slight changes of the workpiece surface and ensure the consistency of the compensation effect. For example, if the surface quality deviation is detected, the pressure or the number of rolling times is adjusted.
[0135] like Figure 2As shown, according to another embodiment of the present invention, a bending compensation surface rolling processing system based on a CNC machine tool is also provided. The bending compensation surface rolling processing system based on a CNC machine tool includes a surface data acquisition module 1, a CNC machine tool simulation module 2, a target parameter acquisition module 3, a target path acquisition module 4 and a surface rolling implementation module 5.
[0136] The surface data acquisition module 1 is used to acquire the initial surface data of the workpiece and pre-process the acquired initial surface data; the CNC machine tool simulation module 2 is used to construct a digital model of the CNC machine tool, simulate the movement and load of the CNC machine tool through the digital model, and dynamically simulate the machining process based on the initial surface data of the workpiece; the target parameter acquisition module 3 is used to determine the position of the workpiece that needs to be bent according to the dynamic simulation results, and use an adaptive optimization algorithm to determine the target parameters of the bending compensation; the target path acquisition module 4 is used to generate a workpiece surface rolling path according to the target parameters of the bending compensation, and optimize the workpiece surface rolling path based on image processing technology to obtain a surface rolling target path; the surface rolling implementation module 5 is used to control the rollers configured in the CNC machine tool to perform surface rolling processing on the workpiece based on the surface rolling target path and the target parameters of the bending compensation.
[0137] In order to facilitate understanding of the above technical solutions of the present invention, the working principle or operation mode of the present invention in the actual process is described in detail below.
[0138] 1.1 Use a laser scanner to scan the surface of the metal plate to obtain the initial point cloud data. Point cloud data format:
[0139] P1=(0.0, 0.0, 0.02);
[0140] P2=(10.0,0.0,0.03);
[0141] P3=(20.0,0.0,0.05); ...
[0143] 1.2 Data preprocessing, get:
[0144] P1'=(0.0, 0.0, 0.021);
[0145] P2'=(10.0, 0.0, 0.028);
[0146] P3'=(20.0, 0.0, 0.048); ...
[0148] 2.1 Dynamic simulation:
[0149] Import the processed point cloud data into the simulation environment, set the simulation boundary conditions, and start the simulation.
[0150] Simulation data output:
[0151] Deformation of the workpiece (the maximum deformation is 0.05 mm at P3).
[0152] Stress distribution (maximum stress is 300 MPa at P3).
[0153] 3.1 Deformation and stress analysis:
[0154] Operation steps: Analyze the deformation data and stress data of the workpiece according to the simulation results.
[0155] Maximum deformation position: P3, deformation is 0.05mm.
[0156] High stress area: At P3, the stress is 300MPa.
[0157] 3.2 Determine the compensation position and bending amount:
[0158] Operation steps: According to the analysis results, determine that P3 is the key compensation position and the compensation direction is the Z-axis direction.
[0159] Compensation amount: 0.05mm.
[0160] 3.3 Define the optimization objective function:
[0161] Objective function: Minimize the bending deformation of the workpiece.
[0162] 3.4 Adopting adaptive optimization algorithm:
[0163] Target compensation parameters: The Z-direction compensation at P3 is 0.05 mm.
[0164] 4.1 Generate preliminary rolling path:
[0165] Operation steps: Generate a rolling path covering the entire workpiece surface based on the initial surface data and compensation position. Path planning example:
[0166] Path type: Contour path.
[0167] Rolling density: Path coverage once every 10mm.
[0168] Number of coverages: P3 area is covered 3 times, and other areas are covered once.
[0169] 4.2 Optimize rolling path:
[0170] Operation steps: Based on image processing technology, use edge detection algorithm to optimize the path.
[0171] Edge detection: Extract the edge of the workpiece and adjust the path to fit the workpiece surface.
[0172] 5.1 Set processing parameters:
[0173] Operation steps: Set the processing parameters of the CNC machine tool according to the optimized rolling path.
[0174] Example of processing parameters:
[0175] Rolling tool pressure: 200N.
[0176] Rolling speed: 100mm / min.
[0177] Number of crushing times: 3 times at P3 and 1 time in other areas.
[0178] 5.2 Collect feedback data:
[0179] Operation steps: During the rolling process, monitor the deformation of the workpiece surface in real time.
[0180] Feedback data:
[0181] Actual feedback data: The final deformation at P3 is 0.01mm, which basically achieves the compensation target.
[0182] 5.3 Dynamically adjust processing parameters:
[0183] Operation steps: If you find that the rolling effect in some areas is not ideal, dynamically adjust the rolling pressure or path coverage density.
[0184] Adjustment plan: If the deformation at P3 still exists, increase the number of rolling times or pressure.
[0185] In summary, the present invention can simulate the deformation and stress distribution of the workpiece during the processing process through the digital model and dynamic simulation of the CNC machine tool. The deformation of the workpiece can be accurately predicted before processing, so as to determine the specific position where bending compensation is required. The present invention adopts an adaptive optimization algorithm to optimize the bending compensation parameters according to the deformation data and stress data during processing. By introducing a method combining global search and local search, the optimization target can be found more effectively. Not only is the accuracy of the bending compensation finally given improved, but it can also be adaptively adjusted according to the actual situation of the workpiece to ensure the high quality of the processing results. In the process of generating the surface rolling path, the present invention uses image processing technology and edge detection to extract the surface features of the workpiece to ensure that the rolling path can fit closely with the actual shape of the workpiece, so that the surface rolling treatment is more accurate, especially on complex curved surfaces, avoiding the problem of over-processing or inadequate processing. At the same time, by adjusting the rolling path density and the number of coverage times, not only the processing accuracy can be improved, but also the surface treatment process of the workpiece can be effectively optimized to ensure that the surface quality of the workpiece in each area reaches the best state.
[0186] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A bending compensation surface rolling processing method based on a CNC machine tool, characterized in that: The bending compensation surface rolling processing method based on a CNC machine tool comprises the following steps: S1, obtaining initial surface data of a workpiece, and preprocessing the obtained initial surface data; S2. Build a digital model of the CNC machine tool, simulate the movement and load of the CNC machine tool through the digital model, and perform dynamic simulation of the machining process based on the initial surface data of the workpiece; S3. According to the dynamic simulation results, the position of the workpiece where bending compensation is required is determined, and the target parameters of the bending compensation are determined by using an adaptive optimization algorithm; S4, generating a workpiece surface rolling path according to the target parameters of the bending compensation, and optimizing the workpiece surface rolling path based on the image processing technology to obtain the surface rolling target path; S5. Based on the target path of surface rolling and the target parameters of bending compensation, the rollers configured in the CNC machine tool are controlled to perform surface rolling on the workpiece.
2. The method for rolling a bending compensation surface based on a CNC machine tool according to claim 1, characterized in that: The step of obtaining the initial curved surface data of the workpiece and preprocessing the obtained initial curved surface data comprises the following steps: S11, acquiring original point cloud data of the workpiece based on scanning technology, and acquiring original coordinate data of the workpiece based on detection technology; S12, performing denoising, smoothing and formatting processing on the original point cloud data and the original coordinate data.
3. The method for rolling a bending compensation surface based on a CNC machine tool according to claim 1, characterized in that: The process of constructing a digital model of a CNC machine tool, simulating the movement and load of the CNC machine tool through the digital model, and performing dynamic simulation of the machining process based on the initial surface data of the workpiece includes the following steps: S21, constructing a digital model of the CNC machine tool according to the parameter set of the CNC machine tool, importing the digital model into a simulation environment, setting the simulation environment and defining a machining process; S22, start dynamic simulation, collect dynamic simulation analysis data, and the dynamic simulation analysis data includes deformation data and stress data of the workpiece during the processing.
4. The method for rolling a bending compensation surface based on a CNC machine tool according to claim 3, characterized in that: Determining the position of the workpiece that needs to be bent according to the dynamic simulation results, and determining the target parameters of the bending compensation using an adaptive optimization algorithm includes the following steps: S31, based on the deformation data and stress data of the workpiece during the processing, performing deformation analysis on the workpiece, determining the maximum deformation position and corresponding deformation amount of the workpiece in each direction, and performing stress analysis on the workpiece to identify high stress areas; S32, combining the deformation analysis results and stress analysis results of the workpiece to determine the position where the workpiece needs to be bent and the compensation bending amount in each direction; S33, defining an optimization objective function and setting constraint conditions according to the position where the workpiece needs to be bent and the amount of compensation bending in each direction; S34, selecting and executing an adaptive optimization algorithm, and after the convergence condition is met, outputting target parameters of bending compensation.
5. The method for rolling a bending compensation surface based on a CNC machine tool according to claim 4, characterized in that: The step of selecting and executing the adaptive optimization algorithm and outputting target parameters of bending compensation after the convergence condition is met includes the following steps: S341, randomly initializing a population including a number of individuals, each of which represents a bending compensation scheme, and setting parameters of an adaptive optimization algorithm; S342. For each individual in the population, calculate the fitness value according to the defined optimization objective function; S343, updating the position of the individual according to the fitness value, and selecting the individual with the high fitness value in the current population as the discoverer; S344, based on the finder formula, the global optimal individual position is introduced to enhance the global search capability, and the adaptive expansion coefficient is used to adjust the search range; S345, randomly select a number of individuals as joiners, and the joiners move closer to the discoverer and search around themselves; S346. Randomly select a number of individuals as sentinels, and the sentinels are used to increase population diversity; S347, use non-dominated sorting to determine the dominance relationship of individuals, and use the roulette algorithm to select the global optimal individual; S348, check whether the adaptive optimization algorithm reaches the preset stop criterion. If it does, the individual with the highest fitness value is output.
6. The method for rolling a bending compensation surface based on a CNC machine tool according to claim 1, characterized in that: The method of generating a workpiece surface rolling path according to the target parameters of the bending compensation and optimizing the workpiece surface rolling path based on the image processing technology to obtain the surface rolling target path includes the following steps: S41, generating a preliminary rolling path according to the initial surface data of the workpiece, the position where bending compensation is required, and the determined rolling area; S42, before rolling, obtaining image data of the workpiece surface, and applying an edge detection algorithm to extract edge features of the workpiece surface; S43, adjusting and optimizing the preliminary rolling path based on the edge features of the workpiece surface, the target parameters of the bending compensation and the compensation bending amount to obtain the surface rolling target path.
7. The method for rolling a bending compensation surface based on a CNC machine tool according to claim 6, characterized in that: Before rolling, obtaining image data of the workpiece surface and applying an edge detection algorithm to extract edge features of the workpiece surface includes the following steps: S421, acquiring image data of the workpiece surface, and preprocessing the image data of the workpiece surface; S422, applying a gradient operator to calculate the gradient amplitude and direction of the workpiece surface image in the horizontal and vertical directions, and using a gradient template to increase the direction of the gradient calculation, and calculating the total gradient amplitude and main gradient direction of each pixel; S423, performing non-maximum suppression on each pixel according to the gradient direction map to obtain a refined edge map; S424, setting a first threshold and a second threshold to distinguish obvious edges, potential edges and non-edges; wherein the first threshold is greater than the second threshold; S425, marking pixels whose gradient magnitude is higher than a first threshold as obvious edges, and marking pixels whose gradient magnitude is lower than a second threshold as non-edges; S426, taking pixels between the first threshold and the second threshold as potential edges, checking whether the pixels as potential edges are connected to pixels of obvious edges, if so, marking the corresponding pixels as obvious edges, otherwise marking them as non-edges; obtaining a binary edge map according to the distinction between obvious edges and non-edges; S427. Extract edge features of the workpiece surface from the binary edge map, including the position, length and direction of the edge.
8. The method for rolling a bending compensation surface based on a CNC machine tool according to claim 6, characterized in that: The step of adjusting and optimizing the preliminary rolling path based on the edge features of the workpiece surface, the target parameters of the bending compensation and the compensation bending amount to obtain the surface rolling target path includes the following steps: S431, adjusting the preliminary rolling path according to the edge features of the workpiece surface so that the path fits the shape of the workpiece surface; S432, applying a path smoothing algorithm to smooth the path; S433. Adjust the density of the rolling path according to the target parameters of the bending compensation, and adjust the number of times the rolling path covers the compensation key area according to the compensation bending amount to obtain the surface rolling target path.
9. The method for rolling a bending compensation surface based on a CNC machine tool according to claim 1, characterized in that: The method of controlling the rollers configured in the CNC machine tool to perform surface rolling processing on the workpiece based on the surface rolling target path and the target parameters of the bending compensation comprises the following steps: S51, setting processing parameters of the CNC machine tool according to the target path of the surface rolling and the target parameters of the bending compensation; S52, during the rolling process, collecting feedback data of the workpiece surface; S53. Dynamically adjust the processing parameters of the CNC machine tool according to the feedback data of the workpiece surface.
10. A bending compensation surface rolling processing system based on a CNC machine tool, used to implement the bending compensation surface rolling processing method based on a CNC machine tool according to any one of claims 1 to 9, characterized in that: The bending compensation surface rolling processing system based on CNC machine tools includes a surface data acquisition module, a CNC machine tool simulation module, a target parameter acquisition module, a target path acquisition module and a surface rolling implementation module; The surface data acquisition module is used to acquire initial surface data of the workpiece and pre-process the acquired initial surface data; The CNC machine tool simulation module is used to construct a digital model of the CNC machine tool, simulate the movement and load of the CNC machine tool through the digital model, and perform dynamic simulation of the machining process based on the initial surface data of the workpiece; The target parameter acquisition module is used to determine the position of the workpiece that needs to be bent according to the dynamic simulation results, and to determine the target parameters of the bending compensation by using an adaptive optimization algorithm; The target path acquisition module is used to generate a workpiece surface rolling path according to the target parameters of the bending compensation, and optimize the workpiece surface rolling path based on the image processing technology to obtain the surface rolling target path; The surface rolling implementation module is used to control the rollers configured in the CNC machine tool to perform surface rolling processing on the workpiece based on the surface rolling target path and the target parameters of the bending compensation.
