Gap self-compensation method and system based on PLC dynamic optimal gasket combination
By performing multi-node sampling and dynamic gap sensing model within the annular gap region, combined with preset rounding rules and PLC controller to optimize shim combination, the problem of imbalance between efficiency and accuracy in micro-gap compensation in traditional methods is solved, realizing efficient and automated compensation for high-speed rotating and high-precision transmission equipment.
Patent Information
- Application Number
- CN202610539568.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-22
- Publication Date
- 2026-07-24
AI Technical Summary
Existing technologies cannot achieve dynamic compensation of micro gaps under PLC control, making it difficult for traditional methods to meet the real-time compensation requirements of high-speed rotating and high-precision transmission equipment for micro gaps. Furthermore, manual selection of shims presents an imbalance between efficiency and accuracy.
By performing multi-node sampling within the annular gap area, a dynamic gap sensing model is constructed. Combined with preset rounding rules and a PLC controller, the gasket combination is optimized to achieve automated compensation for the optimal number and specifications of gaskets.
It achieves efficient, precise, and automated compensation for micro-gaps, improves the operational stability and intelligence level of the equipment, reduces the number of gaskets used, and improves compensation efficiency and economy.
Smart Images

Figure CN122449924A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial automation control technology, and in particular to a gap self-compensation method and system based on PLC dynamic optimal shim combination. Background Technology
[0002] In the field of precision mechanical assembly and micro-gap compensation, the clearance accuracy of the annular mating surface determines the operational stability and service life of the product. Especially in high-speed rotating and high-precision transmission equipment, accurate compensation of micro-gap is the core link to ensure the performance of the whole machine.
[0003] Currently, the industry commonly uses manual shim selection to compensate for gaps. This involves measuring the gap value and then, based on experience, operators select shims of different thicknesses (e.g., 0.100mm, 0.075mm, 0.050mm, 0.025mm) to combine and eliminate deviations between mating surfaces. However, this method often suffers from the following technical drawback: it is difficult to achieve optimal combination and self-compensation of the minimum number of shims based on dynamic gap distribution under PLC control. This deficiency leads to an imbalance between compensation efficiency and accuracy. For example, manual selection relies on experience and judgment, making it difficult to round the measured gap value to the standard gap value that matches the gasket specification. Furthermore, it cannot optimize the combination based on the gradient and uniformity characteristics of the gap distribution, resulting in either redundant gaskets and increased assembly costs, or insufficient gap compensation and decreased product operating accuracy. Moreover, it lacks dynamic adaptability. For instance, when faced with the real-time changing micro-gap distribution during assembly, traditional methods cannot respond quickly through PLC programming algorithms. It cannot achieve dynamic perception and preprocessing of gap data, nor can it solve for the optimal gasket combination scheme under constraints, making it difficult to meet the real-time self-compensation requirements of high-precision equipment for micro-gap.
[0004] The aforementioned problems are particularly prominent in scenarios where micro-gap control is critical, such as high-speed motor spindles and precision reducers, becoming a bottleneck restricting the intelligent upgrading of the aforementioned equipment. Summary of the Invention
[0005] This invention provides a gap self-compensation method and system based on PLC dynamic optimal gasket combination, which can achieve efficient, accurate and automated compensation of micro gaps, while meeting the optimization goal of minimizing the number of gaskets used.
[0006] To solve the above-mentioned technical problems, the technical solution of the present invention is as follows: Firstly, a gap self-compensation method based on PLC dynamic optimal shim combination, the method comprising: In the annular gap region between mating surfaces, multiple spatial sampling nodes are arranged along the circumferential and radial directions. A dynamic gap sensing model is generated by fitting the measured gap values at each spatial sampling node, and the dynamic gap sensing model is determined as the initial gap distribution morphology data. According to the preset rounding rules, the characteristic gap values in the initial gap distribution pattern data are preprocessed and corrected to a standard gap value that matches a certain specification in the preset gasket specification set. This standard gap value is used as the benchmark data for gasket combination optimization. Based on the initial gap distribution morphology data, a spatial cavity field configuration is constructed. The spatial cavity field configuration uses the radial distance as a variable to characterize the variation law of the gap on the axial section. Then, the cavity gradient and equipotential surface distortion coefficient of the spatial cavity field configuration are extracted, and the cavity gradient and equipotential surface distortion coefficient are merged to form a compensation feature vector. Based on the aforementioned baseline data and compensation feature vector, the PLC controller executes a dynamic optimal strategy solution, that is, with the goal of using the minimum number of shims, the optimal shim combination scheme that matches the standard gap value and compensation feature vector is solved in the space of shim combination schemes composed of different thickness specifications, and is determined as the compensation strategy to be executed. The self-compensation action is executed according to the compensation strategy to be executed, and a control command is generated to drive the actuator to put the corresponding number and specifications of gaskets into the micro gap to complete the gap compensation.
[0007] Furthermore, within the annular gap region between the mating surfaces, multiple spatial sampling nodes are arranged circumferentially and radially. A dynamic gap sensing model is generated by fitting the measured gap values at each spatial sampling node. This dynamic gap sensing model is then used as the initial gap distribution morphology data, including: Within the annular gap region, multiple circumferential sampling lines are divided at equal angular intervals. On each circumferential sampling line, multiple radial sampling points are divided at equal distance intervals. All radial sampling points are collectively determined as spatial sampling nodes. Collect the measured gap values at each spatial sampling node, and organize the measured gap values into a node gap matrix according to the circumferential and radial positions of each spatial sampling node; Based on the node gap matrix, a dynamic gap sensing model with a continuous distribution is constructed using the surface fitting method. The dynamic gap sensing model is used to characterize the gap distribution state at any spatial location within the annular gap region. The dynamic gap sensing model is used as the initial gap distribution morphology data.
[0008] Furthermore, according to preset rounding rules, the characteristic gap values in the initial gap distribution pattern data are preprocessed to correct them into standard gap values that match a certain specification in the preset gasket specification set. This standard gap value is used as the benchmark data for gasket combination optimization, including: Feature gap values representing the overall gap level within the annular gap region are extracted from the initial gap distribution morphology data, and these feature gap values are used as the original gap data to be corrected. According to the preset rounding rules, the original gap data is merged to correct the original gap data to an intermediate correction value that matches a certain specification in the preset gasket specification set. The intermediate correction value is determined as the standard gap value, wherein the standard gap value is used to uniquely characterize the gasket specification benchmark corresponding to the gap to be compensated; The standard gap value is used as the benchmark data for optimizing the gasket combination.
[0009] Furthermore, based on the initial gap distribution morphology data, a spatial cavity field configuration is constructed. This configuration uses radial distance as a variable to characterize the gap variation on the axial profile. The cavity gradient and equipotential surface distortion coefficients of the spatial cavity field configuration are then extracted. These coefficients are combined to form a compensation feature vector, including: Using the central axis of the annular gap region as a reference, a cylindrical coordinate system is established, and the initial gap distribution morphology data is mapped to the established cylindrical coordinate system to form the initial gap field. Based on the initial gap field, a spatial cavity field configuration is constructed; wherein, the spatial cavity field configuration is used to characterize the continuous distribution pattern of the gap at different radial distances on the axial section; The first-order partial derivative of the spatial cavity field configuration along the radial direction is obtained to extract the cavity gradient, which reflects the degree of drastic change in the gap. At the same time, based on the geometric shape of the isopotential surface in the spatial cavity field configuration, the equipotential surface distortion coefficient, which reflects the uniformity of the gap distribution, is extracted. The cavity gradient and the equipotential surface distortion coefficient are vectorized and merged to form a compensation feature vector, which is then used as the input for the dynamic optimal strategy solution step.
[0010] Furthermore, based on the aforementioned baseline data and compensation feature vector, a dynamic optimal strategy is solved by the PLC controller. That is, with the goal of using the minimum number of shims, the optimal shim combination scheme that matches the standard gap value and compensation feature vector is solved within a space of shim combination schemes composed of different thicknesses. This optimal shim combination scheme is then determined as the compensation strategy to be executed, including: The PLC controller acquires the reference data and compensation feature vector, and constructs a dual constraint condition that includes total clearance constraint and distribution deviation constraint based on the acquired reference data and compensation feature vector. Based on the aforementioned dual constraints, a solution search space is constructed consisting of combinations of gaskets with different thicknesses and specifications, wherein each combination solution in the solution search space corresponds to a gasket usage quantity. Optimal solution search is performed in the solution search space, with the goal of minimizing the number of gaskets used, and candidate combination solutions that simultaneously satisfy the total gap constraint and the distribution deviation constraint are selected. The option that uses the fewest gaskets among the candidate combinations is determined as the optimal gasket combination, and this optimal gasket combination is used as the compensation strategy to be executed.
[0011] Furthermore, based on the compensation strategy to be executed, a self-compensation action is performed to generate control commands to drive the actuator to insert the corresponding number and specifications of gaskets into the micro-gap, thereby completing the gap compensation, including: The required gasket specifications and quantity information are extracted from the compensation strategy to be executed, forming gasket combination information; Based on the gasket combination information, a selection instruction sequence corresponding to each specification of gasket is formed. The selection instruction sequence is used to select gaskets of corresponding specifications and quantities in sequence. According to the selected instruction sequence, the drive execution end sequentially puts the gaskets of each specification into the micro gap, and updates the cumulative information of the put-in gaskets after each gasket is put in. When the cumulative information of the installed gaskets completely matches the gasket combination information, the self-compensation action is confirmed to be completed, and the gap compensation is finished.
[0012] Secondly, a gap self-compensation system based on PLC dynamic optimal shim combination includes: The gap sensing module is used to deploy multiple spatial sampling nodes along the circumferential and radial directions in the annular gap area between mating surfaces. A dynamic gap sensing model is generated by fitting the measured gap values at each spatial sampling node, and the dynamic gap sensing model is determined as the initial gap distribution morphology data. The data preprocessing module is used to preprocess the characteristic gap values in the initial gap distribution pattern data according to the preset rounding rules, and to correct them to a standard gap value that matches a certain specification in the preset gasket specification set. This standard gap value is used as the benchmark data for gasket combination optimization. The cavity field feature extraction module is used to construct a spatial cavity field configuration based on the initial gap distribution morphology data. The spatial cavity field configuration uses the radial distance as a variable to characterize the variation law of the gap on the axial section. Then, the cavity gradient and equipotential surface distortion coefficient of the spatial cavity field configuration are extracted, and the cavity gradient and equipotential surface distortion coefficient are merged to form a compensation feature vector. The PLC optimal solution module is used to solve the dynamic optimal strategy based on the reference data and compensation feature vector through the PLC controller. That is, with the goal of using the minimum number of shims, it solves the optimal shim combination scheme that matches the standard gap value and compensation feature vector in the space of shim combination schemes composed of different thickness specifications, and determines it as the compensation strategy to be executed. The execution control module is used to perform self-compensation actions according to the compensation strategy to be executed, and generate control commands to drive the execution end to put the corresponding number and specifications of shims into the micro gap to complete the gap compensation.
[0013] Thirdly, a computing device includes: One or more processors; A storage device for storing one or more programs that, when executed by one or more processors, cause the one or more processors to implement the method.
[0014] Fourthly, a computer-readable storage medium storing a program that, when executed by a processor, implements the method.
[0015] The above-described solution of the present invention has at least the following beneficial effects: Because it employs a dynamic gap perception modeling method that combines multi-node sampling and surface fitting in the annular gap region, it overcomes the problem of traditional methods failing to accurately acquire real-time gap distribution patterns. This enables comprehensive and dynamic perception of the micro-gap distribution state, providing a reliable data foundation for compensation decisions. Furthermore, by using preprocessing based on preset rounding rules and spatial cavity field feature extraction methods using a set of gasket specifications, it overcomes the problems of manual selection failing to accurately correct gap values and making it difficult to utilize gap distribution features. This achieves precise matching between the gap to be compensated and the gasket specifications, while quantifying the severity and uniformity of gap changes, thus providing a basis for finding the optimal combination. It provides feature support; because it adopts a PLC-driven, dual-constraint optimal combination solution method with the goal of minimizing the number of gaskets, it overcomes the defects of imbalance between compensation efficiency and accuracy and lack of dynamic adaptation capability. Thus, under the premise of satisfying the constraints of total gap and distribution deviation, it selects the optimal solution with the minimum number of gaskets, improving compensation efficiency and economy. Because it adopts an automated gasket placement execution method based on compensation strategy, it overcomes the problems of cumbersome manual selection and poor consistency, thus realizing full-process automation and closed-loop control of micro-gap compensation, ensuring the operational stability and intelligence level of high-precision equipment. Attached Figure Description
[0016] Figure 1 This is a flowchart illustrating the gap self-compensation method based on PLC dynamic optimal shim combination provided in an embodiment of the present invention.
[0017] Figure 2 This is a schematic diagram of a gap self-compensation system based on PLC dynamic optimal shim combination provided in an embodiment of the present invention. Detailed Implementation
[0018] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
[0019] like Figure 1 As shown, embodiments of the present invention propose a gap self-compensation method based on PLC dynamic optimal shim combination, the method comprising the following steps: Step 1: In the annular gap area between mating surfaces, multiple spatial sampling nodes are arranged along the circumferential and radial directions. A dynamic gap sensing model is generated by fitting the measured gap values at each spatial sampling node. The dynamic gap sensing model is then used as the initial gap distribution morphology data. Step 2: According to the preset rounding rules, the characteristic gap values in the initial gap distribution pattern data are preprocessed to correct them into a standard gap value that matches a certain specification in the preset gasket specification set. This standard gap value is used as the benchmark data for gasket combination optimization. Step 3: Based on the initial gap distribution morphology data, construct the spatial cavity field configuration. The spatial cavity field configuration uses the radial distance as a variable to characterize the variation law of the gap on the axial section. Then, extract the cavity gradient and equipotential surface distortion coefficient of the spatial cavity field configuration, and merge the cavity gradient and equipotential surface distortion coefficient to form a compensation feature vector. Step 4: Based on the reference data and compensation feature vector, the PLC controller executes a dynamic optimal strategy solution, that is, with the goal of using the minimum number of shims, the optimal shim combination scheme that matches the standard gap value and compensation feature vector is solved in the space of shim combination schemes composed of different thickness specifications, and then determined as the compensation strategy to be executed. Step 5: Execute the self-compensation action according to the compensation strategy to be executed, and generate control commands to drive the execution end to put the corresponding number and specifications of gaskets into the micro gap to complete the gap compensation.
[0020] In this embodiment of the invention, by performing multi-node spatial sampling and dynamic gap perception modeling on the annular gap region, the initial gap distribution morphology data can be accurately obtained. By preprocessing the gap data according to preset rounding rules, a standard gap value matching the gasket specifications can be obtained, providing a unified benchmark for gasket combination optimization. By extracting the cavity gradient and equipotential surface distortion coefficient using the spatial cavity field configuration and forming a compensation feature vector, the distribution characteristics of the gap can be effectively reflected. By solving the optimal gasket combination scheme with the minimum number of gaskets as the objective of the PLC controller, the amount of gaskets used can be reduced while ensuring compensation accuracy. Finally, the gasket placement is automatically driven by the execution end according to the optimal compensation strategy, realizing accurate, efficient, and automated self-compensation of micro-gap, effectively improving the stability and consistency of precision assembly.
[0021] In a preferred embodiment of the present invention, step 1 above may include: Step 1.1: Divide the annular gap area into multiple circumferential sampling lines at equal angular intervals. Divide each circumferential sampling line into multiple radial sampling points at equal intervals. Determine all radial sampling points as spatial sampling nodes. Specifically, this includes: Based on the geometric dimensions and accuracy requirements of the annular gap area, preset an equal angular interval value. The equal angular interval value is usually a fixed value between 1 degree and 5 degrees, and the specific value is determined based on the diameter of the annular mating surface and the requirements for gap compensation accuracy. Using the central axis of the annular gap area as a reference, starting from the zero-degree starting position, the angular interval value is incremented sequentially to determine the angular position of each circumferential sampling line within the entire circumference. Each time an angular position is determined, a circumferential sampling line extending radially from the inner diameter to the outer diameter is generated. This process is repeated until the entire 360-degree circumference is covered, thereby uniformly dividing the entire circumference into multiple circumferential sampling lines. Each circumferential sampling line corresponds to a unique angular position, and the included angle between each adjacent circumferential sampling line is equal to the preset equal angular interval value.
[0022] For each defined circumferential sampling line, an equidistant interval is preset based on the radial width and sampling density requirements of the annular gap region. This equidistant interval is typically a fixed value between 0.5 mm and 2 mm, with the specific value determined according to the degree of variation in the radial gap. Starting from the inner diameter boundary of the annular gap region along the circumferential sampling line, the equidistant interval is incremented sequentially towards the outer diameter to determine the radial position of each radial sampling point. Each determined radial position generates a radial sampling point, and this process is repeated until the entire radial length of the circumferential sampling line is covered, thus uniformly dividing each circumferential sampling line into multiple... Radial sampling points are used, and the radial distance between each adjacent radial sampling point is equal to the preset equidistant interval value. The position of each radial sampling point on each circumferential sampling line, that is, the circumferential angle and radial distance corresponding to the sampling point, are jointly determined as the coordinates of the spatial sampling node. In this way, multiple circumferential sampling lines are evenly distributed in the circumferential dimension at equal angular intervals, and multiple radial sampling points are evenly distributed on each circumferential sampling line in the radial dimension at equal intervals. Thus, a gridded sampling node array covering the entire annular gap region is constructed in both the circumferential and radial dimensions, realizing full-coverage spatial discretization and high-resolution sampling of the annular gap region.
[0023] Step 1.2: Collect the measured gap values at each spatial sampling node. Based on the circumferential and radial positions of each spatial sampling node, organize the measured gap values into a node gap matrix. Specifically, this includes: based on the determined spatial distribution of all spatial sampling nodes, pre-determine a scanning path covering all spatial sampling nodes. The scanning path takes the angular order of the circumferential sampling lines as the main line and the radial order of the radial sampling points on each circumferential sampling line as the secondary line. Starting from the first circumferential sampling line at the zero-degree starting position, the radial sampling points starting from the inner diameter boundary on this circumferential sampling line are scanned point by point in the outer diameter direction. After collecting all radial sampling points on this circumferential sampling line, the path moves to the next circumferential sampling line in the order of increasing circumferential angle. The above radial scanning process is repeated until all radial sampling points on all circumferential sampling lines are traversed, thus forming an ordered scanning path that traverses all spatial sampling nodes.
[0024] During the scanning process, the displacement sensor moves sequentially to each spatial sampling node according to a preset scanning path, and stays at each spatial sampling node for a preset stabilization time. After the displacement sensor reading stabilizes, the measured gap value at that node is collected, and the collected measured gap value is associated with the circumferential index value and radial index value corresponding to that spatial sampling node. The specific method for establishing the mapping relationship table is as follows: a two-dimensional mapping structure is constructed with the circumferential index value as the main dimension of the table and the radial index value as the secondary dimension of the table. Each table entry consists of a key-value pair, where the key is a combination identifier composed of the circumferential index value and the radial index value of the spatial sampling node, and the value is the measured gap value collected at that node. After all spatial sampling nodes have been collected and associated, a complete mapping relationship table is formed, in which the position information of each spatial sampling node in the mapping relationship table uniquely corresponds to a measured gap value.
[0025] The specific method for organizing this mapping table into a node gap matrix is as follows: the circumferential index value in the mapping table is used as the row number of the matrix, and the radial index value is used as the column number of the matrix. The measured gap value in each table entry is filled into the corresponding row and column positions in the matrix, thus forming a two-dimensional numerical matrix with the number of rows equal to the total number of circumferential sampling lines and the number of columns equal to the total number of radial sampling points on each circumferential sampling line. This two-dimensional numerical matrix is the node gap matrix. Through this node gap matrix, the mapping of the circumferential and radial positions of spatial sampling nodes to the matrix row and column indices, as well as the mapping of measured gap values to matrix element values, are realized, thereby forming a structured correspondence between spatial positions and gap values, ensuring that the position information and gap data of each sampling node can be uniquely indexed and traced.
[0026] Step 1.3: Based on the node gap matrix, a dynamic gap sensing model with a continuous distribution is constructed using a surface fitting method. This dynamic gap sensing model characterizes the gap distribution at any spatial location within the annular gap region. Specifically, it includes: using the node gap matrix as the training sample set, constructing a dynamic gap sensing model based on a radial basis function network; the input layer of the dynamic gap sensing model is set to two neurons, corresponding to the circumferential angular coordinate θ and radial distance coordinate of the spatial sampling node, respectively. The output layer consists of a single neuron, corresponding to a node gap value d. The hidden layer comprises K radial basis function neurons, each using a Gaussian function as its basis function. K-means clustering is used to sample the coordinate vectors of all N spatially sampled nodes. Perform unsupervised clustering and select the K cluster centers obtained from the clustering. The center vector of each radial basis function neuron is determined, and the width parameter of each radial basis function neuron is determined using the nearest neighbor method. The formula for calculating the width parameter is as follows: in This represents the Euclidean distance between the j-th cluster center and the m-th cluster center; after setting the center vector and width parameters, the coordinate vectors of each spatial sampling node are... The input hidden layer maps the input space to a high-dimensional feature space using radial basis functions, which are defined as follows: ; In the formula Let represent the activation value of the i-th sampling node on the j-th radial basis function neuron; e is the natural constant, serving as the base of the exponential function; the activation values of all N sampling nodes on all K radial basis function neurons are organized into the hidden layer output matrix. This matrix is an N x K matrix, and its elements are... In a high-dimensional feature space, the hidden layer output matrix is used. As a design matrix, with node gap matrix As the target vector, the output layer weight matrix is solved using the least squares method. The solution formula is: Where λ is the regularization parameter, I is the K-row K-column identity matrix, and the superscript T indicates the transpose of the matrix. This regularization term is introduced to suppress overfitting and improve the generalization ability of the model.
[0027] After completing offline training of the network parameters, the center vector set of the dynamic gap sensing model is... Width parameter set and the output layer weight matrix Deployed in the runtime environment of the PLC controller to support real-time inference; during real-time compensation, the circumferential angle coordinate θ and radial distance coordinate r at any spatial location within the annular gap region are input into the dynamic gap sensing model. The model calculates high-dimensional feature mappings through the hidden layer radial basis functions. For the j-th radial basis function neuron, its activation value... The calculation formula is: ; The inference gap value at this spatial location is then obtained through linear weighted calculation at the output layer. The weighted calculation formula is: To perform interpolation calculations for the gap values at unsampled locations, The output layer weights of the j-th radial basis function neuron are obtained by the least squares method, representing the contribution of this neuron to the final output result. This transforms discrete sampling data into a continuous gap field description. This dynamic gap sensing model based on the radial basis function network, with its local approximation characteristics, can achieve high-precision fitting in the region near the sampling node and maintain a smooth transition in the region far from the sampling node, effectively suppressing the interference of sampling noise on the gap field construction. At the same time, it has nonlinear mapping capabilities and can adapt to the dynamic changes in the gap distribution pattern under different working conditions, providing a high-precision and robust gap distribution information basis for gap compensation decision-making. It should be noted that K in step 1.3 refers to the number of hidden layer neurons in the radial basis function network, that is, the total number of cluster centers, and there is no ambiguity.
[0028] Step 1.4: Use the dynamic gap sensing model as the initial gap distribution pattern data. Specifically, this includes: opening a dedicated data storage area in the central processing unit module of the PLC controller to store the center vector set, width parameter set, and output layer weight matrix of the dynamic gap sensing model. The above parameters are stored in non-volatile memory in the form of floating-point arrays to ensure that the data is not lost after the device is powered off. The PLC controller includes at least a central processing unit (CPU) module, a memory module, digital and analog input / output modules, and a communication module. The CPU module executes user programs and performs arithmetic operations. The memory module stores system programs, user programs, and process data. The input / output modules connect displacement sensors and actuators. The communication module exchanges data with a host computer or other controllers. The CPU module is connected to the memory module, input / output modules, and communication module via a defined bus. During operation, it sequentially completes tasks such as data acquisition, program execution, and output refresh according to a scan cycle, thereby achieving centralized control and real-time processing of gap sensing, data preprocessing, optimal solution, and self-compensation actions.
[0029] In the PLC controller's runtime environment, the above parameters are encapsulated into a function block that can be called by the main loop program. This function block is implemented in the form of structured text or a ladder diagram, and internally integrates the forward computation logic of the radial basis function network. This function block provides two input parameter interfaces to receive the circumferential angle coordinates and radial distance coordinates of the spatial location to be queried, and one output parameter interface to return the inference gap value at that location. When the main loop program executes to the gap sensing stage, it calls this function block and passes in the target position coordinates. The function block automatically performs the calculation of the hidden layer radial basis function activation values and the linear weighted calculation of the output layer. The calculation results are returned as inference gap values. By defining this function block as initial gap distribution morphology data, subsequent preprocessing steps can directly call the function block interface to achieve real-time querying and acquisition of gap values at any position within the annular gap area, without repeating the model training process or reloading model parameters. The initial gap distribution morphology data is passed to subsequent preprocessing steps in the form of function block calls, serving as the sole data input for subsequent gap compensation decisions. This ensures that the gap distribution information remains consistent and complete throughout the entire data link from gap perception to compensation decision-making, providing a high-precision, continuously verifiable gap distribution information foundation for gap compensation.
[0030] In a preferred embodiment of the present invention, step 2 above may include: Step 2.1: Extract characteristic gap values representing the overall gap level within the annular gap region from the initial gap distribution morphology data. Use these characteristic gap values as the original gap data to be corrected. Specifically, this includes: determining a sampling strategy for selecting representative spatial locations within the annular gap region. This sampling strategy is based on the spatial sampling node array established in Step 1.1. A preset number of nodes are selected as representative spatial locations from all spatial sampling nodes using an equally spaced sampling method, ensuring that the selected nodes are uniformly distributed in both the circumferential and radial dimensions. By calling the function block interface encapsulated in Step 1.4, the circumferential angle coordinates and radial distance coordinates of each representative spatial location are sequentially input into the function block to obtain the inference gap values at each location returned by the function block. Store all obtained inference gap values in a temporary array allocated in the PLC controller memory. This temporary array is used in the central processing unit. A contiguous storage space dynamically allocated in the random access memory of the processor module is used to temporarily store multiple inference gap values obtained from the same batch of queries. After all selected positions have been queried, the central processing unit module iterates through each element in the temporary array and performs an arithmetic mean calculation on all inference gap values. The calculated average value is used as the characteristic gap value, which reflects the average gap state of the entire annular gap region on a macroscopic scale. The characteristic gap value is determined as the original gap data to be corrected and stored in the data register of the PLC controller in floating-point form. The data register is a fixed storage unit in the memory module specifically used to store process data. It has a power-off retention function to ensure that the original gap data is not lost after the device restarts, thus serving as the direct operation object for subsequent rounding processing. The characteristic gap value is used to characterize the overall gap level within the annular gap region.
[0031] Step 2.2: According to a preset rounding rule, the original gap data is merged to correct the original gap data to an intermediate correction value that matches a certain specification in a preset gasket specification set. Specifically, this includes: reading a preset gasket specification set from the PLC controller's memory. The set contains four gasket specifications arranged in ascending order of thickness: 0.025mm, 0.050mm, 0.075mm, and 0.100mm, where 0.025mm is the minimum specification thickness and 0.100mm is the maximum specification thickness; constructing multiple continuous merging intervals using half the sum of the thickness values of two adjacent gasket specifications as the dividing point, specifically: using 0.025mm and 0.050mm as the dividing points... The first dividing point is 0.0375mm, which is half the sum of mm. Ranges less than or equal to 0.0375mm are grouped into the 0.025mm specification. The second dividing point is 0.0625mm, which is half the sum of 0.050mm and 0.075mm. Ranges greater than 0.0375mm and less than or equal to 0.0625mm are grouped into the 0.050mm specification. The third dividing point is 0.0875mm, which is half the sum of 0.075mm and 0.100mm. Ranges greater than 0.0625mm and less than or equal to 0.0875mm are grouped into the 0.075mm specification, and ranges greater than 0.0875mm are grouped into the 0.100mm specification.
[0032] The original gap data stored in step 2.1 is compared sequentially with the boundary values of each merge interval to determine the merge interval to which the original gap data belongs. According to the preset rounding rules, when the original gap data falls into a certain merge interval, the corresponding gasket thickness value is taken as the merge result, and this merge result is determined as the intermediate correction value. For example, if the original gap data is 0.043mm, and this value is greater than 0.0375mm and less than or equal to 0.0625mm, it is merged to the 0.050mm specification, and the intermediate correction value is 0.050mm; if the original gap data is 0.081mm, and this value is greater than 0.0625mm and less than or equal to 0.0875mm, it is merged to the 0.075mm specification. The intermediate correction value is set to 0.075mm. Simultaneously, for cases where the original gap data equals the thickness of a certain gasket specification, that specification thickness is directly used as the intermediate correction value without further interval merging. For example, if the original gap data is 0.050mm, the intermediate correction value is directly set to 0.050mm. For cases where the original gap data is less than the minimum specification thickness of 0.025mm, 0.025mm is used as the intermediate correction value. For cases where the original gap data is greater than the maximum specification thickness of 0.100mm, 0.100mm is used as the intermediate correction value. Through the above merging process, the original gap data is accurately mapped to the standard gasket specification for the first time, and the intermediate correction value is stored in the designated data register of the PLC controller.
[0033] Step 2.3: Determine the intermediate correction value as the standard gap value. The standard gap value uniquely represents the shim specification reference corresponding to the gap to be compensated. Specifically, this includes: reading the intermediate correction value from a designated data register in the PLC controller (located in the random access memory of the central processing unit module, used to temporarily store intermediate calculation results generated during the current scan cycle); using this intermediate correction value as the unique shim specification reference corresponding to the gap to be compensated, transferring it to a holding register specifically for storing the standard gap value via a data move instruction. This data move instruction is a block transfer instruction built into the PLC controller, which copies data from the source address to the target address. The source address is the designated data register storing the intermediate correction value, and the target address is a pre-allocated holding register area. The holding register specifically for storing the standard gap value is a special register in the memory module with power-off retention functionality. Its internal data is retained after power failure through supercapacitors or non-volatile storage technology. This holding register is functionally fundamentally different from the data register storing the original gap data in Step 2.1.
[0034] In step 2.1, the data register is a general process data register used to temporarily store the original gap data generated in the current cycle. This data is not retained after the equipment restarts. The retention register in this step is used to store the baseline data determined after rounding and merging. This data needs to remain valid after the equipment is powered off and restarted to ensure the continuity and consistency of subsequent compensation strategies. The standard gap value directly points to a specific thickness in the gasket specification set, so that the subsequent gasket combination optimization process can use this specification as the reference point for total constraint, avoiding compensation deviations caused by mismatch between gap data and gasket specifications. At the same time, a flag bit is set in the status area of the PLC controller to indicate that the standard gap value has been determined and is valid for subsequent steps to query. This flag bit is automatically set by the central processing unit module after the standard gap value is successfully written into the retention register and remains valid at the beginning of the next scan cycle.
[0035] Step 2.4 uses the standard gap value as the benchmark data for shim combination optimization. Specifically, this includes: in the PLC controller's programming environment, defining a global variable symbol for the standard gap value stored in the retention register in Step 2.3. This variable symbol is a unique identifier in the user program, for example, named STANDARD_GAP. This symbol establishes a one-to-one correspondence with the physical address of the retention register through a symbol table. After defining the variable symbol in the symbol table, all function blocks and subroutines in the user program can directly access the standard gap value through this symbol without needing to remember the specific register address, thereby improving program readability and maintainability. During the program compilation stage, the PLC controller automatically resolves the variable symbol in the symbol table to the corresponding... The physical address of the variable symbol is stored in the executable code. Before the execution of the program segment corresponding to the dynamic optimal strategy solution step, the current standard gap value is obtained from the retention register by reading the physical address pointed to by the variable symbol. The obtained current standard gap value is used as the core basis for constructing the total gap constraint and participates in the subsequent solution process of the optimal combination. At the same time, at the data flow level, the standard gap value and the compensation feature vector generated in step 3 adopt the same transmission mechanism. That is, both are stored in the data memory in the form of global variable symbols. In the same scan cycle, the program segment corresponding to the dynamic optimal strategy solution step reads these two variable symbols in sequence to obtain the complete set of input parameters, thereby completing the complete data transmission link from gap perception, data preprocessing to optimal solution.
[0036] In a preferred embodiment of the present invention, step 3 above may include: Step 3.1: Using the central axis of the annular gap region as a reference, establish a cylindrical coordinate system. Simultaneously, map the initial gap distribution morphology data into the established cylindrical coordinate system to form the initial gap field. Specifically, this includes: determining the geometric central axis of the annular gap region as the vertical axis of the cylindrical coordinate system, i.e., the z-axis, which coincides with the rotation axis of the annular mating surface; selecting the direction from the axis to the inner inner boundary of the annular gap region as the positive direction of the radial distance coordinate r in a plane perpendicular to the z-axis; and taking the direction of counterclockwise rotation around the z-axis as the positive direction of the circumferential angle coordinate θ, with the angle ranging from 0 to 360 degrees. This constructs a gap field composed of the radial distance coordinate r and the circumferential angle coordinate θ. A three-dimensional cylindrical coordinate system is formed by the axial coordinate z. The gap distribution data described by the dynamic gap sensing model generated in step 1 is mapped according to the coordinate values of each spatial position in the cylindrical coordinate system. Specifically, for any spatial position within the annular gap region, its radial distance coordinate r represents the vertical distance between the point and the central axis, its circumferential angle coordinate θ represents the deflection angle of the point relative to the zero-degree baseline, and its axial coordinate z represents the position of the point in the axial direction. The gap value at each point in the gap distribution data is established in correspondence with the radial distance coordinate r and the circumferential angle coordinate θ of the point in the cylindrical coordinate system to form the initial gap field function. This function describes the distribution of gap values within the entire annular gap region as they continuously change with radial and circumferential positions, providing a unified mathematical description for feature extraction.
[0037] Step 3.2: Based on the initial gap field, construct the spatial cavity field configuration; wherein, the spatial cavity field configuration is used to characterize the continuous distribution of the gap at different radial distances on the axial cross-section, specifically including: Projection is performed along the axial direction. At each fixed radial distance coordinate r, the gap value corresponding to the continuous variation of the circumferential angle coordinate θ within the range of 0 to 360 degrees is extracted, forming a closed circumferential distribution curve. This closed circumferential distribution curve describes the continuous variation of the gap along the circumference at a specific radial position. The vertical coordinate of each point on the curve represents the gap value at that circumferential angle, and the horizontal coordinate represents the circumferential angle. The circumferential distribution curves corresponding to different radial distance coordinates r are arranged in ascending order of radial distance coordinate r. These curves are stacked in three-dimensional space to form a continuous three-dimensional surface. This three-dimensional surface is the spatial cavity field configuration. Where r is the radial distance coordinate and θ is the circumferential angle coordinate. It represents the gap value at radial distance r and circumferential angle θ; this configuration is used to characterize the continuous distribution of gaps at different radial distances in the annular gap region on the axial profile, transforming discrete gap data into a continuous field description that can be mathematically calculated.
[0038] Step 3.3 involves calculating the first-order partial derivative of the spatial cavity field configuration along the radial direction to extract the cavity gradient, which reflects the degree of drastic change in the gap. Simultaneously, based on the geometric shape of the isopotential surfaces within the spatial cavity field configuration, the equipotential surface distortion coefficients, reflecting the uniformity of the gap distribution, are extracted. Specifically, this includes: calculating the spatial cavity field configuration... Perform first-order partial derivative operations in the radial direction, i.e., calculate the spatial cavity field configuration. The instantaneous rate of change of the radial distance coordinate r is approximated at discrete radial sampling points using the finite difference method. For each radial distance coordinate r and circumferential angle coordinate θ, the difference in gap values at adjacent radial positions is calculated and divided by the radial step size to obtain the cavity gradient at that point. ;in This represents the cavity gradient value at the radial distance coordinate r and the circumferential angle coordinate θ. The magnitude of this cavity gradient value reflects the rate of change of the gap in the radial direction. A larger value indicates that the gap changes drastically with radial distance, while a smaller value indicates that the gap changes gradually with radial distance. Then, the spatial cavity field configuration is... Perform first-order partial derivative operations in the circumferential direction, i.e. calculate the spatial cavity field configuration. The instantaneous rate of change of the circumferential angular coordinate θ is approximated at discrete circumferential sampling points using the finite difference method. For each radial distance coordinate r and circumferential angular coordinate θ, the difference between the gap values at adjacent circumferential positions is calculated and divided by the circumferential step size to obtain the circumferential rate of change at that point. ;in This represents the circumferential rate of change at the radial distance coordinate r and the circumferential angle coordinate θ. This value reflects the rate of change of the gap in the circumferential direction.
[0039] Based on this, for each fixed radial distance, the circumferential rate of change at that radial position is obtained. Calculate the arithmetic mean of all values within the entire circumferential range of 0 to 360 degrees. Its calculation formula is In the formula This represents the average level of the circumferential rate of change at a radial distance r along the circumferential direction; then the circumferential rate of change is calculated. Relative to its mean The degree of dispersion is calculated as follows: First, the squared deviation of the circumferential rate of change at each circumferential angle from the mean is calculated. Then, these squared deviations are integrated along the circumferential direction and divided by 360 to obtain the variance. Finally, the square root of the variance is taken to obtain the standard deviation, and the standard deviation is divided by the mean. Obtain the equipotential surface distortion coefficient The calculation formula is as follows: in This represents the equipotential surface distortion coefficient at a radial distance r. This coefficient reflects the uniformity of the gap distribution in the circumferential direction. A value close to 0 indicates that the gap is evenly distributed in the circumferential direction. A larger value indicates significant non-uniformity in the circumferential distribution of the gap; through the above calculations, the cavity gradient function reflecting the degree of radial variation in the gap is extracted. and the equipotential surface distortion coefficient function reflecting the uniformity of the circumferential distribution of the gap .
[0040] Step 3.4 involves vectorizing and merging the cavity gradient and equipotential surface distortion coefficients to form a compensation feature vector. This compensation feature vector is then used as input to the dynamic optimal strategy solution step. Specifically, this includes vectorizing and merging the cavity gradient and equipotential surface distortion coefficients to form a compensation feature vector. The specific implementation process is as follows: the cavity gradient calculated in step 3.3 is... Integral averaging is performed in the circumferential direction, that is, for each radial position r, the cavity gradient is... Integrating within the circumferential range of 0 to 360 degrees and then dividing by 360 yields the circumferential average value of the cavity gradient at that radial position. This average value reflects the overall level of the radial rate of change of the gap at a specific radial distance. Then, integrating this circumferential average value radially, from the inner diameter boundary of the annular gap region... Integrate to outer diameter boundary This yields a scalar value characterizing the overall radial variation. ;in and Representing the inner and outer diameter boundaries of the annular gap region, respectively, this integral formula first calculates the cavity gradient at each radial position r. The average value in the circumferential direction is then summed in the radial direction to obtain a comprehensive index characterizing the degree of radial variation in the gap throughout the entire annular gap region. The larger the value, the more drastic the overall change in the gap in the radial direction.
[0041] The calculated equipotential surface distortion coefficient Integrate in the radial direction, from the inner diameter boundary. Integrate to outer diameter boundary This yields a scalar value characterizing the overall circumferential distribution uniformity. Its calculation formula is This integral formula accumulates the distortion coefficients at each radial position to obtain a comprehensive index characterizing the uniformity of the circumferential distribution of the gap within the entire annular gap region. The larger the value, the more uneven the overall distribution of the gap in the circumferential direction; the two scalar values are combined into a two-dimensional vector according to a preset order. The superscript T denotes the transpose of the vector, which is the compensation feature vector. As the first component of the vector, it reflects the overall drastic degree of radial variation in the gap. As the second component of the vector, it reflects the overall uniformity of the circumferential distribution of the gap. This compensation feature vector is stored in the data register of the PLC controller as an input parameter for the dynamic optimal strategy solution step, providing a quantitative basis for the gap distribution characteristics for subsequent shim combination optimization, so that the optimal strategy can take into account the gap distribution characteristics while considering the total gap requirement, and achieve a more accurate compensation effect.
[0042] In a preferred embodiment of the present invention, step 4 above may include: Step 4.1: The PLC controller acquires the reference data and compensation feature vector, and constructs a dual constraint condition including total gap constraint and distribution deviation constraint based on the acquired reference data and compensation feature vector. Specifically, the PLC controller's central processing unit module reads the standard gap value stored in step 2 from the retention register through a data read instruction. This standard gap value is stored in floating-point form and represents the target thickness that the gap to be compensated needs to accurately achieve in terms of total amount. At the same time, it reads the compensation feature vector stored in step 3 from the data register. The vector consists of two floating-point components, where the first component... The second component characterizes the overall drastic change in the gap in the radial direction. The system characterizes the overall uniformity of the gap distribution in the circumferential direction. The standard gap value is compared with a preset allowable deviation range. The lower limit of the preset allowable deviation range is the minimum thickness of the preset gasket specification set (0.025mm), and the upper limit is the maximum thickness of the preset gasket specification set (0.100mm) multiplied by the preset maximum allowable number of gaskets. This ensures that the standard gap value is within the physically achievable range of the gasket combination scheme. When the standard gap value is within this allowable deviation range, the total gap is constrained to the target thickness being precisely equal to the standard gap value. If the standard gap value exceeds this range, an alarm is triggered, and the subsequent solution process is terminated.
[0043] For distribution deviation constraints, the central processing unit module will... The comparison is made with a preset radial variation threshold; where the preset radial variation threshold is an empirical value determined by statistical analysis of gap distribution data of similar equipment under standard assembly conditions, used to distinguish whether the radial variation of the gap is significant. When the gap exceeds this threshold, it is determined that the radial change in the gap is drastic. The distribution deviation constraint requires that the gasket combination must be able to achieve radial segmented compensation, that is, allow the use of gasket combinations of different thicknesses in different radial regions to adapt to rapid changes in the gap in the radial direction; It is compared with a preset circumferential uniformity threshold, which is also determined based on standard assembly data of similar equipment, and is used to distinguish whether the circumferential distribution of the gap is uniform. When the gap exceeds this threshold, it is determined that the circumferential distribution of the gap is uneven. The distribution deviation constraint requires that the gasket combination must be able to achieve circumferential partition compensation, that is, it is allowed to use gasket combinations of different thicknesses in different circumferential regions to eliminate the gap deviation in the circumferential direction. The above constraints are stored in the form of Boolean variables as the basis for judgment in subsequent scheme construction. The total constraint variable is marked as CONSTRAINT_TOTAL, and the radial compensation constraint variable and the circumferential compensation constraint variable are marked as CONSTRAINT_RADIAL and CONSTRAINT_CIRCUMFERENTIAL, respectively.
[0044] Step 4.2: Based on the aforementioned dual constraints, construct a solution search space consisting of combinations of gaskets with different thicknesses. Each combination in the solution search space corresponds to a specific number of gaskets used. Specifically, this includes: reading a preset set of gasket specifications, which contains four specifications arranged in ascending order of thickness. Each type of gasket has a continuous supply capacity in the automatic feeding device; through the central processing unit module, based on the total gap constraint, all gasket combination schemes that meet the total quantity condition are determined. The specific solution method is as follows: assuming the usage quantities of the four types of gaskets are respectively... All are non-negative integers and must satisfy the equation Where S is the standard gap value; enumeration is performed using nested loops. All possible values are considered, with the upper limit of the loop determined by dividing the standard gap value by the corresponding specification thickness and rounding up. For each integer combination that satisfies the above equation, it is recorded as a candidate scheme. Based on this, the central processing unit module performs preliminary screening of the above candidate schemes according to the radial variation judgment result and the circumferential uniformity judgment result in the distribution deviation constraint: when the radial variation is drastic, priority is given to retaining... and The scheme with the larger sum, i.e., the scheme containing more small-gauge gaskets, is selected to achieve radial segmented compensation; when the circumferential distribution is uneven, the scheme containing at least two or more gasket sizes is preferred to achieve circumferential zonal compensation; all the selected candidate schemes together constitute the scheme search space, in which each scheme corresponds to a specific total number of gaskets used. .
[0045] Step 4.3: Perform an optimal solution search in the solution search space, aiming to minimize the number of gaskets used. Select candidate combinations that simultaneously satisfy both the total gap constraint and the distribution deviation constraint. Specifically, this involves iterating through all candidate solutions in the constructed solution search space. Before starting the iteration, the minimum number of gaskets used is determined. Initialize the value to a number much larger than the actual number that may be used. This initial value is taken as the preset maximum allowable number of gaskets, and initialize the optimal solution variable BEST to empty. The central processing unit module sequentially reads the total number of gaskets used for each candidate solution. ,Will With the current record If a comparison is made, Less than If so, then record the solution as the current optimal solution and update... equal ;like equal Then, we further compare the gasket usage structures of the two schemes, and calculate the sum of the number of large-size gaskets used in each scheme, i.e. and The sum of the numbers of large-sized gaskets is prioritized, and the solution with the smaller sum of the number of large-sized gaskets is selected as the current optimal solution to reduce the complexity of material selection and the number of actuator movements during assembly. After all candidate solutions have been traversed, the currently recorded optimal solution is determined as the candidate combination solution. This solution minimizes the number of gaskets used while satisfying dual constraints. The total number of shims used for the minimum required amount in this scheme is recorded.
[0046] Step 4.4: Determine the optimal gasket combination scheme as the scheme that uses the fewest gaskets among the candidate combination schemes. Simultaneously, use the optimal gasket combination scheme as the compensation strategy to be executed. Specifically, this includes: combining the four quantity values from the optimal scheme obtained after traversal... The quantities of shims are stored in four pre-allocated consecutive register units in the PLC controller's data memory. These four register units are arranged sequentially according to a set offset address, each corresponding to the quantity of shims used for the four different sizes. The first register unit stores the quantity of 0.025mm shims. The second register unit stores the number of 0.050mm specification gaskets. The third register unit stores the number of 0.075mm specification gaskets. The fourth register unit stores the number of 0.100mm specification gaskets. These four register units are collectively defined as a single structure variable named OPTIMAL_COMBINATION in the program. This structure variable provides a unified access interface to the optimal shim combination scheme. After the central processing unit (CPU) module stores this structure variable, it sets the predefined compensation strategy ready flag COMP_READY in the status area to logical true. This flag is read by the subsequent program segment in each scan cycle of the CPU module to determine whether the compensation strategy is ready. Simultaneously, the total number of shims in the optimal shim combination scheme is... As auxiliary information, it is stored in an adjacent register unit for the upper-level monitoring terminal to read and display on the human-machine interface; at this point, the entire process of solving the dynamic optimal strategy is completed, and the solution result is provided to step 5 in the form of a compensation strategy to be executed, and step 5 executes the specific self-compensation action according to the strategy.
[0047] In a preferred embodiment of the present invention, step 5 above may include: Step 5.1: Parse the required gasket specifications and quantity information from the compensation strategy to be executed to form gasket combination information. Specifically, this includes: first, retrieving the structure variable OPTIMAL_COMBINATION stored in Step 4.4 from the data memory using a variable read instruction. This structure variable is located in the retention area of the data memory and consists of four consecutive 16-bit register units. Each register unit stores an integer value in two's complement form, corresponding to the quantity of gaskets used for the four specifications. The central processing unit module reads the values in these four register units sequentially according to the address offset of the register units. The value of the first register unit is associated with the 0.025mm specification, the value of the second register unit is associated with the 0.050mm specification, the value of the third register unit is associated with the 0.075mm specification, and the value of the fourth register unit is associated with the 0.100mm specification, forming a set of key-value pairs of gasket combination information.
[0048] The gasket combination information is stored in a dedicated temporary data area within the random access memory of the central processing unit module. This dedicated temporary data area uses a structured storage method, with specification and quantity fields respectively. The sum of the quantity values corresponding to the four specifications is taken as the total number of gaskets. The verification field stored in the temporary data area serves as the baseline value for subsequent cumulative verification. After the above storage is completed, the valid data flag bit DATA_VALID in the temporary data area is set to logical true by the central processing unit module to indicate to subsequent sub-steps that the gasket assembly information is ready.
[0049] Step 5.2: Based on the gasket combination information, a selection instruction sequence corresponding to each gasket specification is formed. This selection instruction sequence is used to sequentially select gaskets of the corresponding specifications and quantities. Specifically, it includes: after detecting that the valid data flag bit DATA_VALID in the temporary data area is in a logical true state, reading the gasket combination information from the temporary data area; sorting the gaskets according to their specifications from largest to smallest, i.e., processing the 0.100mm specification first, then the 0.075mm specification, then the 0.050mm specification, and finally the 0.025mm specification. This sorting order is determined based on the mechanical characteristics that large-specification gaskets occupy less space and are easier to fill with subsequent small-specification gaskets; for each specification, reading the corresponding usage quantity value and using a loop counting method. The system generates a corresponding number of optional instructions. Each optional instruction is defined as two bytes. The high four bits of the first byte are used to identify the instruction type, and the low four bits are used to identify the gasket specification code. The correspondence between the specification code and the gasket thickness is predefined in the system parameter table. The second byte is used to identify the optional sequence number under that specification, which starts from 1 and increments. All generated optional instructions are written to the output buffer in descending order of specification and in ascending order of optional sequence number within the same specification. The output buffer is a contiguous storage space allocated in the random access memory inside the central processing unit module, organized using a first-in-first-out queue structure. Each instruction occupies two bytes. After writing each instruction, the write pointer of the output buffer is updated to ensure the continuity and integrity of the instruction sequence.
[0050] Step 5.3: According to the selected instruction sequence, the drive execution end sequentially inserts gaskets of various specifications into the micro-gap, and updates the cumulative information of inserted gaskets after each gasket is inserted. Specifically, this includes: after the output buffer is written, the read pointer of the output buffer is reset to the starting position, and the selected instructions in the output buffer are sent to the execution end one by one through the system bus; after receiving a selected instruction, the execution end parses the specification code and selection sequence number in the instruction, identifies the required gasket thickness type according to the specification code, and sends a selection signal to the corresponding feeding end; after receiving the selection signal, the feeding end separates a gasket of the corresponding specification from the hopper and pushes it to the guide channel, where the gasket falls into the micro-gap; after sending each selected instruction, a timer is started, which waits for the arrival feedback signal returned by the execution end; wherein, this arrival feedback signal is detected by a detector installed at the exit of the guide channel. When a pad passes the detection element, the element outputs a positioning pulse signal, which is transmitted to the central processing unit (CPU) module via a signal acquisition line. Upon receiving the positioning feedback signal, the CPU module increments the cumulative counter for the pads already inserted. This cumulative counter is a 16-bit unsigned integer variable in the CPU module's internal random access memory. Simultaneously, based on the pad's current specification, it accumulates the count in the corresponding specification cumulative register. There are four specification cumulative registers, each corresponding to one of the four pad specifications, and each register is also a 16-bit unsigned integer variable. The cumulative counter and the four specification cumulative registers together constitute the cumulative information for the inserted pads. If the CPU module does not receive the positioning feedback signal within the timer's set time, it triggers a timeout alarm, writes the corresponding fault code to the status register, and suspends the transmission of subsequent instructions.
[0051] Step 5.4: When the cumulative information of the installed gaskets completely matches the gasket combination information, confirm that the self-compensation action has been completed and the gap compensation is finished. Specifically, this includes: after each update of the cumulative information of the installed gaskets, comparing the current value of the four specification cumulative registers with the required quantity of the corresponding specification in the gasket combination information stored in the temporary data area one by one, and at the same time comparing the current value of the cumulative counter of the installed gaskets with the total number of gaskets stored in the temporary data area. The comparison is performed field by field. First, the quantity of 0.100mm pads already in use is compared to the required quantity. Then, the quantities of 0.075mm, 0.050mm, and 0.025mm pads are compared. Finally, the total number of pads is compared. All comparison operations are performed by the central processing unit module by performing subtraction operations and checking if the result is zero. The comparison is completed when the current value of the cumulative registers for all four specifications is equal to the required quantity for the corresponding specification, and the current value of the cumulative counter for the pads already in use is equal to... When the cumulative information and the gasket combination information are completely matched, a stop command is sent to all automatic feeding terminals through the central processing unit module to terminate the subsequent gasket feeding action. At the same time, the compensation execution flag COMP_EXECUTED and the compensation completion flag COMP_COMPLETE in the status area are set to logical true. Both flags are stored in the status register inside the central processing unit module for the upper monitoring terminal to read and display in the visualization interface. At the same time, the execution log information such as the total time of this compensation execution and the actual number of gaskets of each specification are written into the log area of the memory for later quality traceability and equipment maintenance analysis. Thus, the self-compensation action is confirmed to be completed, and the entire micro-gap compensation process is completed.
[0052] like Figure 2 As shown, embodiments of the present invention also provide a gap self-compensation system based on PLC dynamic optimal shim combination, comprising: The gap sensing module is used to deploy multiple spatial sampling nodes along the circumferential and radial directions in the annular gap area between mating surfaces. A dynamic gap sensing model is generated by fitting the measured gap values at each spatial sampling node, and the dynamic gap sensing model is determined as the initial gap distribution morphology data. The data preprocessing module is used to preprocess the characteristic gap values in the initial gap distribution pattern data according to the preset rounding rules, and to correct them to a standard gap value that matches a certain specification in the preset gasket specification set. This standard gap value is used as the benchmark data for gasket combination optimization. The cavity field feature extraction module is used to construct a spatial cavity field configuration based on the initial gap distribution morphology data. The spatial cavity field configuration uses the radial distance as a variable to characterize the variation law of the gap on the axial section. Then, the cavity gradient and equipotential surface distortion coefficient of the spatial cavity field configuration are extracted, and the cavity gradient and equipotential surface distortion coefficient are merged to form a compensation feature vector. The PLC optimal solution module is used to solve the dynamic optimal strategy based on the reference data and compensation feature vector through the PLC controller. That is, with the goal of using the minimum number of shims, it solves the optimal shim combination scheme that matches the standard gap value and compensation feature vector in the space of shim combination schemes composed of different thickness specifications, and determines it as the compensation strategy to be executed. The execution control module is used to perform self-compensation actions according to the compensation strategy to be executed, and generate control commands to drive the execution end to put the corresponding number and specifications of shims into the micro gap to complete the gap compensation.
[0053] It should be noted that this system is a system corresponding to the above method. All implementation methods in the above method embodiments are applicable to this embodiment and can achieve the same technical effect.
[0054] Embodiments of the present invention also provide a computing device, including: a processor and a memory storing a computer program, wherein the computer program, when executed by the processor, performs the method described above. All implementations in the above method embodiments are applicable to this embodiment and can achieve the same technical effects.
[0055] Embodiments of the present invention also provide a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the method described above. All implementations in the above method embodiments are applicable to this embodiment and can achieve the same technical effects.
[0056] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A gap self-compensation method based on PLC dynamic optimal shim combination, characterized in that, The method includes: Step 1: In the annular gap area between mating surfaces, multiple spatial sampling nodes are arranged along the circumferential and radial directions. A dynamic gap sensing model is generated by fitting the measured gap values at each spatial sampling node. The dynamic gap sensing model is then used as the initial gap distribution morphology data. Step 2: According to the preset rounding rules, the characteristic gap values in the initial gap distribution pattern data are preprocessed to correct them into a standard gap value that matches a certain specification in the preset gasket specification set. This standard gap value is used as the benchmark data for gasket combination optimization. Step 3: Based on the initial gap distribution morphology data, construct the spatial cavity field configuration. The spatial cavity field configuration uses the radial distance as a variable to characterize the variation law of the gap on the axial section. Then, extract the cavity gradient and equipotential surface distortion coefficient of the spatial cavity field configuration, and merge the cavity gradient and equipotential surface distortion coefficient to form a compensation feature vector. Step 4: Based on the reference data and compensation feature vector, the PLC controller executes a dynamic optimal strategy solution, that is, with the goal of using the minimum number of shims, the optimal shim combination scheme that matches the standard gap value and compensation feature vector is solved in the space of shim combination schemes composed of different thickness specifications, and then determined as the compensation strategy to be executed. Step 5: Execute the self-compensation action according to the compensation strategy to be executed, and generate control commands to drive the execution end to put the corresponding number and specifications of gaskets into the micro gap to complete the gap compensation.
2. The gap self-compensation method based on PLC dynamic optimal shim combination according to claim 1, characterized in that, Within the annular gap region between mating surfaces, multiple spatial sampling nodes are arranged circumferentially and radially. A dynamic gap sensing model is generated by fitting the measured gap values at each spatial sampling node. This dynamic gap sensing model is then used as the initial gap distribution morphology data, including: Within the annular gap region, multiple circumferential sampling lines are divided at equal angular intervals. On each circumferential sampling line, multiple radial sampling points are divided at equal distance intervals. All radial sampling points are collectively determined as spatial sampling nodes. Collect the measured gap values at each spatial sampling node, and organize the measured gap values into a node gap matrix according to the circumferential and radial positions of each spatial sampling node; Based on the node gap matrix, a dynamic gap sensing model with a continuous distribution is constructed using the surface fitting method. The dynamic gap sensing model is used to characterize the gap distribution state at any spatial location within the annular gap region. The dynamic gap sensing model is used as the initial gap distribution morphology data.
3. The gap self-compensation method based on PLC dynamic optimal shim combination according to claim 2, characterized in that, According to preset rounding rules, the characteristic gap values in the initial gap distribution morphology data are preprocessed to correct them into standard gap values that match a certain specification in the preset gasket specification set. This standard gap value is used as the benchmark data for gasket combination optimization, including: Feature gap values representing the overall gap level within the annular gap region are extracted from the initial gap distribution morphology data, and these feature gap values are used as the original gap data to be corrected. According to the preset rounding rules, the original gap data is merged to correct the original gap data to an intermediate correction value that matches a certain specification in the preset gasket specification set. The intermediate correction value is determined as the standard gap value, wherein the standard gap value is used to uniquely characterize the gasket specification benchmark corresponding to the gap to be compensated; The standard gap value is used as the benchmark data for optimizing the gasket combination.
4. The gap self-compensation method based on PLC dynamic optimal shim combination according to claim 3, characterized in that, Simultaneously, based on the initial gap distribution morphology data, a spatial cavity field configuration is constructed. This configuration uses radial distance as a variable to characterize the gap variation on the axial profile. Furthermore, the cavity gradient and equipotential surface distortion coefficients of the spatial cavity field configuration are extracted. These coefficients are then combined to form a compensation feature vector, including: Using the central axis of the annular gap region as a reference, a cylindrical coordinate system is established, and the initial gap distribution morphology data is mapped to the established cylindrical coordinate system to form the initial gap field. Based on the initial gap field, a spatial cavity field configuration is constructed; wherein, the spatial cavity field configuration is used to characterize the continuous distribution pattern of the gap at different radial distances on the axial section; The first-order partial derivative of the spatial cavity field configuration along the radial direction is obtained to extract the cavity gradient, which reflects the degree of drastic change in the gap. At the same time, based on the geometric shape of the isopotential surface in the spatial cavity field configuration, the equipotential surface distortion coefficient, which reflects the uniformity of the gap distribution, is extracted. The cavity gradient and the equipotential surface distortion coefficient are vectorized and merged to form a compensation feature vector, which is then used as the input for the dynamic optimal strategy solution step.
5. The gap self-compensation method based on PLC dynamic optimal shim combination according to claim 4, characterized in that, Based on the aforementioned baseline data and compensation feature vector, a dynamic optimal strategy is solved by the PLC controller. This involves optimizing the solution by using the minimum number of shims, and within a space of shim combinations of different thicknesses, finding the optimal shim combination that matches both the standard gap value and the compensation feature vector. This optimal combination is then determined as the compensation strategy to be executed, including: The PLC controller acquires the reference data and compensation feature vector, and constructs a dual constraint condition that includes total clearance constraint and distribution deviation constraint based on the acquired reference data and compensation feature vector. Based on the aforementioned dual constraints, a solution search space is constructed consisting of combinations of gaskets with different thicknesses and specifications, wherein each combination solution in the solution search space corresponds to a gasket usage quantity. Optimal solution search is performed in the solution search space, with the goal of minimizing the number of gaskets used, and candidate combination solutions that simultaneously satisfy the total gap constraint and the distribution deviation constraint are selected. The option that uses the fewest gaskets among the candidate combinations is determined as the optimal gasket combination, and this optimal gasket combination is used as the compensation strategy to be executed.
6. The gap self-compensation method based on PLC dynamic optimal shim combination according to claim 5, characterized in that, According to the compensation strategy to be executed, a self-compensation action is performed, generating control commands to drive the actuator to insert the corresponding number and specifications of shims into the micro-gap, completing the gap compensation, including: The required gasket specifications and quantity information are extracted from the compensation strategy to be executed, forming gasket combination information; Based on the gasket combination information, a selection instruction sequence corresponding to each specification of gasket is formed. The selection instruction sequence is used to select gaskets of the corresponding specifications and quantities in sequence. According to the selected instruction sequence, the drive execution end sequentially puts the gaskets of each specification into the micro gap, and updates the cumulative information of the put-in gaskets after each gasket is put in. When the cumulative information of the installed gaskets completely matches the gasket combination information, the self-compensation action is confirmed to be completed, and the gap compensation is finished.
7. A gap self-compensation system based on PLC dynamic optimal shim combination, wherein the system implements the method as described in any one of claims 1 to 6, characterized in that, include: The gap sensing module is used to deploy multiple spatial sampling nodes along the circumferential and radial directions in the annular gap area between mating surfaces. A dynamic gap sensing model is generated by fitting the measured gap values at each spatial sampling node, and the dynamic gap sensing model is determined as the initial gap distribution morphology data. The data preprocessing module is used to preprocess the characteristic gap values in the initial gap distribution pattern data according to the preset rounding rules, and to correct them to a standard gap value that matches a certain specification in the preset gasket specification set. This standard gap value is used as the benchmark data for gasket combination optimization. The cavity field feature extraction module is used to construct a spatial cavity field configuration based on the initial gap distribution morphology data. The spatial cavity field configuration uses the radial distance as a variable to characterize the variation law of the gap on the axial section. Then, the cavity gradient and equipotential surface distortion coefficient of the spatial cavity field configuration are extracted, and the cavity gradient and equipotential surface distortion coefficient are merged to form a compensation feature vector. The PLC optimal solution module is used to solve the dynamic optimal strategy based on the reference data and compensation feature vector through the PLC controller. That is, with the goal of using the minimum number of shims, it solves the optimal shim combination scheme that matches the standard gap value and compensation feature vector in the space of shim combination schemes composed of different thickness specifications, and determines it as the compensation strategy to be executed. The execution control module is used to perform self-compensation actions according to the compensation strategy to be executed, and generate control commands to drive the execution end to put the corresponding number and specifications of shims into the micro gap to complete the gap compensation.
8. A computing device, characterized in that, include: One or more processors; A storage device for storing one or more programs that, when executed by one or more processors, cause the one or more processors to implement the method 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 program that, when executed by a processor, implements the method as described in any one of claims 1 to 6.