A method and system for controlling the production and processing of a circular knife die
By collecting and analyzing images of the actual cutting trajectory of the circular die, and combining edge detection and simulated annealing algorithms, the weights of error sources are dynamically adjusted, solving the problems of inaccurate error analysis and low efficiency of iterative optimization in existing technologies, and achieving efficient production and processing control.
Patent Information
- Application Number
- CN202510617058.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-14
- Publication Date
- 2026-02-13
- Estimated Expiration
- 2045-05-14
AI Technical Summary
In the production and processing of circular die-cutting molds, existing technologies suffer from problems such as inaccurate error analysis, fixed weights that cannot adapt to complex and ever-changing production environments, and low efficiency in iterative optimization.
By acquiring actual cutting trajectory images, edge detection algorithms are used to identify the coordinates of the actual cutting trajectory. Combined with SVM classifiers and simulated annealing algorithms, error source weights are dynamically adjusted to construct a cutting trajectory correction model, thereby achieving error correction and iterative optimization.
It achieves more precise, flexible, and efficient control over the production and processing of circular die-cutting molds, improves the comprehensiveness of error analysis and the efficiency of iterative optimization, and reduces production costs.
Smart Images

Figure CN120447467B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of mold processing, and in particular to a production and processing control method and system for a circular knife mold. BACKGROUND
[0002] In the field of circular knife mold production and processing, traditional cutting trajectory control methods mainly rely on pre-set fixed parameters and empirical formulas. These methods are usually planned based on ideal models, but in actual production processes, due to factors such as equipment vibration, tool wear, and uneven material properties, the actual cutting trajectory often deviates from the planned trajectory.
[0003] To reduce this deviation, some existing technologies use a simple feedback adjustment mechanism by comparing some feature points of the actual cutting trajectory with the planned trajectory and then adjusting the corresponding parameters. Some technologies also use machine learning algorithms to classify and predict errors, such as using an SVM classifier to identify error sources. However, these methods are not ideal when dealing with complex and variable error situations. Therefore, there are still many shortcomings in the production and processing of circular knife molds: 1) Traditional methods usually only focus on some key feature points and cannot fully capture the error information between the actual cutting trajectory and the planned trajectory, resulting in inaccurate error analysis. 2) When dealing with multiple error sources, existing technologies often use fixed weights that cannot be dynamically adjusted according to actual conditions, making it difficult to adapt to complex and variable production environments. 3) When the first adjusted trajectory still does not meet the requirements, some existing technologies use a simple trial-and-error method for iterative optimization, which is inefficient and consumes a lot of time and resources. SUMMARY
[0004] To solve at least one of the technical problems mentioned above, the present application provides a production and processing control method and system for a circular knife mold.
[0005] In a first aspect, the present application provides a production and processing control method for a circular knife mold, the method comprising:
[0006] Collecting an actual cutting trajectory image during the production and processing of the circular knife mold, and identifying the first coordinates of the first actual cutting trajectory in the image through an edge detection algorithm;
[0007] Obtaining the second coordinates of the first planned cutting trajectory during the production and processing of the circular knife mold, comparing the first coordinates with the second coordinates, extracting key feature points of the cutting, and analyzing the error data between the first actual cutting trajectory and the first planned cutting trajectory according to the key feature points;
[0008] According to the error data, a feature vector is constructed, the feature vector is input into an SVM classifier to obtain an error source, and a simulated annealing algorithm is used to assign weights to different error sources; an error source and a corresponding weight are used to construct a cutting trajectory correction model, and a second planned cutting trajectory after compensation is calculated;
[0009] The second planned cutting trajectory is used to adjust the operating parameters of the circular cutter mold production and processing, a second actual cutting trajectory after compensation is generated, and it is determined whether the error between the second actual cutting trajectory and the second planned cutting trajectory meets a preset condition; when the preset condition is not met, the weights of the error sources are iteratively updated through the simulated annealing algorithm until the error between the second actual cutting trajectory and the second planned cutting trajectory meets the preset condition, and a target cutting trajectory is generated to complete the production and processing of the circular cutter mold.
[0010] Preferably, the first coordinate of the first actual cutting trajectory in the image is identified by an edge detection algorithm, comprising:
[0011] A dynamic machining image sequence of the contact area between the cutter and the workpiece during the production and processing of the circular cutter mold is collected, and an adaptive edge enhancement model is used to dynamically adjust the optical filtering parameters according to the material reflection characteristics;
[0012] An improved Canny operator detection algorithm is used to extract a sub-pixel level machining trajectory contour, and the extracted machining trajectory contour is verified by physical constraints;
[0013] According to the verification result, the first coordinate of the first actual cutting trajectory with a confidence rating is generated.
[0014] Preferably, the physical constraint verification of the extracted machining trajectory contour comprises:
[0015] A cutter kinematic constraint model is established, comprising:
[0016] ;
[0017] The radius of the cutter tip arc;
[0018] The continuity coefficient between adjacent edge points is calculated, and abnormal edge segments that do not meet the cutter kinematic equation are removed;
[0019] For the remaining trajectory contour, the image heat distribution is compared with the theoretical cutting heat model, and the edge position deviation caused by thermal deformation is corrected.
[0020] Preferably, the error source includes one or more of material thermal deformation, laser power fluctuation, environmental temperature change, and external vibration.
[0021] Preferably, the error source and the corresponding weight are used to construct a cutting trajectory correction model, comprising:
[0022] ;
[0023] In the formula, represents the second planning cutting track after correction, represents the initial length of the material, 、 、 、 are respectively the weights of four error sources of material thermal deformation, environmental temperature change, external vibration and laser power fluctuation; is the linear expansion coefficient of the material; is the temperature change of the material, is the linear expansion coefficient of the machine tool, 、 are the actual and target environmental temperatures; 、 are the acceleration and frequency of external vibration, is the vibration compensation coefficient, and the value range is ; 、 are the target and actual powers of the laser, is the power fluctuation compensation coefficient, and the value range is .
[0024] Preferably, the key feature points of the cutting are extracted, and the error data between the first actual cutting track and the first planning cutting track is analyzed according to the key feature points, including:
[0025] The key feature points include the starting point, the ending point, the intersection point and the inflection point of the cutting, and the inflection point is determined according to the size of the curvature;
[0026] The position error, the angle error and the shape error of the cutting are analyzed according to the coordinates of the key feature points in the first actual cutting track and the coordinates in the first planning cutting track.
[0027] In a second aspect, the application further provides a production and processing control system of a round knife mold, the system comprising:
[0028] A data acquisition unit is configured to acquire an actual cutting track image of the round knife mold during production and processing, and to identify a first coordinate of a first actual cutting track in the image through an edge detection algorithm;
[0029] An error analysis unit is configured to acquire a second coordinate of a first planning cutting track during production and processing of the round knife mold, to compare the first coordinate with the second coordinate, to extract key feature points of the cutting, and to analyze error data between the first actual cutting track and the first planning cutting track according to the key feature points;
[0030] The trajectory correction unit is used for constructing a feature vector according to the error data, inputting the feature vector into the SVM classifier to obtain an error source, assigning weights to different error sources through a simulated annealing algorithm, constructing a cutting trajectory correction model according to the error source and the corresponding weight, and calculating a second planned cutting trajectory after compensation;
[0031] The target generation unit is used for adjusting the operation parameters of the circular cutter die production and processing by using the second planned cutting trajectory feedback, generating a second actual cutting trajectory after compensation, judging whether the error between the second actual cutting trajectory and the second planned cutting trajectory meets a preset condition, and when the preset condition is not met, iteratively updating the weights of the error sources through the simulated annealing algorithm until the error between the second actual cutting trajectory and the second planned cutting trajectory meets the preset condition, and generating a target cutting trajectory to complete the production and processing process of the circular cutter die.
[0032] In a third aspect, the present application further provides an electronic device, comprising a processor and a memory, the memory being used to store computer program code, the computer program code comprising computer instructions, when the processor executes the computer instructions, the electronic device executes the method of the above-mentioned first aspect and any one of the possible implementation manners thereof.
[0033] In a fourth aspect, the present application further provides a computer readable storage medium, the computer readable storage medium storing a computer program, the computer program comprising program instructions, when the program instructions are executed by a processor of an electronic device, the processor executes the method of the above-mentioned first aspect and any one of the possible implementation manners thereof.
[0034] Compared with the prior art, the present application has the following beneficial effects:
[0035] 1) The present application collects the actual cutting trajectory image during the production and processing of the circular cutter die, uses an edge detection algorithm to identify the first coordinates of the first actual cutting trajectory, and compares the first coordinates with the second coordinates of the first planned cutting trajectory in detail. This method can comprehensively extract the key feature points of cutting, so as to more accurately analyze the error data between the actual cutting trajectory and the planned cutting trajectory. Compared with the traditional method which only focuses on part of the feature points, the present application can capture more error details, and provide more reliable basis for subsequent error correction.
[0036] 2) The present application introduces a simulated annealing algorithm to assign weights to different error sources. This algorithm can dynamically adjust the weights according to the actual error situation. When the production environment changes, the simulated annealing algorithm can automatically find the optimal weight combination, so that the cutting trajectory correction model is more suitable for actual production requirements. Compared with the traditional fixed weight method, the present application can more accurately reflect the influence degree of different error sources on the cutting trajectory, and improve the accuracy of error correction.
[0037] 3) When the error of the second actual cutting track and the second planned cutting track does not meet the preset condition, the weight of the error source is iteratively updated by the simulated annealing algorithm. The simulated annealing algorithm has strong global search capability and can quickly find the optimal solution, avoiding the blindness and inefficiency of the traditional trial-and-error method. This efficient iterative optimization mechanism greatly shortens the production debugging time, improves the production efficiency and reduces the production cost. In summary, the present application solves the problems of incomplete error analysis, fixed weight and low iteration efficiency in the prior art through comprehensive error analysis, dynamic error source weight distribution and efficient iterative optimization mechanism, and realizes more accurate, flexible and efficient circular knife die production and processing control.
[0038] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, but not limiting the present disclosure. BRIEF DESCRIPTION OF DRAWINGS
[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the background art, the drawings needed to be used in the embodiments of the present application or the background art will be described below.
[0040] The drawings herein are incorporated into the specification and form part of the specification, which show embodiments consistent with the present disclosure, and together with the specification, serve to illustrate the technical solutions of the present disclosure.
[0041] Figure 1 A flowchart of a circular knife die production and processing control method provided by the embodiments of the present application;
[0042] Figure 2 For Figure 1 A flowchart of the sub-steps of step S10 in the embodiment of the present application;
[0043] Figure 3 For Figure 1 A flowchart of the sub-steps of step S20 in the embodiment of the present application;
[0044] Figure 4 A structure diagram of a circular knife die production and processing control system provided by the embodiments of the present application. DETAILED DESCRIPTION
[0045] In order to enable personnel in the technical field to better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0046] Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are they necessarily mutually exclusive of one another. As will be apparent to those of ordinary skill in the art, embodiments described herein can be combinable with other embodiments.
[0047] Reference is made to Figure 1 , Figure 1 A flowchart of a production and processing control method for a circular knife mold is provided for an embodiment of the application. As shown in Figure 1 , the method comprises:
[0048] S10, collect the actual cutting trajectory image during the production and processing of the circular knife mold, and identify the first coordinate of the first actual cutting trajectory in the image through an edge detection algorithm;
[0049] When collecting the image, a high-resolution and high-speed industrial camera should be selected to ensure that the details of the cutting trajectory can be clearly captured. The camera should be installed in a suitable position to cover the entire cutting area and minimize external light interference. When setting the camera parameters, the exposure time and gain need to be adjusted to ensure that the image brightness is moderate and to avoid overexposure or underexposure. Then, calibrate the camera to minimize the geometric distortion of the image. Finally, set up a suitable triggering mechanism to ensure that the image is collected in a timely manner during the cutting process. The control system of the laser pipe cutting machine can be used to send a trigger signal, or an external sensor such as a photoelectric switch can be used to detect the starting and ending points of the cutting.
[0050] After the image is collected, in order to improve the recognition accuracy of the trajectory, image preprocessing can usually be performed first. It includes grayscale, denoising and contrast enhancement in sequence. Grayscale can convert color images to grayscale images, reducing data dimensions and simplifying subsequent processing. When denoising, methods such as median filtering or Gaussian filtering are preferred to remove noise in the image and improve the accuracy of edge detection. Finally, methods such as histogram equalization or adaptive histogram equalization are used to enhance the contrast of the image, making the cutting trajectory more obvious.
[0051] Reference is made to Figure 2 , in an embodiment, the first coordinate of the first actual cutting trajectory in the image is identified through an edge detection algorithm, comprising:
[0052] S201, collect a dynamic processing image sequence of the contact area between the tool and the workpiece during the production and processing of the circular knife mold, and dynamically adjust the optical filtering parameters according to the material reflection characteristics through an adaptive edge enhancement model;
[0053] A high-speed industrial camera array is used to capture multiple-angle images of the contact area between the cutter and the workpiece during the production and processing of a round knife mold. The camera frame rate needs to be dynamically adjusted according to the processing speed to ensure that the key moments of contact between the cutter and the workpiece are captured. A database of reflection characteristics of common mold materials is established in advance, including parameters such as reflectivity and polarization characteristics of different materials under different lighting conditions. During image acquisition, the reflection characteristics of the current processing material are analyzed in real time. Based on the analyzed material reflection characteristics, the optical filtering parameters are dynamically adjusted. For example, for high-reflectivity materials, the filtering strength is increased to reduce glare interference; for low-reflectivity materials, the contrast is enhanced to highlight the edge features. The specific implementation can use an image enhancement model based on deep learning, which takes material reflection characteristic parameters as input and outputs the optimal combination of optical filtering parameters.
[0054] Through multi-angle shooting and dynamic frame rate adjustment, complete and clear processing image sequences are ensured to be captured, providing a high-quality data foundation for subsequent edge detection. Dynamic adjustment of optical filtering parameters can effectively suppress the interference caused by different material reflection characteristics, improve the clarity and recognizability of the cutting trajectory edge in the image, and thus improve the accuracy of edge detection.
[0055] S202, using an improved Canny operator detection algorithm to extract sub-pixel level processing trajectory contour, and performing physical constraint verification on the extracted processing trajectory contour;
[0056] Improved Canny operator detection algorithm:
[0057] Multi-scale Gaussian filtering: different scale Gaussian filters are used to process the image to capture edge features of different thickness. Through an adaptive threshold selection method, the optimal threshold value at each scale is determined.
[0058] Gradient direction refinement: when calculating the gradient direction, a quadratic interpolation method is used to refine the gradient direction to the sub-pixel level, improving the accuracy of edge positioning.
[0059] Double-threshold hysteresis processing: a dynamic double-threshold mechanism is introduced to automatically adjust the high and low thresholds according to the statistical characteristics of the local region of the image, ensuring that weak but important edges can be detected.
[0060] Based on the edges detected by the Canny operator, the gray level moment method or surface fitting method is used for sub-pixel level positioning to accurately position the edges to the sub-pixel level.
[0061] Physical constraint verification includes:
[0062] Kinematic constraints: according to the kinematic model of the round knife mold, it is verified whether the extracted contour conforms to the motion trajectory law of the cutter. For example, the rotation angle and feed speed of the cutter should be consistent with the processing parameters.
[0063] Geometric constraints: Check if the extracted contour meets the geometric properties of the circular knife mold, such as the radius of the knife, the angle of the blade, etc.
[0064] Material removal constraints: According to the principle of material removal, verify whether the contour conforms to the physical law of material removal, such as the shape and size of the chip.
[0065] The improved Canny operator detection algorithm combined with sub-pixel level positioning technology can improve the positioning accuracy of the cutting trajectory contour from the traditional pixel level to the sub-pixel level (usually up to 0.1-0.01 pixels), greatly improving the measurement accuracy of the trajectory coordinates. The physical constraint verification mechanism can effectively exclude false detection results caused by image noise, false edges and other interference factors, improving the reliability and accuracy of contour extraction.
[0066] S203, according to the verification result, generating the first coordinate of the first actual cutting trajectory with confidence rating.
[0067] Confidence evaluation model: Establish a confidence evaluation model based on multi-feature fusion, considering the following factors to evaluate the confidence of each coordinate point:
[0068] Edge intensity: The greater the gradient amplitude of the edge pixel, the higher the confidence.
[0069] Continuity: The better the continuity between adjacent points, the higher the confidence. The continuity can be evaluated by calculating the distance and angle difference between adjacent points.
[0070] Physical constraint compliance: The higher the degree of compliance of the coordinate point with the physical constraints, the higher the confidence. The compliance can be evaluated by quantifying the satisfaction of kinematic constraints, geometric constraints and material removal constraints.
[0071] Repeated measurement consistency: For multiple measurement results of the same position, the higher the consistency, the higher the confidence.
[0072] Confidence rating: Divide the confidence into multiple levels, such as high, medium and low. For coordinate points with confidence lower than the set threshold, mark or re-detect.
[0073] Coordinate generation: According to the confidence obtained by evaluation, the extracted sub-pixel level coordinates are weighted and processed to generate the final first coordinate of the first actual cutting trajectory with confidence rating.
[0074] The confidence rating mechanism provides a reliability indicator for each coordinate point, enabling subsequent error analysis and trajectory correction to focus more on high-confidence coordinate points, improving the stability and reliability of the entire control system. For low-confidence coordinate points, targeted processing can be performed, such as increasing the number of measurements, adjusting detection parameters, etc., to further improve measurement accuracy.
[0075] Therefore, this embodiment realizes high-precision and reliable measurement of the actual cutting trajectory of the circular knife mold by dynamically adjusting the optical filtering parameters, sub-pixel level profile extraction and physical constraint verification, and confidence rating, providing a solid foundation for subsequent error analysis and trajectory correction.
[0076] Preferably, the physical constraint verification of the extracted machining trajectory profile comprises:
[0077] Establishing a tool kinematics constraint model comprises:
[0078] ;
[0079] The radius of the tool tip arc;
[0080] Calculate the continuity coefficient between adjacent edge points, and eliminate abnormal edge segments that do not conform to the tool kinematics equation;
[0081] For the remaining trajectory profile, compare the image heat distribution with the theoretical cutting heat model, and correct the edge position deviation caused by thermal deformation.
[0082] During the machining of the circular knife mold, the movement of the tool follows certain physical laws, and the heat generated during the machining process causes thermal deformation of the material and the tool. The core principle of physical constraint verification is to use these known physical laws and characteristics to filter and correct the extracted machining trajectory profile, in order to improve the accuracy of the trajectory coordinates.
[0083] Tool kinematics constraints: The movement of the tool during machining is limited by parameters such as spindle speed, tool radius, etc. For example, the cutting speed cannot exceed the maximum linear speed of the tool, and the curvature radius of the trajectory cannot be smaller than the radius of the tool tip arc. By establishing these constraint models, abnormal edge segments that do not conform to the physical laws can be excluded.
[0084] Continuity constraints: The actual machining trajectory should be continuous and smooth, and there is a certain continuity relationship between adjacent edge points. By calculating the continuity coefficient, abnormal points that are not continuous can be identified, and these points can be excluded to eliminate their interference with the trajectory.
[0085] Thermal deformation correction: The heat generated during machining can cause thermal deformation of the material and tool, affecting the position of the cutting trajectory. By comparing the image heat distribution with the theoretical cutting heat model, the thermal deformation can be estimated, and the trajectory can be corrected.
[0086] 1. Establish the tool kinematics constraint model:
[0087] Determine the spindle speed and tool radius based on the machining process parameters.
[0088] Calculate the maximum cutting speed: .
[0089] For each point on the extracted machining trajectory profile, calculate its cutting speed and curvature radius.
[0090] Remove points with cutting speed exceeding or curvature radius less than the tool tip arc radius.
[0091] 2. Calculate the continuity coefficient and remove abnormal edge segments:
[0092] For adjacent edge points on the trajectory profile and , calculate the distance and direction angle between them;
[0093] Continuity coefficient , where and are the average values of all adjacent point distances and direction angles, is the weight coefficient. Set the continuity threshold, when the continuity coefficient is greater than the continuity threshold, consider the point as an abnormal point, remove the point and the edge segment it is in.
[0094] 3. Compare image heat distribution with theoretical cutting heat model and correct thermal deformation:
[0095] Obtain image heat distribution: Use an infrared thermal imager to collect heat distribution images during machining, extract the temperature distribution near the trajectory profile.
[0096] Establish a theoretical cutting heat model: Based on machining parameters (such as cutting speed, feed rate, cutting depth, etc.), establish a theoretical cutting heat model to calculate the temperature distribution during machining.
[0097] Comparison and correction: Compare the image heat distribution with the theoretical cutting heat model, calculate the temperature difference, according to the thermal expansion coefficient and material characteristics, calculate the thermal deformation, for each point on the trajectory profile, according to the thermal deformation at its location, correct the position.
[0098] Therefore, by eliminating outliers and edge segments that do not conform to tool kinematic constraints, interference from false edges is reduced, improving the accuracy of trajectory coordinates. The calculation of continuity coefficients and the elimination of outliers enable the system to better cope with interference factors such as image noise and lighting variations, enhancing its robustness. Thermal deformation correction ensures accurate acquisition of the actual cutting trajectory even under high-temperature machining conditions. Accurate trajectory coordinates provide a reliable basis for subsequent error analysis and trajectory correction, helping to optimize machining parameters and improve machining quality and efficiency.
[0099] S20. Obtain the second coordinates of the first planned cutting trajectory during the production and processing of the circular die, compare the first coordinates with the second coordinates, extract the key feature points of the cutting, and analyze the error data between the first actual cutting trajectory and the first planned cutting trajectory based on the key feature points.
[0100] The first planned cutting trajectory is typically generated by CAD software and contains a series of coordinate points, known as the second coordinates. These points define the desired cutting path. Usually, this first planned cutting trajectory needs to be imported into the control system beforehand to match the operating parameters of the pipe cutter, thereby controlling the pipe cutter to cut according to the desired path. Therefore, when obtaining the second coordinate data of the first planned cutting trajectory, it is only necessary to export the coordinate data of the design trajectory from the system and convert it to the required format, such as CSV, DXF, or JSON.
[0101] See Figure 3 In one embodiment, the step of extracting key feature points for cutting and analyzing error data between the first actual cutting trajectory and the first planned cutting trajectory based on the key feature points includes:
[0102] S201. Extract key feature points, including the start point, end point, intersection point, and inflection point of the cut; the inflection point is determined based on the magnitude of the curvature.
[0103] S202. Based on the coordinates of key feature points in the first actual cutting trajectory and their coordinates in the first planned cutting trajectory, analyze the cutting position error, angle error, and shape error, including:
[0104] ;
[0105] ;
[0106] ;
[0107] In the formula, Indicates the first There are 10 key feature points, totaling 1000. indivual; Indicates the first cutting trajectory in the actual cutting path coordinates of the first key feature point, coordinates of the first key feature point corresponding to the first actual cutting trajectory in the first planned cutting trajectory; coordinates of the first key feature point corresponding to the first actual cutting trajectory in the first planned cutting trajectory; representing the average position error and the average angle error, representing the shape error, representing the structural similarity index of the first actual cutting trajectory and the first planned cutting trajectory, is the maximum structural similarity index.
[0108] In this step, the first point and the last point are extracted from the coordinate data of the first planned cutting trajectory and the first actual cutting trajectory as the starting point and the ending point, respectively. For the identification of intersection points, geometric algorithms or image processing methods can be used for detection. For example, Hough transform can be used to detect straight line intersection points. For inflection points, the curvature of the trajectory can be calculated to determine the inflection point according to the size of the curvature. For example, a certain curvature threshold is set, and then the point with a curvature greater than the curvature threshold is identified as an inflection point. It can be understood that the starting point, the ending point and the inflection point can be one or more. When the cutting trajectory is long, the cutting trajectory can be segmented to determine the starting point, the ending point and the inflection point of each segment, and finally the error of the entire cutting trajectory is analyzed.
[0109] In calculating the error, three errors are considered in this step, including position error, angle error and shape error. The position error is obtained by calculating the Euclidean distance between the actual coordinates and the planned coordinates of each key feature point, and then taking the average. The angle error is obtained by calculating the angle difference between the two points before and after each key feature point, and then taking the average. The shape error is measured by using the structural similarity index (SSIM) to measure the shape similarity between the first actual cutting trajectory and the first planned cutting trajectory.
[0110] Therefore, by extracting key feature points and calculating position error, angle error and shape error, the embodiment can comprehensively and accurately analyze the error between the actual cutting trajectory and the design trajectory based on a limited number of representative feature points, providing detailed data support for subsequent error compensation. By calculating the average position error, the average angle error and the shape error, the cutting quality can be quantitatively evaluated, providing a scientific basis for optimizing the operating parameters of the round knife grinding tool. In addition, the entire error analysis process can be automated, reducing manual intervention and improving work efficiency and accuracy.
[0111] S30, constructing a feature vector according to the error data, inputting the feature vector into the SVM classifier to obtain the error source; assigning weights to different error sources by using simulated annealing algorithm, constructing a cutting trajectory correction model according to the error source and the corresponding weight, and calculating a second planned cutting trajectory after compensation;
[0112] In order to identify the error source, i.e. the influencing factor causing the error to occur, the embodiment will train a support vector machine model in advance, so as to quickly and accurately identify the error source according to the error data.
[0113] Specifically, training the support vector machine model includes the following steps:
[0114] 1) Error data preparation: a large amount of cutting trajectory data is extracted from historical cutting processes, and then a large number of key feature points are extracted therefrom, and error data between the calculated and corresponding design trajectories is extracted, including position error, angle error, shape error, so as to construct a feature vector. When constructing the feature vector, the error data of each key feature point is combined into a feature vector. Therefore, the feature vector can include position error, angle error, shape error, and the type of key feature point (start point, end point, intersection point, inflection point).
[0115] 2) Data preprocessing: the feature vector is normalized to ensure that the scales of different features are consistent and to improve the training effect of the model.
[0116] 3) Kernel function selection: a support vector machine (SVM) model is trained using known error source data and corresponding feature vectors. The kernel function can select a polynomial kernel or an RBF kernel for processing nonlinear data. The known error source types include but are not limited to material thermal deformation, laser power fluctuation, environmental temperature change, and external vibration. Before training, each data sample needs to be labeled with its corresponding error source to obtain the labeled data corresponding to the error data.
[0117] 4) Model training: set the hyperparameters of the SVM model, such as the penalty parameter and the kernel function parameter; train the SVM model using the training set data, which includes error data and labeled data.
[0118] 5) Model evaluation: perform K-fold cross-validation to evaluate the generalization ability of the model. Set evaluation indicators, including accuracy, confusion matrix, and F1 score. Accuracy is used to calculate the accuracy of the model on the test set. Confusion matrix is used to view the prediction of each category. F1 score is used to consider precision and recall comprehensively. Then the best hyperparameter combination can be automatically found through grid search or random search.
[0119] Finally, the final support vector machine model obtained after training is used to predict the error source type. Only the feature vector constructed according to the error data of this time needs to be input into the support vector machine model, and the error source type can be quickly and accurately output.
[0120] Preferably, the error sources are identified as material thermal deformation, environmental temperature variation, external vibration, and laser power fluctuation. Further, in order to reasonably construct the correction model, it is necessary to weight these four error sources. Specifically, the weighting process is as follows:
[0121] 1) Define the objective function: define an objective function to evaluate the performance of different error source weight combinations. The objective function can be the sum of errors, average error, or other related indicators.
[0122] 2) Initialize parameters: initialize the weights of error sources, usually randomly. Set initial temperature, cooling rate, termination temperature and other parameters.
[0123] 3) Simulated annealing algorithm: in each iteration, generate a new weight combination and calculate its objective function value. According to the Metropolis criterion, decide whether to accept the new solution. Gradually reduce the temperature until the termination temperature is reached.
[0124] 4) Evaluate and update weights: after each iteration, evaluate the performance of the current weight combination and record the best weight combination.
[0125] This embodiment can perform global search in the solution space through simulated annealing algorithm, avoid falling into local optimal solution, and improve optimization effect. Simulated annealing algorithm can adaptively adjust the search strategy by gradually reducing the temperature, ensuring that better solutions can be found at different stages. By optimizing the error source weights through simulated annealing algorithm, the robustness of the system can be improved to adapt to different types of error sources. Thus, the accuracy of the correction model is improved.
[0126] After the first weighting is completed, the cutting trajectory correction model needs to be constructed according to the error sources and corresponding weights. Preferably, the cutting trajectory correction model is constructed according to the error sources and corresponding weights, and the compensated second planning cutting trajectory is calculated, including:
[0127] ;
[0128] In the formula, represents the corrected cutting trajectory, represents the initial length of the material, , , , are the weights of the four error sources of material thermal deformation, environmental temperature variation, external vibration and laser power fluctuation respectively; is the linear expansion coefficient of the material; is the material temperature change; is the linear expansion coefficient of the machine tool, , are the actual and target environmental temperatures; , is the acceleration and frequency of external vibration, is the vibration compensation coefficient, and the value range is ; , is the target power and actual power of the laser, is the power fluctuation compensation coefficient, and the value range is .
[0129] In the above formula, is the thermal deformation compensation term, the material expands or shrinks due to temperature change , the linear expansion coefficient describes the length change rate caused by unit temperature rise. The weight adjusts the influence intensity. This term is used to compensate for the size deviation of the material itself due to temperature change. is the ambient temperature change compensation term, the machine tool is affected by ambient temperature fluctuation , the linear expansion coefficient reflects the deformation proportion of the machine tool structure. The weight controls the correction proportion, and this term is used to offset the mechanical deformation of the machine tool due to the deviation of the ambient temperature from the target value.
[0130] is the vibration compensation term, the vibration acceleration is converted to displacement by integration, and the compensation coefficient weaken the sensitivity of high-frequency vibration, the weight adjusts the overall contribution. The vibration compensation term is used to dynamically offset the instantaneous displacement error of the cutting head caused by vibration. is the power fluctuation compensation term, the actual power and the target power reflect the energy input deviation, and the exponential term adjusts the compensation intensity by , the weight controls its influence on the trajectory. The power fluctuation compensation term is used to extend the cutting path or adjust the speed when the power is insufficient, to ensure the consistency of the cutting depth.
[0131] The embodiment can more accurately predict and compensate the error between the second planning cutting trajectory and the first planning cutting trajectory by comprehensively considering the influence of multiple error sources, so as to significantly improve the cutting precision. After obtaining the correction model, the compensated cutting path obtained by correction is integrated into the numerical control system, and the real-time compensation of the cutting trajectory is realized through feedback adjustment. The waste rate caused by errors is reduced, and the production cost is reduced.
[0132] S40, adjusting the operation parameters of the circular cutter mold production and processing by using the second planned cutting trajectory feedback, generating a compensated second actual cutting trajectory, and determining whether the error between the second actual cutting trajectory and the second planned cutting trajectory meets the preset condition; when it does not meet, iteratively updating the weights of the error sources by the simulated annealing algorithm until the error between the second actual cutting trajectory and the second planned cutting trajectory meets the preset condition, and generating a target cutting trajectory to complete the production and processing process of the circular cutter mold.
[0133] When the operation parameters of the circular cutter mold production and processing are adjusted by feedback, the cutting process is controlled according to the parameters, and the compensated second actual cutting trajectory is further obtained. At this time, the error between the second actual cutting trajectory and the second planned cutting trajectory can be analyzed according to the process of the foregoing steps S10-S20. If the error between the two does not meet the preset condition, for example, is higher than the set error threshold, it means that the correction model needs to be optimized at this time, that is, the model is optimized by adjusting the initial assigned weights. The process of step S30 is implemented, that is, the weights of the error sources are iteratively updated by the simulated annealing algorithm, the cutting path compensation and cutting are re-performed, and the error is adjusted until it meets the preset condition, and the final operation parameters of the circular cutter mold production and processing and the final cutting trajectory are obtained. The trajectory is taken as the target cutting trajectory, and the production and processing process of the circular cutter mold is completed.
[0134] Therefore, the above-mentioned embodiments can gradually reduce the error between the actual cutting trajectory and the planned cutting trajectory by iteratively optimizing the weights of the error sources, and improve the cutting precision. The whole process can be automated, reducing manual intervention and improving work efficiency and accuracy. The simulated annealing algorithm is used to optimize the error source weights, improving the robustness of the system and adapting to different types of error sources. By iteratively updating the error source weights, the cutting path can be continuously optimized to ensure that the final cutting trajectory meets the preset condition.
[0135] In summary, the method provided by the present application can at least achieve the following beneficial effects:
[0136] 1) The present application collects the actual cutting trajectory image during the production and processing of the circular cutter mold, uses an edge detection algorithm to identify the first coordinates of the first actual cutting trajectory, and compares them in detail with the second coordinates of the first planned cutting trajectory. This method can comprehensively extract the key feature points of cutting, so as to more accurately analyze the error data between the actual cutting trajectory and the planned cutting trajectory. Compared with the traditional method which only focuses on part of the feature points, the present application can capture more error details, providing more reliable basis for subsequent error correction.
[0137] 2) The present application introduces a simulated annealing algorithm to assign weights to different error sources. This algorithm can dynamically adjust the weights according to the actual error situation. When the production environment changes, the simulated annealing algorithm can automatically find the optimal weight combination, making the cutting trajectory correction model more adaptable to actual production needs. Compared with the traditional fixed weight method, the present application can more accurately reflect the influence of different error sources on the cutting trajectory, improving the accuracy of error correction.
[0138] 3) When the error between the second actual cutting trajectory and the second planned cutting trajectory does not meet the preset condition, the present application iteratively updates the weights of the error sources through the simulated annealing algorithm. The simulated annealing algorithm has strong global search capability and can quickly find the optimal solution, avoiding the blindness and inefficiency of traditional trial-and-error methods. This efficient iterative optimization mechanism greatly shortens the production debugging time, improves the production efficiency, and reduces the production cost. In summary, the present application solves the problems of incomplete error analysis, fixed weights, and low iteration efficiency in the prior art through comprehensive error analysis, dynamic error source weight distribution, and efficient iterative optimization mechanism, achieving more accurate, flexible, and efficient circular die production and processing control.
[0139] Reference Figure 4 In one embodiment, the present application also provides a circular die production and processing control system, which comprises:
[0140] A data acquisition unit 100 is used to acquire the actual cutting trajectory image during the production and processing of the circular die, and to identify the first coordinates of the first actual cutting trajectory in the image through an edge detection algorithm;
[0141] An error analysis unit 200 is used to obtain the second coordinates of the first planned cutting trajectory during the production and processing of the circular die, to compare the first coordinates with the second coordinates, to extract key feature points of the cutting, and to analyze the error data between the first actual cutting trajectory and the first planned cutting trajectory according to the key feature points;
[0142] A trajectory correction unit 300 is used to construct a feature vector according to the error data, to input the feature vector into an SVM classifier to obtain error sources, to assign weights to different error sources through a simulated annealing algorithm, to construct a cutting trajectory correction model according to the error sources and the corresponding weights, and to calculate the second planned cutting trajectory after compensation;
[0143] The target generation unit 400 is configured to adjust the operation parameter of the circular cutter die production and processing by using the second planning cutting track feedback, generate a compensated second actual cutting track, and determine whether the error between the second actual cutting track and the second planning cutting track meets a preset condition; when the preset condition is not met, iteratively update the weight of the error source by using the simulated annealing algorithm until the error between the second actual cutting track and the second planning cutting track meets the preset condition, and generate a target cutting track to complete the production and processing of the circular cutter die.
[0144] It can be understood that the system provided by the embodiment has functions or includes modules that can be used to execute the method described in the above method embodiment, and the specific implementation can refer to the description of the above method embodiment. For the sake of brevity, it will not be repeated here.
[0145] The application further provides an electronic device, including a processor and a memory, the memory is used for storing computer program code, the computer program code includes computer instructions, when the processor executes the computer instructions, the electronic device executes the method of any one of the above possible implementation manners.
[0146] The application further provides a computer readable storage medium, the computer readable storage medium stores a computer program, the computer program includes program instructions, and the program instructions are executed by a processor of an electronic device to make the processor execute the method of any one of the above possible implementation manners.
[0147] Those skilled in the art can realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the application.
Claims
1. A method for controlling the production and processing of a circular die, characterized in that, The method includes: The actual cutting trajectory image during the production and processing of the circular die is acquired, and the first coordinate of the first actual cutting trajectory in the image is identified by the edge detection algorithm. Obtain the second coordinates of the first planned cutting trajectory during the production and processing of the circular die, compare the first coordinates with the second coordinates, extract the key feature points of the cutting, and analyze the error data between the first actual cutting trajectory and the first planned cutting trajectory based on the key feature points. Based on the error data, feature vectors are constructed and input into an SVM classifier to obtain error sources. Simulated annealing algorithm is used to assign weights to different error sources. Based on the error sources and corresponding weights, a cutting trajectory correction model is constructed, and the compensated second planning cutting trajectory is calculated. The operating parameters of the circular die production process are adjusted by using the feedback of the second planned cutting trajectory to generate the compensated second actual cutting trajectory. It is then determined whether the error between the second actual cutting trajectory and the second planned cutting trajectory meets the preset conditions. If not, the weight of the error source is iteratively updated through the simulated annealing algorithm until the error between the second actual cutting trajectory and the second planned cutting trajectory meets the preset conditions. Finally, the target cutting trajectory is generated to complete the production process of the circular die.
2. The production and processing control method for circular die-cutting molds according to claim 1, characterized in that, The first coordinate of the first actual cutting trajectory in the image identified by the edge detection algorithm includes: The dynamic processing image sequence of the contact area between the tool and the workpiece during the production and processing of circular die-cutting molds is collected, and the optical filtering parameters are dynamically adjusted according to the material reflection characteristics through an adaptive edge enhancement model. An improved Canny operator detection algorithm is used to extract sub-pixel-level machining trajectory contours, and physical constraints are used to verify the extracted machining trajectory contours. Based on the verification results, the first coordinates of the first actual cutting trajectory with confidence rating are generated.
3. The production and processing control method for circular die-cutting molds according to claim 2, characterized in that, The physical constraint verification of the extracted processing trajectory contour includes: Establish a tool kinematic constraint model, including: ; The radius of the arc at the tip of the tool; Calculate the continuity coefficient between adjacent edge points and eliminate abnormal edge segments that do not conform to the tool kinematics equations; For the remaining trajectory contour, compare the image heat distribution with the theoretical cutting thermal model to correct the edge position deviation caused by thermal deformation.
4. The production and processing control method for circular die-cutting molds according to claim 1, characterized in that, The error sources include one or more of the following: material thermal deformation, laser power fluctuation, ambient temperature change, and external vibration.
5. The production and processing control method for circular die-cutting molds according to claim 4, characterized in that, The step of constructing a cutting trajectory correction model based on the error source and corresponding weights includes: ; In the formula, This represents the revised second-planned cutting trajectory. Indicates the initial length of the material. , , , The weights of the four error sources are respectively: material thermal deformation, ambient temperature change, external vibration, and laser power fluctuation. The coefficient of linear expansion of the material; For material temperature changes; Let be the coefficient of linear expansion of the machine tool. , The actual ambient temperature and the target ambient temperature; , For the acceleration and frequency of external vibration, This is the vibration compensation coefficient, and its value range is... ; , The target power and actual power of the laser. This is the power fluctuation compensation coefficient, with a value range of [value range missing]. .
6. The production and processing control method for circular die-cutting molds according to claim 5, characterized in that, The extraction of key feature points for cutting, and the analysis of error data between the first actual cutting trajectory and the first planned cutting trajectory based on these key feature points, include: Extract key feature points, including the start point, end point, intersection point, and inflection point of the cut; the inflection point is determined based on the magnitude of curvature. Based on the coordinates of key feature points in the first actual cutting trajectory and in the first planned cutting trajectory, the position error, angle error, and shape error of the cutting are analyzed.
7. A production and processing control system for a circular die, characterized in that, The system includes: The data acquisition unit is used to acquire images of the actual cutting trajectory during the production and processing of the circular die, and to identify the first coordinates of the first actual cutting trajectory in the image through an edge detection algorithm. The error analysis unit is used to obtain the second coordinates of the first planned cutting trajectory during the production and processing of the circular die, compare the first coordinates with the second coordinates, extract the key feature points of the cutting, and analyze the error data between the first actual cutting trajectory and the first planned cutting trajectory based on the key feature points. The trajectory correction unit is used to construct a feature vector based on the error data, input the feature vector into the SVM classifier to obtain the error source, assign weights to different error sources through simulated annealing algorithm, construct a cutting trajectory correction model based on the error source and corresponding weights, and calculate the compensated second planned cutting trajectory. The target generation unit is used to adjust the operating parameters of the circular die production process by using the feedback of the second planned cutting trajectory, generate the compensated second actual cutting trajectory, and determine whether the error between the second actual cutting trajectory and the second planned cutting trajectory meets the preset conditions. If not, the weight of the error source is iteratively updated by the simulated annealing algorithm until the error between the second actual cutting trajectory and the second planned cutting trajectory meets the preset conditions, and the target cutting trajectory is generated to complete the production process of the circular die.
8. An electronic device, characterized in that, include: A processor and a memory, the memory being used to store computer program code, the computer program code including computer instructions, wherein when the processor executes the computer instructions, the electronic device performs the production and processing control method for circular die-cutting as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which includes program instructions that, when executed by a processor of an electronic device, cause the processor to perform the production and processing control method for circular die-cutting as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Compensation control method and system for motion trail of robot
CN116214526A
Machining track control method and system of numerical control lathe
CN119575879A