A hydraulic clamp mold multi-process machining process regulation method based on image detection
By combining image detection and a liquid time constant neural network, the problem of error accumulation in the multi-process machining of hydraulic clamp molds was solved, realizing dynamic perception and fine control, and improving machining accuracy and efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-25
- Publication Date
- 2026-04-14
AI Technical Summary
In existing hydraulic clamp mold processing technology, it is difficult to dynamically track and accurately quantify the accumulation of errors between multiple processes, and it lacks adaptive capabilities, resulting in low rework efficiency and the inability to accumulate process optimization over a long period of time.
A multi-process machining control method for hydraulic clamp molds based on image detection is adopted. Mold data is acquired through an image acquisition station, and quality index vectors are generated by edge extraction, defect segmentation and texture analysis. Combined with a process condition liquid time constant neural network, hierarchical judgment and process control are performed to achieve dynamic perception and fine control.
It enables dynamic perception and precise control of the hydraulic clamp mold processing process, improves processing accuracy and stability, ensures the accumulation and iteration of detection and control knowledge, and improves the final inspection pass rate and production efficiency.
Smart Images

Figure CN121069898B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of mold processing control technology, and in particular to a method for controlling the multi-process machining of hydraulic clamp molds based on image detection. Background Technology
[0002] As a key component of hydraulic clamping tools, the machining accuracy of the hydraulic clamping mold directly affects the clamping performance and service life of the hydraulic clamps. Existing mold processing typically includes multiple processes such as roughing, drilling, heat treatment, finishing, electrical discharge machining, and polishing. Errors between different processes are prone to accumulate. Traditional quality control mainly relies on manual inspection or single-point measurement, making it difficult to continuously track and accurately quantify the dynamic errors between complex processes.
[0003] With the development of CNC machining and image inspection technologies, existing methods have attempted to use image recognition for defect detection and dimensional analysis, but they generally suffer from the following shortcomings: First, multiple types of quality information have not been modeled in a unified manner, making it difficult to form a comprehensive quality characterization; second, process control mostly relies on fixed rules or static models, lacking the ability to adapt to process conditions and time factors; and third, when the inspection results are fed back to the process level, there is a lack of a refined grading mechanism and closed-loop control, resulting in low rework efficiency and the inability to accumulate process optimization over a long period of time.
[0004] Therefore, how to provide a method for controlling the multi-process machining of hydraulic clamp molds based on image detection is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0005] One objective of this invention is to propose a method for controlling the multi-process machining of hydraulic clamp molds based on image detection. This invention provides a method for controlling the multi-process machining of hydraulic clamp molds based on image detection, which realizes dynamic perception, hierarchical judgment, refined control and adaptive updating of process map of the machining process.
[0006] A method for controlling the multi-process machining of hydraulic clamp molds based on image detection according to an embodiment of the present invention includes the following steps:
[0007] An image acquisition station is set up after the processing of the hydraulic clamp mold to acquire image data of the mold processing area;
[0008] Perform edge extraction, defect segmentation, and texture analysis based on image data, and output a quality index vector;
[0009] The quality index vector is input into the process condition liquid time constant neural network, and the output classification result determines whether the quality index is in the qualified zone, the adjustment zone or the out-of-bounds zone, and generates corresponding process control instructions based on the classification result.
[0010] When the classification result is in the adjustment zone, the process control instructions include in-situ feedback adjustment of the tool compensation, feed, spindle speed or fixture positioning parameters of the current process;
[0011] When the grading result is out of bounds, the out-of-bounds process control instruction includes generating a local reprocessing subtask and performing image detection again after completion, until the detection result enters the adjustment area or qualified area.
[0012] The quality indicator vector, process control instructions, and process parameters are stored in a versioned manner, and the process diagram is updated based on the final inspection results.
[0013] Furthermore, the processing steps include: roughing, drilling, heat treatment, finishing, electrical discharge machining, and polishing of the hydraulic clamp mold.
[0014] Furthermore, the steps for generating the quality indicator vector include:
[0015] Perform edge detection and geometric fitting on image data, and output dimensional deviation and shape and position error;
[0016] Perform image segmentation on the image data, identify burr and surface defect regions, and calculate burr length and defect area;
[0017] Frequency domain analysis is performed on the image data to extract texture features, which are then mapped to surface roughness surrogate values.
[0018] Perform feature matching on mold images acquired before and after different processes, and calculate key point offsets;
[0019] The dimensional deviation, form and position error, burr length, defect area, roughness proxy value and key point offset are combined to form a quality index vector.
[0020] Furthermore, the steps for generating the grading results include:
[0021] The quality index vector sequence arranged according to the process sequence, along with the corresponding process identifier and the time interval between processes, are input into the process condition liquid time constant neural network.
[0022] The process condition liquid time constant neural network includes:
[0023] The input encoding unit performs normalization processing on the quality index vector and concatenates it with the process identifier and time interval to form an input tensor;
[0024] The time constant generation unit dynamically generates the time constant and coupling weight of each liquid neuron based on the process identifier and time interval.
[0025] The liquid state update unit performs continuous time state updates based on the time constant.
[0026] The cost-sensitive decoding unit outputs the classification results of the qualified area, adjustment area or out-of-bounds area based on the misjudgment cost matrix, and outputs the confidence value.
[0027] When the confidence level is below the threshold, the issuance of control commands is prohibited, and the image re-acquisition or manual review process is triggered.
[0028] Furthermore, the process condition liquid time constant neural network includes:
[0029] Set up a process embedding layer at the input end, map the process number to an embedding vector and concatenate it with the quality index vector for input;
[0030] Configure a process condition hypernet to dynamically generate the time constant and coupling weight of liquid neurons based on the process identifier and the time interval between processes.
[0031] A cost-sensitive decoding head is set at the output end and a confidence estimation branch is connected in parallel. The classification loss is weighted using a preset cost matrix, and the classification result and heteroscedasticity confidence value are output.
[0032] Introduce low-rank adapter weights in the hidden layer.
[0033] Furthermore, the process condition liquid time constant neural network sets a monotonicity constraint module between the output layer and the input quality indicators, so that the mapping relationship between burr length and out-of-bounds probability, key point offset and out-of-bounds probability, and roughness surrogate value and adjustment probability is monotonically increasing, and a penalty term is applied to samples that violate the constraint during training.
[0034] Furthermore, the process control adjustment instructions include:
[0035] The tool radius compensation amount is calculated based on the dimensional deviation, and the tool radius compensation amount is written into the tool compensation parameter table of the CNC system;
[0036] The feed rate correction value is calculated based on the form and position error, and the feed rate correction value is limited to the upper and lower limits of the allowable feed rate of the machine tool.
[0037] The spindle speed correction is calculated based on the surface roughness proxy value. When the roughness proxy value is higher than the baseline, the spindle speed is set to the correction value corresponding to the higher baseline. When the roughness proxy value is lower than the baseline, the spindle speed is set to the correction value corresponding to the lower baseline.
[0038] Calculate the fixture positioning compensation amount based on the key point offset, and write the fixture positioning compensation amount into the tooling setting table;
[0039] Synchronize the tool radius compensation, fixture positioning compensation, feed rate correction, and spindle speed correction to the next process card.
[0040] Furthermore, the out-of-bounds process control command includes:
[0041] A local reprocessing subtask is generated based on dimensional deviations and geometric errors, and local processing allowances and path overlap rates are set in the local reprocessing subtask;
[0042] A local reprocessing subtask is generated based on the burr length, and the chamfering processing path and chamfering depth are set.
[0043] A local reprocessing subtask is generated based on the defect area, and the pulse width and gap voltage of the electrical discharge machining are set.
[0044] After the local reprocessing subtask is completed, images are acquired again, and a new quality index vector is generated based on the reacquired images. The newly generated quality index vector is then input into the process condition liquid time constant neural network for classification.
[0045] The beneficial effects of this invention are:
[0046] By fusing the detection results of multiple types of images into a quality index vector, a comprehensive quantification of size, shape, surface defects and key point offsets is achieved. A process condition liquid time constant neural network is introduced, which can dynamically adjust the characteristics of neurons according to the process sequence and time interval, and has stronger adaptability than the traditional static model.
[0047] By triggering adjustment instructions or reprocessing subtasks that exceed the limits based on the graded results, a closed-loop feedback mechanism for the process is constructed to improve processing accuracy and stability. The adoption of versioned storage and process map update mechanism ensures the accumulation and iteration of detection and control knowledge, and has long-term optimization capabilities. Attached Figure Description
[0048] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:
[0049] Figure 1 This is a flowchart of a multi-process machining control method for hydraulic clamp molds based on image detection proposed in this invention;
[0050] Figure 2 This is a schematic diagram of the neural network structure for the liquid time constant of the process conditions in a multi-process machining method for hydraulic clamp molds based on image detection proposed in this invention.
[0051] Figure 3 This is a flowchart illustrating the quality index vector generation process of a multi-process machining control method for hydraulic clamp molds based on image detection proposed in this invention. Detailed Implementation
[0052] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.
[0053] refer to Figure 1-3 A method for controlling the multi-process machining of hydraulic clamp molds based on image detection includes the following steps:
[0054] An image acquisition station is set up after the processing of the hydraulic clamp mold to acquire image data of the mold processing area;
[0055] Perform edge extraction, defect segmentation, and texture analysis based on image data, and output a quality index vector;
[0056] The quality index vector is input into the process condition liquid time constant neural network, and the output classification result determines whether the quality index is in the qualified zone, the adjustment zone or the out-of-bounds zone, and generates corresponding process control instructions based on the classification result.
[0057] When the classification result is in the adjustment zone, the process control instructions include in-situ feedback adjustment of the tool compensation, feed, spindle speed or fixture positioning parameters of the current process;
[0058] When the grading result is out of bounds, the out-of-bounds process control instruction includes generating a local reprocessing subtask and performing image detection again after completion, until the detection result enters the adjustment area or qualified area.
[0059] The quality indicator vector, process control instructions, and process parameters are stored in a versioned manner, and the process diagram is updated based on the final inspection results.
[0060] In this embodiment, the image data includes:
[0061] Machine tool machining station camera data: Industrial cameras are deployed at the machining stations of CNC machine tools, milling machines, wire cutting machines, and grinding machines to capture real-time images of mold workpieces during the machining process. The image resolution is 1920×1080, the frame rate is 30fps, and it has the function of global shutter and industrial fill light synchronization.
[0062] Auxiliary sensing image data: 3D structured light cameras are configured at the flow points between processes to collect workpiece surface morphology and geometric dimension data with an accuracy of 0.01mm.
[0063] Process documents and CAD drawing data: Import mold design CAD drawings and process cards through the MES system interface, including mold dimensions, tolerance zones, key surface markings, and processing sequence.
[0064] All image data is transmitted to the image processing server via the GigE Vision interface. The system is set to collect data once before and after each critical node of each process to ensure a comparison of the workpiece's state before and after processing.
[0065] In this embodiment, the processing steps include: roughing, drilling, heat treatment, finishing, electrical discharge machining, and polishing of the hydraulic clamp mold.
[0066] In this embodiment, image preprocessing includes:
[0067] Noise suppression: A combination of Gaussian filtering and median filtering is used to remove image noise caused by machine tool vibration and oil mist.
[0068] Illumination equalization: Adaptive histogram equalization (CLAHE) is used to correct uneven illumination at different workstations and enhance edge features.
[0069] Workpiece region segmentation: The U-Net-based depth segmentation network is used to identify the mold workpiece region, with a segmentation accuracy of over 98%.
[0070] Key point extraction: Within the workpiece segmentation area, the deep learning-based SIFT-SURF fusion detection algorithm is used to extract geometric key points, including corners, holes, and groove features.
[0071] The extracted results are stored in the form of a coordinate set and a correspondence is established with the CAD reference drawing.
[0072] In this embodiment, the steps for generating the quality index vector include:
[0073] Edge detection and geometric fitting are performed on the image data, and the output dimensions and geometric errors are calculated.
[0074] Image preprocessing: performing distortion correction, grayscale normalization, and noise suppression;
[0075] Edge extraction is performed using the Sobel or Canny operator, combined with non-maximum suppression to obtain single-pixel edges;
[0076] Sub-pixel localization of edge points (grayscale centroid or quadratic curve interpolation) is performed, and geometric parameters are obtained using least squares line fitting, circle fitting or arc fitting.
[0077] Align the fitted elements with the CAD datum, calculate the dimensional deviations and geometric errors (including at least one of positional tolerance, coaxiality, or flatness), and output the values and units.
[0078] Perform image segmentation on the image data, identify burr and surface defect regions, and calculate burr length and defect area:
[0079] Adaptive histogram equalization is applied to the original image to enhance small bumps and dark lines;
[0080] The U-Net semantic segmentation model is used to segment images for defects, resulting in a binary mask. The mask categories at least cover burrs and surface defects.
[0081] Calculate the area (pixel count × pixel-to-millimeter conversion factor) for each connected component;
[0082] The maximum projected distance along the tangential direction of the burr connected domain along the orifice or edge is calculated to obtain the burr length;
[0083] Connected regions with an area smaller than the minimum detectable threshold or with excessive shape dispersion are discarded, while valid defect areas are retained.
[0084] Record the burr length and defect area for each piece.
[0085] Perform frequency domain analysis on the image data, extract texture features, and map them to surface roughness surrogate values:
[0086] Obtain surface texture image sub-blocks based on the detection area defined in the process card;
[0087] Perform a two-dimensional fast Fourier transform (FFT) on the sub-blocks to calculate the mid-to-high frequency energy ratio and the consistency index of the main direction;
[0088] Alternatively, Gabor filter banks can be used to extract directional texture energy;
[0089] Using a baseline regression model or a monotonic mapping function, frequency domain / directional features are mapped to surface roughness surrogate values;
[0090] Record the surface roughness proxy value and the original features used for tracing.
[0091] Perform feature matching on mold images acquired before and after different processes, and calculate key point offsets:
[0092] Extract feature points (either SIFT or ORB) from images before and after adjacent processes;
[0093] Perform feature matching and use the RANSAC algorithm to eliminate false matches;
[0094] Calculate the displacement statistics of the matching point pairs in a unified coordinate system and output the key point offset (at least one of the average offset and the maximum offset);
[0095] The dimensional deviation, form and position error, burr length, defect area, roughness proxy value and key point offset are combined to form a quality index vector.
[0096] In this embodiment, the steps for generating the grading results include:
[0097] The quality index vector sequence arranged according to the process sequence, along with the corresponding process identifier and the time interval between processes, are input into the process condition liquid time constant neural network.
[0098] The quality index vector is a six-dimensional field, which includes, in sequence, dimensional deviation, form and position error, burr length, defect area, surface roughness proxy value, and key point offset;
[0099] Process identification uses an independent coding format, consisting of process number and processing type;
[0100] The time interval between processes is recorded in seconds as the time difference between adjacent processes.
[0101] The process condition liquid time constant neural network includes:
[0102] The input encoding unit performs normalization processing on the quality index vector and concatenates it with the process identifier and time interval to form an input tensor;
[0103] The input encoding unit performs Z-score normalization on the quality index vector, maps the process identifier to a fixed-length embedding vector, and expands the time interval into a fixed-length vector after performing a logarithmic transformation. These three are concatenated to form the input tensor. The input tensor is fed into the neural network in batches.
[0104] The time constant generation unit dynamically generates the time constant and coupling weight of each liquid neuron based on the process identifier and time interval.
[0105] The time constant is obtained by superimposing a preset base value and a process condition correction amount;
[0106] The coupling weights are generated by the process condition hypernetwork to ensure that the state evolution rates of different processes differ.
[0107] The liquid state update unit performs continuous time state updates based on the time constant.
[0108] The liquid state update unit updates the neuron state continuously over time using the Euler discretization method. The update process saves the state values across time steps to reflect the cumulative impact of previous processes on subsequent processes.
[0109] The cost-sensitive decoding unit outputs the classification results of the qualified area, adjustment area or out-of-bounds area based on the misjudgment cost matrix, and outputs the confidence value.
[0110] In the misjudgment cost matrix, the highest cost is assigned to the case of misjudging the "out-of-bounds zone" as the "qualified zone", and the second highest cost is assigned to the case of misjudging the "adjustment zone" as the "qualified zone".
[0111] The decoding results are fixed into three categories: qualified area, adjustment area, and out-of-bounds area.
[0112] When the confidence level is below the threshold, the issuance of control commands is prohibited, and the image re-acquisition or manual review process is triggered.
[0113] Image re-acquisition involves re-acquiring images of the mold processing area from the image acquisition station;
[0114] Manual review is completed through the quality inspection terminal interface, and the quality inspector enters the confirmation result.
[0115] The verified quality indicator vectors replace the original data and are then input into the neural network to perform grading.
[0116] In this embodiment, the process condition liquid time constant neural network includes:
[0117] Set up a process embedding layer at the input end, mapping the process number to an embedding vector and concatenating it with the quality index vector for input:
[0118] The process numbering uses an independent index code, with roughing, drilling, heat treatment, finishing, electrical discharge machining and polishing corresponding to indices 0 to 5 respectively;
[0119] The process number is mapped to a 64-dimensional embedded vector through a table lookup operation;
[0120] The embedded vector is concatenated with the standardized quality index vector (a six-dimensional real vector) to form a combined input of length 70;
[0121] The input vectors are fed into the network in batches, with a fixed batch size of 32.
[0122] Configure a process condition hypernetwork to dynamically generate the time constant and coupling weights of liquid neurons based on the process identifier and the time interval between processes:
[0123] The input to the hypernetwork consists of process embedding vectors and time intervals between processes (normalized to 32 dimensions);
[0124] The supernet consists of two fully connected layers: the first layer has 128 elements and ReLU activation, and the second layer has 256 elements and Sigmoid activation.
[0125] The output includes:
[0126] The time constant parameter τ of the liquid neuron, with a value range of [0.05, 1.0] seconds, controls the state update speed;
[0127] The coupling weight matrix W between liquid neurons is subject to sparse constraints, with the proportion of non-zero elements fixed at 20%, to ensure that the weight distribution varies under different processes.
[0128] During the training of hypernetworks, a regularization term is introduced to smooth the generated parameters and avoid unstable fluctuations.
[0129] A cost-sensitive decoder is set up at the output end and a confidence estimation branch is connected in parallel. The classification loss is weighted using a preset cost matrix, and the classification result and heteroscedasticity confidence value are output:
[0130] The output consists of two parts:
[0131] Cost-sensitive decoder:
[0132] The input is a hidden state vector;
[0133] A two-layer fully connected structure (64-dimensional layer 1 and 3-dimensional layer 2) is adopted to output the probability distribution of the qualified area, adjustment area and out-of-bounds area.
[0134] During training, a misclassification cost matrix is introduced, set as follows:
[0135] The cost of being deemed acceptable for exceeding the boundary is 10, the cost of being deemed acceptable for adjustment is 5, and the cost of other misjudgments is 1.
[0136] The classification boundary is optimized using cost-weighted cross-entropy loss.
[0137] Confidence estimation branch:
[0138] Connected in parallel with the decoder, a single-layer fully connected network outputs a scalar value representing the heteroscedasticity confidence level. This value is in the interval [0,1] and is constrained by the Sigmoid function.
[0139] When the confidence level is below 0.7, the system prohibits the issuance of control commands and triggers the image re-acquisition and manual review process.
[0140] Introduce low-rank adapter weights in the hidden layer:
[0141] The hidden state dimension of the liquid neuron is fixed at 256;
[0142] Introduce a low-rank adapter (LoRA-like) structure in the hidden layer:
[0143] The original weight matrix is decomposed into A·B, where A is a 256×16 matrix and B is a 16×256 matrix;
[0144] Only update the parameters of the lower-rank components, keeping the main weights frozen;
[0145] This design improves the adaptability of process conditions while ensuring reasoning efficiency.
[0146] In this embodiment, the process condition liquid time constant neural network sets a monotonic constraint module between the output layer and the input quality index, so that the mapping relationship between burr length and out-of-bounds probability, key point offset and out-of-bounds probability, and roughness surrogate value and adjustment probability is monotonically increasing, and a penalty term is applied to samples that violate the constraint during the training process.
[0147] In this embodiment, the process condition liquid time constant neural network incorporates a monotonicity constraint module between the output layer and the input quality indicators to ensure that the prediction results meet the physical and technological laws governing the processing. The module is designed as follows: as the burr length gradually increases, the probability of the system output exceeding the limit should increase accordingly; as the critical point offset gradually increases, the probability of the system output exceeding the limit should increase accordingly; and as the surface roughness proxy value gradually increases, the probability of the system output adjusting should increase accordingly. This mechanism avoids "unreasonable reverse prediction" in actual process control.
[0148] Specifically, this module adds constraint channels within the network for the three key indicators mentioned above. Each channel has a non-negativity constraint on its connection weights, ensuring that the larger the input value, the higher the corresponding risk probability, and not lower it. Taking glitch length as an example, the system restricts the weight direction and gain amplitude so that as the input value gradually increases from a lower to a higher level within a continuous range, the output out-of-bounds probability also shows a stable upward trend. Similarly, for keypoint offset and surface roughness surrogate values, the system establishes a monotonically increasing mapping relationship and dynamically maintains this trend during network inference.
[0149] During training, this module works in conjunction with a monotonicity penalty mechanism. Training data is designed as paired inputs, where one set of data has a larger glitch length, keypoint offset, or roughness surrogate value than the other set. When the network outputs a risk probability that does not meet the monotonicity requirement during inference—for example, a sample with a larger input value predicts a lower risk probability—the system treats this discrepancy as a monotonicity violation and generates an additional penalty value. This penalty value is added to the loss function according to preset weight coefficients and backpropagated along with the regular classification error for optimization. The weight coefficients are typically set between 0.1 and 0.5, effectively constraining monotonicity without compromising overall classification performance.
[0150] Through this design, the process condition liquid time constant neural network maintains prediction accuracy while ensuring consistency between the output results and the actual processing technology. For example, as burrs gradually decrease after mold polishing, the system can stably output a decrease in the probability of exceeding the limit; while after heat treatment, when shape and position errors may increase, the system can output a trend of gradually increasing risk of exceeding the limit. In practical applications, this module effectively reduces prediction anomalies caused by random noise, local overfitting, or abnormal inputs, thereby improving the interpretability and reliability of process control commands.
[0151] In this embodiment, the process control adjustment command includes:
[0152] The tool radius compensation amount is calculated based on the dimensional deviation, and the tool radius compensation amount is written into the tool compensation parameter table of the CNC system;
[0153] For dimensional deviation compensation, the difference between the measured dimension obtained from image detection and the nominal dimension in CAD is used to distinguish between inner and outer contours. For inner contours such as the inside of holes or grooves, the tool radius compensation is calculated by multiplying the diameter deviation by -1 / 2; for outer contours, it is calculated by multiplying the outer dimension deviation by -1 / 2. This allows for positive compensation for smaller hole diameters and negative compensation for larger outer dimensions. The calculated compensation amount is limited to ±20% of the nominal tool radius and further quantized in one-micrometer increments, with the result retained to three decimal places in millimeters. The processed compensation amount is directly written into the radius compensation field of the CNC system's tool compensation parameter table, along with a timestamp and workpiece identifier, forming a traceable parameter update record.
[0154] The feed rate correction value is calculated based on the form and position error, and the feed rate correction value is limited to the upper and lower limits of the allowable feed rate of the machine tool.
[0155] For feed rate correction, the error ratio is calculated by using the form and position error in the quality index vector and the form and position tolerance zone corresponding to the process, i.e., the form and position error divided by the tolerance zone. Based on this ratio, a correction factor is determined. The correction factor is defined as the unit minus 0.4 multiplied by the error ratio, and the correction factor is limited to between 0.6 and 1. The corrected feed rate value can then be calculated as the baseline feed rate multiplied by the correction factor and then subtracted from the baseline feed rate. The corrected feed rate is limited to the upper and lower limits allowed by the machine tool and written into the feed parameters of the program segment. The form and position error, error ratio, correction factor, and corrected feed rate are recorded in the process database to ensure data verifiability.
[0156] The spindle speed correction is calculated based on the surface roughness proxy value. When the roughness proxy value is higher than the baseline, the spindle speed is set to the correction value corresponding to the higher baseline. When the roughness proxy value is lower than the baseline, the spindle speed is set to the correction value corresponding to the lower baseline.
[0157] For spindle speed correction, the roughness deviation ratio is calculated using the surface roughness surrogate value and the preset roughness baseline as references. This is calculated by subtracting the baseline from the roughness surrogate value and then dividing by the baseline. The correction factor is defined as the unit plus 0.2 multiplied by the deviation ratio, and its value is limited to between 0.6 and 1.1. Based on this correction factor, the spindle speed correction amount is calculated as the baseline spindle speed multiplied by the correction factor and then subtracted from the baseline speed. The corrected speed is then limited to the upper and lower limits of the tool parameter table. The correction result is written into the spindle speed parameters of the program segment, forming a record in the process database, including the roughness surrogate value, deviation ratio, correction factor, and the corrected spindle speed.
[0158] Calculate the fixture positioning compensation amount based on the key point offset, and write the fixture positioning compensation amount into the tooling setting table;
[0159] For fixture positioning compensation, the same set of key points is extracted from images of adjacent processes, and the pixel coordinates are transformed to the machine tool coordinate system through coordinate calibration. Based on the preceding and current coordinates of the key points, the centroid position is calculated, and the least squares method is used to solve the planar rigid transformation, obtaining the translational components in the X and Y directions and the angular increment around the Z axis. The compensation amount is taken as the opposite of the above components and angle to eliminate the detected offset error. The X and Y direction compensation is limited to ±50 micrometers, and the rotation compensation is limited to ±trigonometric fractions. The results are quantized in steps of one micrometer and one arcsecond. The compensation value is written into the X, Y, and rotation fields of the G54 coordinate system in the tooling setting table, and the timestamp and workpiece identification are recorded to ensure traceability.
[0160] After the parameters mentioned above are written in the current process, the system will synchronize the tool radius compensation, fixture positioning compensation, feed rate correction, and spindle speed correction to the process card of the next process. The synchronized data is recorded in the "Pre-correction Area." After the next process is clamped, the CNC program will read this pre-correction area in the beginning section and sequentially execute the tool compensation update, tooling tool setting update, and preset operations for feed rate and spindle speed. Simultaneously, the system generates a unique version number for each synchronization. This version number is composed of the workpiece identifier, process number, and timestamp. It is used to replay the calculation input, calculation results, writing location, and version information in the quality traceability query interface, thereby achieving closed-loop control with full process traceability.
[0161] In this embodiment, the out-of-bounds process control command includes:
[0162] A local reprocessing subtask is generated based on dimensional deviations and geometric errors, and local processing allowances and path overlap rates are set in the local reprocessing subtask;
[0163] When the detection result indicates an out-of-bounds zone, the specific deviations of each indicator in the quality indicator vector are analyzed to determine the type of remapping to be triggered. For cases where dimensional deviations and geometrical errors exceed the allowable range, the system generates a local remapping subtask. In this subtask, the required local machining allowance is calculated based on the ratio of the measured deviation to the tolerance zone, limiting the machining allowance to between 5% and 20% of the allowance reserved in the previous process. The path overlap rate is determined based on the error distribution, typically between 20% and 30%, to ensure that the machining path fully covers the area without introducing excessive repetitive cutting when correcting overcut or undercut regions. The generated local toolpath is converted into machine tool code by the post-processor and directly inserted into the task queue of the process to be executed.
[0164] A local reprocessing subtask is generated based on the burr length, and the chamfering processing path and chamfering depth are set.
[0165] For out-of-bounds situations caused by burr length exceeding a threshold, a chamfering subtask is generated. This subtask identifies the burr edge position using image segmentation results, calculates the length of the line segment requiring chamfering, and determines the chamfering path based on the tool diameter and safety margin. The chamfering depth is set based on the average burr height, typically 1.2 times the burr height, to ensure complete burr removal. The machining path is optimized for continuous tool movement to reduce tool marks caused by repeated tool lifts. Safety parameters for speed and spindle speed are appended after path generation to ensure stable machining.
[0166] A local reprocessing subtask is generated based on the defect area, and the pulse width and gap voltage of the electrical discharge machining are set.
[0167] For surface defects exceeding a threshold area, a discharge machining subtask is generated. The area and depth of the defect region are determined by image segmentation and grayscale estimation. The pulse width is set according to the defect area: short pulses are used for smaller defects to reduce secondary discharge areas, and medium pulses are used for larger defects to improve repair efficiency. The gap voltage is automatically adjusted according to the defect depth; for shallow defects, it is set to the baseline voltage plus a bias, and for deep defects, the voltage is increased to ensure a stable discharge gap. All discharge parameters are loaded into the power control module, and a corresponding discharge machining path is generated, which strictly covers the defect area and avoids entering the acceptable area.
[0168] After the local reprocessing subtask is completed, image acquisition is triggered again, and edge extraction, defect segmentation, and texture analysis are re-executed based on the new image data to generate a new quality index vector. This vector is then input into the process condition liquid time constant neural network for classification. If the result is still in the out-of-bounds zone, a corresponding reprocessing subtask is generated again based on the new deviation result; if the classification result enters the adjustment zone, the process control command is used to fine-tune the parameters; if it enters the qualified zone, the reprocessing process of this step ends and proceeds to the next step. The entire process ensures that out-of-bounds situations can be gradually corrected through automatic closed-loop reprocessing until the processing result meets the process requirements.
[0169] Example 1:
[0170] To verify the feasibility of this invention in practice, it was applied to a batch processing production line for a hydraulic clamp mold. The production line includes six main processes: roughing, drilling, heat treatment, finishing, electrical discharge machining, and polishing, with an industrial camera image acquisition station installed at the exit of each process.
[0171] 1. Experimental Environment
[0172] Machine tool model: Mazak VCN-530C CNC vertical machining center;
[0173] Workpiece material: Cr12MoV alloy steel;
[0174] Image acquisition equipment: 4096×2160 resolution industrial camera, 30fps frame rate, with 5600K ring LED light source;
[0175] Network training data: A total of 12,000 image samples of molds from various processing steps were collected, covering 6 processes.
[0176] 2. Experimental Procedure
[0177] After each process is completed, images of the mold processing area are automatically acquired, and a quality index vector is generated:
[0178] Dimensional deviation (mm);
[0179] Geometric error (mm);
[0180] Burr length (μm);
[0181] Defect area (mm) 2 );
[0182] Roughness proxy value (μm);
[0183] Keypoint offset (μm).
[0184] This vector, along with the process number and the time interval between processes, is input into a neural network for the liquid time constant of the process conditions. The network outputs the classification results for "qualified area / adjustment area / out-of-bounds area" and their confidence values.
[0185] 3. Verification through process adjustments and examples
[0186] During the finishing process of a batch of 20 molds, the system detected:
[0187] Dimensional deviation = 0.05mm;
[0188] Geometric error = 0.03 mm;
[0189] Roughness proxy value = 0.65 μm;
[0190] Keypoint offset = 28μm;
[0191] The network classification result is in the adjustment zone, with a confidence level of 0.92. The system generates the following control instructions:
[0192] Tool radius compensation = 0.025mm → Write into the tool compensation table;
[0193] Feed rate correction value = 440 mm / min (adjusted from the original value of 500 mm / min);
[0194] Spindle speed correction = +300 rpm (adjusted from 6000 rpm to 6300 rpm);
[0195] Fixture positioning compensation = 28μm → Write into the tool setting table;
[0196] After compensation, the dimensional deviation of the process was reduced to 0.02 mm and the roughness proxy value was reduced to 0.52 μm, successfully entering the qualified zone.
[0197] 4. Verification of out-of-bounds processes
[0198] In another batch of 15 molds, the test results during the electrical discharge machining process were as follows:
[0199] Defect area = 0.42 mm 2 ;
[0200] Burr length = 130μm;
[0201] The network classification result indicates an out-of-bounds zone, with a confidence level of 0.87. The system automatically generates a local reprocessing subtask:
[0202] Partial discharge machining: pulse width set to 120μs, gap voltage set to 35V.
[0203] Chamfering: Chamfer depth set to 0.3mm, path coverage 100%.
[0204] After reprocessing and image acquisition, the defect area was reduced to 0.08 mm. 2 The burr length was reduced to 40μm, and the final grade entered the adjustment zone. After a slight correction, it entered the qualified zone.
[0205] 5. Experimental Results
[0206] In a batch processing experiment of 100 hydraulic clamp molds:
[0207] The percentage of samples that passed the initial test was 72%.
[0208] After adjustments, the proportion of those entering the qualified zone was 24%.
[0209] The proportion of products that have undergone cross-border reprocessing and then entered the qualified area is 4%.
[0210] The final inspection pass rate has been increased to 100%.
[0211] To further verify the advantages of the present invention over traditional processes, 200 workpieces from a hydraulic clamp mold production line were selected and divided into an experimental group and a control group.
[0212] Experimental group (100 pieces): The multi-process processing control method based on image detection of the present invention was adopted;
[0213] Control group (100 pieces): The conventional process was used, and manual sampling was only carried out after each process. Real-time image detection and adaptive control of process parameters were not implemented.
[0214] Control experimental conditions:
[0215] Machine tool: Mazak VCN-530C CNC vertical machining center;
[0216] Workpiece material: Cr12MoV alloy steel;
[0217] Process sequence: roughing → drilling → heat treatment → finishing → electrical discharge machining → polishing;
[0218] Detection method: The experimental group used an industrial camera and a process condition liquid time constant neural network; the control group relied solely on manual caliper measurement and final inspection surface roughness meter.
[0219] Table 1 Comparative Experiment Results
[0220]
[0221] As shown in Table 1, regarding processing quality, this invention, through the combination of image detection and a process condition liquid time constant neural network, can promptly detect dimensional deviations, shape and position errors, burrs, and surface defects, and issue compensation instructions in the "adjustment zone" and generate local reprocessing sub-tasks in the "boundary zone." Therefore, the final inspection pass rate increased from 92.5% in the control group to 100%, and the scrap rate was completely eliminated.
[0222] In terms of machining accuracy, the present invention effectively reduces indicators such as dimensional deviation, roughness and defect area, indicating that the method provides more stable control over the surface and positional accuracy of the mold.
[0223] In terms of processing efficiency, the average processing time per piece increased by 4.3% due to the addition of image acquisition and real-time compensation. However, the overall production line's unit qualified product output efficiency improved by approximately 9% due to a significant decrease in the scrap rate.
[0224] In terms of traceability, this invention provides a reliable data foundation for subsequent process improvement and equipment maintenance by versioning and storing quality indicator vectors, process control instructions and process parameters, and updating the process map based on the final inspection results. This is something that the control group cannot achieve.
[0225] Comparative experiments have shown that although the present invention slightly increases the processing time per piece, it significantly improves the quality consistency of mold processing and the final inspection pass rate. The overall benefits are significantly better than traditional processes, and it has high practical value and promotion significance.
[0226] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A method for controlling the multi-process machining of hydraulic clamp molds based on image detection, characterized in that, Includes the following steps: An image acquisition station is set up after the processing of the hydraulic clamp mold to acquire image data of the mold processing area; Perform edge extraction, defect segmentation, and texture analysis based on image data, and output a quality index vector; The quality index vector is input into the process condition liquid time constant neural network, and the output classification result determines whether the quality index is in the qualified zone, the adjustment zone or the out-of-bounds zone, and generates corresponding process control instructions based on the classification result. The process condition liquid time constant neural network includes: The input encoding unit performs normalization processing on the quality index vector and concatenates it with the process identifier and time interval to form an input tensor; The time constant generation unit dynamically generates the time constant and coupling weight of each liquid neuron based on the process identifier and time interval. The liquid state update unit performs continuous time state updates based on the time constant. The cost-sensitive decoding unit outputs the classification results of the qualified area, adjustment area or out-of-bounds area based on the misjudgment cost matrix, and outputs the confidence value. When the classification result is in the adjustment zone, the process control instructions include in-situ feedback adjustment of the tool compensation, feed, spindle speed or fixture positioning parameters of the current process; When the grading result is out of bounds, the out-of-bounds process control instruction includes generating a local reprocessing subtask and performing image detection again after completion, until the detection result enters the adjustment area or qualified area. The quality indicator vector, process control instructions, and process parameters are stored in a versioned manner, and the process diagram is updated based on the final inspection results.
2. The method for controlling the multi-process machining of hydraulic clamp molds based on image detection according to claim 1, characterized in that, The processing steps include: roughing, drilling, heat treatment, finishing, electrical discharge machining, and polishing of the hydraulic clamp mold.
3. The method for controlling the multi-process machining of hydraulic clamp molds based on image detection according to claim 1, characterized in that, The steps for generating the quality indicator vector include: Perform edge detection and geometric fitting on image data, and output dimensional deviation and shape and position error; Perform image segmentation on the image data, identify burr and surface defect regions, and calculate burr length and defect area; Frequency domain analysis is performed on the image data to extract texture features, which are then mapped to surface roughness surrogate values. Perform feature matching on mold images acquired before and after different processes, and calculate key point offsets; The dimensional deviation, form and position error, burr length, defect area, roughness proxy value and key point offset are combined to form a quality index vector.
4. The method for controlling the multi-process machining of hydraulic clamp molds based on image detection according to claim 1, characterized in that, The steps for generating the grading results include: The quality index vector sequence arranged according to the process sequence, along with the corresponding process identifier and the time interval between processes, are input into the process condition liquid time constant neural network. When the confidence level is below the threshold, the issuance of control commands is prohibited, and the image re-acquisition or manual review process is triggered.
5. The method for controlling the multi-process machining of hydraulic clamp molds based on image detection according to claim 1, characterized in that, The process condition liquid time constant neural network includes: Set up a process embedding layer at the input end, map the process number to an embedding vector and concatenate it with the quality index vector for input; Configure a process condition hypernet to dynamically generate the time constant and coupling weight of liquid neurons based on the process identifier and the time interval between processes. A cost-sensitive decoding head is set at the output end and a confidence estimation branch is connected in parallel. The classification loss is weighted using a preset cost matrix, and the classification result and heteroscedasticity confidence value are output. Introduce low-rank adapter weights in the hidden layer.
6. The method for controlling the multi-process machining of hydraulic clamp molds based on image detection according to claim 1, characterized in that, The process condition liquid time constant neural network sets a monotonic constraint module between the output layer and the input quality indicators, so that the mapping relationship between burr length and out-of-bounds probability, key point offset and out-of-bounds probability, and roughness surrogate value and adjustment probability is monotonically increasing, and a penalty term is applied to samples that violate the constraints during training.
7. The method for controlling the multi-process machining of hydraulic clamp molds based on image detection according to claim 1, characterized in that, The adjusted process control commands include: The tool radius compensation amount is calculated based on the dimensional deviation, and the tool radius compensation amount is written into the tool compensation parameter table of the CNC system; The feed rate correction value is calculated based on the form and position error, and the feed rate correction value is limited to the upper and lower limits of the allowable feed rate of the machine tool. The spindle speed correction is calculated based on the surface roughness proxy value. When the roughness proxy value is higher than the baseline, the spindle speed is set to the correction value corresponding to the higher baseline. When the roughness proxy value is lower than the baseline, the spindle speed is set to the correction value corresponding to the lower baseline. Calculate the fixture positioning compensation amount based on the key point offset, and write the fixture positioning compensation amount into the tooling setting table; Synchronize the tool radius compensation, fixture positioning compensation, feed rate correction, and spindle speed correction to the next process card.
8. The method for controlling the multi-process machining of hydraulic clamp molds based on image detection according to claim 1, characterized in that, The out-of-bounds process control instructions include: A local reprocessing subtask is generated based on dimensional deviations and geometric errors, and local processing allowances and path overlap rates are set in the local reprocessing subtask; A local reprocessing subtask is generated based on the burr length, and the chamfering processing path and chamfering depth are set. A local reprocessing subtask is generated based on the defect area, and the pulse width and gap voltage of the electrical discharge machining are set. After the local reprocessing subtask is completed, images are acquired again, and a new quality index vector is generated based on the reacquired images. The newly generated quality index vector is then input into the process condition liquid time constant neural network for classification.
Citation Information
Patent Citations
Sectional type oil temperature control method and system for numerical control machining
CN118519474A
Gantry control milling machine machining error compensation method and system based on visual inspection
CN120516487A