A method and system for local modification of assembly relationships in a mechanical design
Patent Information
- Application Number
- CN202611460838.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-20
- Publication Date
- 2026-10-27
AI Technical Summary
然而,上述方法中的敏感度仅作为装配前的静态参考信息或加工参数优化依据,未能在每轮修正中根据当前装配状态动态更新
[0035]1.本发明在每轮修正后重新评估雅可比旋量模型中的传递路径拓扑与敏感度系数,实现误差传递路径与修正进程的同步动态演化,解决了静态路径拓扑与动态修正过程失配导致的精度预判系统性偏移问题。
Smart Images

Figure CN122987689A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of mechanical intelligent design and intelligent optimization technology, and particularly relates to a method and system for local correction of assembly relationships in mechanical design. Background Technology
[0002] Currently, there are two main technical approaches in the field of assembly relationship correction in mechanical design. The first approach is based on the Jacobian screw model to model and correct assembly errors. For example, patent application CN121256971A discloses a method for calculating assembly errors of spiral bevel gear pairs that comprehensively considers bearing clearance and assembly relationships. This method establishes a dimension chain transmission relationship diagram of the assembly and uses a Jacobian matrix to dynamically associate the error transmission paths of each functional element. In this type of method, the error transmission path is pre-established before correction and remains unchanged during correction. The correction only changes the deviation of each node on the path, without changing the path topology. However, after multiple rounds of local correction, the coupling tightness between the dimensions of the assembly relationship changes dynamically, and the static transmission path deviates systematically from the actual state, leading to a continuous increase in the deviation between the predicted accuracy of subsequent corrections and the actual results.
[0003] The second type employs a multi-agent collaborative approach for assembly correction. For example, patent application CN119861667A discloses a method for optimizing the assembly order of conduits based on multi-agent reinforcement learning, proposing a hierarchical deep multi-agent Q-network algorithm to optimize the assembly order through multi-agent collaborative decision-making. However, these methods focus on how agents coordinate but do not address the question of whose judgment prevails. Each agent independently proposes correction suggestions based on its responsible dimension. When the directions are inconsistent, such as one agent suggesting increasing the coordination gap while another suggests decreasing it, existing methods compromise through weighted averaging or iterative negotiation. However, opposing correction suggestions cancel each other out, leading to ineffective corrections or even reversal and deterioration.
[0004] In terms of step size control, existing methods generally employ fixed step sizes or simple linear decay strategies. Patent application CN109993464A discloses a machining parameter optimization method to reduce the sensitivity of quasi-hypoid gear installation errors. It proposes a parameter optimization approach based on error sensitivity, providing a basis for assembly accuracy control by analyzing the sensitivity of different types of installation errors to meshing performance. However, the sensitivity in the above methods only serves as static reference information or a basis for machining parameter optimization before assembly, failing to dynamically update according to the current assembly state in each correction round. Fixed step sizes cannot reflect the actual impact differences of the same correction amount under different assembly states, easily leading to overcorrection due to excessively large step sizes or slow convergence due to excessively small step sizes. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this invention proposes a method and system for local correction of assembly relationships in mechanical design.
[0006] To achieve the above objectives, the present invention provides the following technical solution:
[0007] A method for local correction of assembly relationships in mechanical design includes the following steps:
[0008] Acquire mechanical design assembly relationship data and establish an assembly relationship criterion model;
[0009] Initialize the multi-agent system and assign initial historical accuracy weights to each agent;
[0010] Based on the current assembly relationship data, establish an error propagation path diagram in the current state and mark the deviation propagation sensitivity coefficient of each assembly relationship dimension;
[0011] Each agent independently proposes a correction suggestion for this round based on the current error propagation path diagram. After collecting the correction suggestions from all agents, the execution plan and the baseline correction range for this round are determined.
[0012] The target driving step size is determined based on the gap between the current assembly relationship data status and the preset correction target. The sensitivity constraint step size is determined based on the current deviation propagation sensitivity coefficient. The smaller value between the target driving step size and the sensitivity constraint step size is taken as the actual execution step size for this round, and the correction is performed according to this step size. After the correction is completed, the error propagation path diagram is re-evaluated based on the corrected assembly relationship data, and the actual effect of the correction is recorded.
[0013] Determine whether the current assembly relationship data meets the constraints of the assembly relationship criterion model. If it does, terminate the iteration and output the locally corrected assembly relationship data.
[0014] Furthermore, the error propagation path diagram is dynamically updated as the assembly relationship data status changes after each round of correction. Specifically, after each round of correction is completed, the assembly relationship data after this round of correction is substituted into the Jacobian spinor model to recalculate the propagation path weights. The updated error propagation path diagram is used as the common basis for the proposals of each agent in the next round of correction, so that the error propagation path based on each agent in the next round of proposal is synchronized with the current assembly status.
[0015] Furthermore, before each agent independently proposes a correction suggestion for this round, the communication channels between all agents are closed, so that each agent can make independent judgments based on the same current error propagation path graph in an information-isolated state; after the correction is completed, the historical accuracy of each agent is updated according to the actual effect of the correction, and the historical accuracy is used for the weighted average of the correction magnitude of each agent when determining the consensus degree of the round.
[0016] Furthermore, based on the consensus degree of deviation directions among the correction direction vectors and the matching degree between each correction suggestion and the assembly relationship criterion model, the specific method for determining the execution plan and benchmark correction magnitude for this round is as follows:
[0017] Calculate the degree of consensus of the deviation direction among the correction direction vectors;
[0018] If the consensus on the deviation direction is higher than a preset threshold, it is determined that each agent has a consistent judgment on the correction direction. The correction magnitude values of each agent are weighted and averaged to serve as the benchmark correction magnitude for this round. The weight of each agent is positively correlated with the historical accuracy of that agent.
[0019] If the consensus on the deviation direction is lower than or equal to a preset threshold, it is determined that there is a fundamental disagreement among the agents regarding the correction direction. The distance between the assembly relationship data and the constraint boundary of the assembly relationship criterion model after each correction suggestion is adopted is calculated, and the correction suggestion that minimizes this distance is selected as the sole execution plan for this round.
[0020] Furthermore, the consensus degree of the deviation direction is calculated as follows: the degree of concentration of the cosine value of the angle between each corrected direction vector is used as the consensus degree measure; when the angle between each direction vector is less than the first preset threshold, the consensus degree of the deviation direction is in the first state; when there are any two direction vectors with an angle greater than the second preset threshold, the consensus degree of the deviation direction is in the second state.
[0021] Furthermore, after taking the smaller value between the target-driven step size and the sensitivity constraint step size as the actual execution step size for this round, before executing this round of correction, it is first determined whether the actual execution step size is zero or negative: if it is zero or negative, this round of correction is skipped and the correction feedback loop is directly entered; if it is positive, the correction is executed according to the step size.
[0022] Furthermore, after this round of correction is completed, the actual effect of this round of correction is compared with the expected effect predicted based on the current error propagation path diagram: if the actual effect is better than the expected effect, the calculation method of the current sensitivity constraint step size will remain unchanged in the next round of correction; if the actual effect is worse than the expected effect, the calculation result of the sensitivity constraint step size will be forcibly multiplied by a preset attenuation coefficient before participating in the calculation of the smaller value in the next round of correction.
[0023] Furthermore, when the iteration reaches the preset maximum iteration limit and is forcibly terminated, the correction effect of the three most recent consecutive iterations is compared: if the correction effect continues to improve in the three iterations, the latest correction result is output; if the correction effect does not continue to improve in the three iterations, the assembly relationship data corresponding to the iteration with the best correction effect in the three most recent iterations is used as the output.
[0024] Furthermore, the dynamic update of the error propagation path diagram and the calculation of the deviation direction consensus are executed sequentially in each round, and the update result of the error propagation path diagram serves as a common premise for inputting each agent in the next round of deviation direction consensus calculation, so that the determination of deviation direction consensus is based on error propagation that matches the current assembly state.
[0025] A local correction system for assembly relationships in mechanical design, comprising:
[0026] The data acquisition module is used to acquire mechanical design assembly relationship data;
[0027] The criterion model building module is used to establish assembly relationship criterion models;
[0028] A multi-agent module, comprising multiple agents, with communication switches between each agent;
[0029] The path evaluation module is used to establish an error propagation path diagram and mark the deviation propagation sensitivity coefficient, and is triggered to re-evaluate after each round of correction is completed.
[0030] The consensus determination module is used to calculate the consensus degree of deviation direction and select either the weighted average mode or the matching degree arbitration mode based on the consensus degree.
[0031] The step size control module is used to calculate the target-driven step size and the sensitivity constraint step size, and use the smaller of the two as the actual execution step size for this round.
[0032] The feedback update module is used to record the actual effect of the correction and trigger the path evaluation module to re-evaluate;
[0033] The convergence determination module is used to determine whether the current assembly relationship data meets the constraints, and to forcibly terminate the iteration when the iteration reaches the preset maximum iteration limit and then perform three rounds of backtracking comparison before outputting the corresponding result.
[0034] Compared with the prior art, the beneficial effects of the present invention are:
[0035] 1. This invention re-evaluates the propagation path topology and sensitivity coefficients in the Jacobi spinor model after each round of correction, realizing the synchronous dynamic evolution of the error propagation path and the correction process, and solving the problem of systematic deviation in accuracy prediction caused by the mismatch between static path topology and dynamic correction process.
[0036] 2. This invention quantifies the consensus degree of deviation direction by using the cosine value of the angle between the direction vectors and performs process branching. When in the first state, a weighted average is used, and when in the second state, the optimal single solution is selected based on the criterion model as the arbitration basis. This avoids the invalid correction or reverse deterioration caused by forced compromise when there is a divergence in direction.
[0037] 3. This invention constructs the step size decision into a balance structure with two channels: target-driven and sensitivity-constrained, taking conservative values. The target channel ensures the efficiency of advancement, while the sensitivity channel limits the upper limit of the step size in real time according to the current assembly state, ensuring that the step size is sufficient to push the data closer to the target, but does not exceed the target or cause a chain of deviations due to excessive sensitivity. Attached Figure Description
[0038] Figure 1 This is a flowchart illustrating a method for local correction of assembly relationships in mechanical design, as disclosed in this invention.
[0039] Figure 2 This is a schematic diagram of the single-round iterative correction process disclosed in this invention;
[0040] Figure 3 This is a schematic diagram of the error propagation path diagram of the Jacobian spinor model disclosed in this invention.
[0041] Figure 4 This is a schematic diagram of the architecture of a local correction system for assembly relationships in mechanical design disclosed in this invention. Detailed Implementation
[0042] Example 1
[0043] Please see Figure 1 , Figure 2 The present invention provides an embodiment of a method for local correction of assembly relationships in mechanical design, the method comprising the following steps:
[0044] Step 1: Data Acquisition and Preprocessing.
[0045] Acquire mechanical design assembly relationship data. This data includes assembly constraints, dimensional relationships, and assembly sequence relationships between 3D models of mechanical components. Assembly constraints refer to the positioning constraints, motion constraints, and force transmission constraints between the 3D models of components. Positioning constraints restrict certain degrees of freedom of a component in space, maintaining a specific relative position. Motion constraints restrict the relative motion patterns and ranges between components. Force transmission constraints limit the path and magnitude of force or torque transmission between components. Dimensional relationships refer to the dimensional tolerances, geometric tolerances, and clearance parameters of the mating surfaces between the 3D models of components. Dimensional tolerances define the allowable range of dimensional variation. Geometric tolerances define the allowable range of shape and position deviations. Clearance parameters define the size of the clearance between mating surfaces. Assembly sequence relationships refer to the sequential dependencies of the 3D models of each component in the design assembly process; that is, the assembly of one component requires the prior assembly of another.
[0046] The assembly relationship dimension refers to the smallest data unit divided when describing the assembly relationship data in a structured way. Each assembly relationship dimension corresponds to a parameter that can be independently valued. For example, a mating dimension relationship can be divided into three assembly relationship dimensions: hole diameter, shaft diameter, and mating clearance; an assembly constraint relationship can be divided into three assembly relationship dimensions: X-axis positioning constraint, Y-axis positioning constraint, and Z-axis positioning constraint.
[0047] The acquired assembly relationship data is organized into a structured data format, with each assembly relationship dimension corresponding to a data field, forming an assembly relationship data vector. ,in This represents the total number of dimensions related to assembly relationships. Indicates the first The current value of each assembly relationship dimension refers to the qualitative description of assembly constraints, mating dimensions, and assembly sequence relationships, which is then converted into a calculable quantitative value. For example, the current value of a positioning constraint can be represented as the actual offset in that direction, the current value of a dimensional tolerance can be represented as the deviation between the actual and nominal dimensions, and the current value of an assembly sequence relationship can be represented as the sequence number of each component in the assembly sequence. This indicates transpose.
[0048] It should be noted that, since different types of assembly relationship dimensions may have different dimensions and value ranges, to facilitate unified calculations later, the current values of each assembly relationship dimension are normalized before subsequent calculations, mapping them to a unified numerical range. The normalization process is as follows: for the... Each assembly relationship dimension, taking its current value. The constraint limit value corresponding to this dimension The difference, divided by the upper limit of the constraint condition corresponding to that dimension. and lower limit value The difference causes the values of each assembly relationship dimension to fall into the [0,1] interval.
[0049] Step 2: Establish assembly relationship criterion model.
[0050] An assembly relationship criterion model is established based on mechanical assembly standards and assembly requirements. This model includes a series of constraints. Where R is the total number of constraints, and each constraint corresponds to a range of allowed values or combinations of allowed values in an assembly relation dimension. For the r-th constraint... Its form is: ,in, This is a data vector representing assembly relationships. Let k be the quantization function of the k-th assembly accuracy index, and let the k-th be the quantization function of the k-th assembly accuracy index. The assembly accuracy index and the first The corresponding constraint condition is the th constraint condition. The constraint condition is the first one. The value range of each assembly accuracy index. The assembly accuracy index refers to the quantitative evaluation standard used to determine whether the assembly relationship is qualified, including but not limited to whether the fit clearance is within the allowable range, whether the positioning deviation exceeds the threshold, and whether the force transmission efficiency meets the requirements. Quantitative function. Indicates data from assembly relationships To the The mapping relationship of each assembly accuracy index is that the specific value of the assembly accuracy index is calculated based on the values of each dimension in the assembly relationship data. and These represent the lower and upper limits of the assembly accuracy index, respectively. For example, for the accuracy index of fit clearance, assuming the first assembly relationship dimension is the hole diameter and the second assembly relationship dimension is the shaft diameter, its quantization function can be expressed as: ,in This is the current value for the first assembly relationship dimension, i.e., the aperture. The lower limit value is the current value of the second assembly relationship dimension, namely the shaft diameter. mm, upper limit mm, meaning the fit clearance must be between 0.01mm and 0.05mm. Assembly data is considered compliant with assembly requirements if all constraints are met; if any constraint is not met, correction is required.
[0051] Step 3: Initialize the multi-agent system.
[0052] The multi-agent system is initialized, with each agent responsible for correcting different dimensions or regions of the assembly relationship. Specifically, the assembly relationship dimensions are divided into... Each correction region, for each agent Responsible for correcting one or more assembly relationship dimensions within a correction region, where The total number of intelligent agents.
[0053] Assign initial historical accuracy weights to each agent. The initial historical accuracy weights are set as follows: This means that all agents have the same historical accuracy weights in the initial state. These historical accuracy weights are dynamically updated during iterations based on the actual effectiveness of each agent's proposed improvements.
[0054] Set the maximum number of iteration rounds. Maximum number of iterations The setting of 50 iterations is based on the following: statistics show that local correction problems in assembly relationships during general mechanical design processes converge within 30 iterations, and 50 iterations provide sufficient redundancy to handle complex assembly scenarios. Those skilled in the art can adjust this parameter within the range of 30 to 100 iterations depending on the number and complexity of the assembly relationship dimensions. The iteration is forcibly terminated when the number of iterations reaches 50 to prevent the correction process from looping indefinitely.
[0055] Step 4: Iteratively correct the main loop.
[0056] Iteratively execute the following steps until the correction objective is achieved or the maximum number of iterations is reached. .
[0057] Step 4.1: Establish the error propagation path diagram.
[0058] Based on the current assembly relationship data, the error propagation path diagram under the current state is established using the Jacobi screw model.
[0059] The basic principle of the Jacobi spinor model is: to divide each assembly feature element The deviation is represented by a six-dimensional small displacement spinor, where , This represents the total number of assembly feature elements. Indicates the first The assembly feature elements are geometric features in the assembly that participate in error transmission, including but not limited to mating surfaces, locating surfaces, connecting holes, and axes. Assembly feature elements Small displacement spin ,in The first Each assembly feature element along Translational differential components in three directions, The first Each assembly feature element around Rotational differentials in three directions.
[0060] For a given set of P assembly feature elements The assembly, based on the Jacobian transfer matrix and the small displacement spin of each characteristic element Small displacement spin of end-assembly precision Calculated using the following formula:
[0061]
[0062] in, For the first Assembly feature elements Relative to the Jacobian transfer matrix of the end effector, For the first Assembly feature elements Small displacement spinor, To all A matrix formed by horizontally concatenating Jacobian transitive matrices. To all A vector formed by longitudinally concatenating small displacement spinors. Jacobian transfer matrix. The form is: ,in and All are 3×3 identity matrices. For the first Assembly feature elements The position vector is a 3×3 antisymmetric matrix, and 0 is a 3×3 zero matrix.
[0063] Therefore, the error propagation path graph is modeled as a directed graph. ,in For each assembly feature element node, including There are 10 nodes, and each node corresponds to an assembly feature element. Directed edges are used to propagate errors between nodes, connecting two nodes that have an error propagation relationship.
[0064] like Figure 3 As shown, the nodes of the directed graph in the error propagation path diagram represent various assembly feature elements. ,in Indicates the first Each assembly feature element; annotations within each node. This indicates the assembly feature element. The sensitivity coefficient of assembly feature elements to the final assembly accuracy indicates that the larger the value, the more significant the impact of the assembly feature element on the final assembly accuracy; on directed edges Indicates from the first The assembly feature element to the first The sum of the absolute values of the corresponding elements in the Jacobian transfer matrix of each assembly feature element, where , The serial number of the assembly feature element; Figure 3 The mid-to-end assembly accuracy is the small displacement screw of the end assembly accuracy disclosed in this application. This is the final output of the entire assembly chain. To start from the 3rd assembly feature element End-of-line assembly precision The error propagation strength, whose value is the Jacobian transfer matrix. The sum of the absolute values of each element in the column vector corresponding to the end-assembly precision. To start from the 5th assembly feature element End-of-line assembly precision Error propagation strength.
[0065] Specifically, for the first Assembly feature elements Pointing to the Assembly feature elements The directed edges, whose weights are equal to the Jacobian transitivity matrix. The corresponding number in the middle The sum of the absolute values of each element in the column vector of the assembly feature elements; the larger this value, the higher the value of the first element. The assembly feature element for the first The more significant the impact of error propagation on each assembly feature element, the more pronounced the effect.
[0066] Label the deviation propagation sensitivity coefficient for each assembly relationship dimension. The sensitivity coefficient is defined as the degree of influence of a unit change in a certain assembly relationship dimension on the final assembly accuracy. Specifically, for the... The sensitivity coefficient of each assembly relationship dimension. Calculated using the norm of the corresponding column in the Jacobian matrix:
[0067]
[0068] in, Representing the Jacobian matrix The Middle A column vector consisting of all row elements of a column. The L2 norm of a vector is the square root of the sum of the squares of its elements. The larger the value, the more significant the impact of changes in that dimension on the final assembly accuracy.
[0069] It should be noted that the above-mentioned sensitivity coefficients for assembly feature elements... Sensitivity coefficient for deviation transmission from assembly relationship dimension Different meanings It represents the sensitivity at the level of assembly feature elements. This represents the sensitivity at the assembly relationship dimension. Assembly feature element sensitivity coefficient. Used to describe Figure 3 The degree of influence of each assembly feature node on the final assembly accuracy, and the sensitivity coefficient of deviation transmission. Used to evaluate the impact of unit changes in each assembly relationship dimension on the final assembly accuracy when proposing by each agent.
[0070] The error propagation path diagram is dynamically updated according to the changes in the assembly relationship data state after each round of correction. After each round of correction is completed, the propagation path weights and Jacobian matrix elements in the Jacobian screw model are recalculated based on the corrected assembly relationship data. The updated error propagation path diagram is used as the common basis for proposals by each agent in the next round of correction, ensuring that the error propagation path used by each agent in the next round of proposals remains synchronized with the current assembly state. The dynamic update of the error propagation path diagram and the calculation of consensus are performed sequentially in each round; that is, the path update is completed first, and then the updated result is used as the input premise for the consensus calculation in the next round.
[0071] Step 4.2, Multi-agent Independent Proposal.
[0072] The communication channels between the agents are closed, so that each agent can make independent judgments based on the same current error propagation path graph in an information-isolated state.
[0073] Each agent independently proposes a correction suggestion for this round based on the current error propagation path diagram and the assembly relationship dimension it is responsible for. Each correction suggestion includes a correction direction vector and a correction magnitude value.
[0074] For intelligent agents The proposed corrected direction vector ,in Indicates the first The first agent on the first The suggested correction direction for each assembly relationship dimension is indicated by +1 (increasing the value of that dimension), -1 (decreasing the value of that dimension), and 0 (no correction). The correction magnitude is... , representing intelligent agents The recommended amount of correction.
[0075] The method for calculating the corrected direction vector is as follows: (The agent...) Based on the sensitivity coefficients of each assembly relationship dimension in the current error propagation path diagram The deviation direction between the assembly relationship dimension it is responsible for and the preset correction target is used to determine whether each assembly relationship dimension needs to be increased, decreased, or not corrected, represented by +1, -1, and 0 respectively, forming a correction direction vector. The calculation method for the correction amplitude value is as follows: (The sentence is incomplete and requires more context to be translated accurately.) Based on the gap between the dimension it is responsible for and the constraint boundary in the current assembly relationship data, and the sensitivity coefficient of that dimension, calculate the suggested correction amount. , Specifically, for intelligent agents The responsible first Each assembly relationship dimension, its correction magnitude value The calculation formula is: ,in For the first The gap between each assembly relationship dimension and the constraint boundary, i.e. , For the first Sensitivity coefficient for deviation propagation in each assembly relationship dimension.
[0076] Step 4.3, consensus calculation and master-slave determination.
[0077] After collecting correction suggestions from all agents, the consensus degree of deviation direction between each correction direction vector is calculated.
[0078] The consensus degree of deviation direction is calculated as follows: the degree of concentration of the cosine of the angle between each corrected direction vector is used as the consensus degree measure. For any two agents... and Correction direction vector and The cosine value of its included angle for:
[0079]
[0080] in It is the dot product of vectors, that is, the sum of the products of corresponding elements. and These are the L2 norms of the vectors, This represents the angle between two direction vectors. When the angles between all direction vectors are less than a first preset threshold... When the deviation direction consensus is in the first state, the deviation direction consensus is in the second state. When the angle between any two direction vectors is greater than a second preset threshold... At this point, the consensus on the deviation direction is in the second state. The first and second preset thresholds are set based on the following: when the angle between the correction directions of all agents is less than 30°, the projections of each direction vector in the direction space highly coincide, indicating that the judgments of each agent are highly consistent; when the angle between any two direction vectors is greater than 60°, it indicates that at least two agents have opposite or approximately orthogonal judgment directions, which constitutes a fundamental disagreement. The interval between the two thresholds is a transition zone, which is classified into the second state in this embodiment to adopt a more conservative arbitration strategy. Those skilled in the art can adjust the first and second preset thresholds within the ranges of 20°~40° and 50°~70° respectively, depending on the number of agents.
[0081] If the first state is reached, it is determined that all agents have a consistent judgment on the correction direction, and the weighted average of the correction magnitude values of each agent is used as the baseline correction magnitude for this round. :
[0082]
[0083] in For intelligent agents Historical accuracy weighting The proposed correction magnitude is given. The weight of each agent is positively correlated with its historical accuracy; the higher the historical accuracy of an agent, the greater the weight of its proposed correction magnitude in the weighted average.
[0084] If in the second state, it is determined that there is a fundamental disagreement among the agents regarding the direction of correction. The weighted average method is abandoned, and instead the distance between the assembly relationship data and the constraint boundary of the assembly relationship criterion model after each agent's correction suggestion is adopted is calculated. The correction suggestion that minimizes this distance is selected as the sole execution plan for this round.
[0085] Specifically, for intelligent agents The proposed correction, assuming the assembly relationship data is adopted, is as follows. ,in This is the current assembly relationship data vector. To correct the amplitude value, To correct the direction vector, calculate Distance between each constraint boundary of the assembly relationship criterion model :
[0086]
[0087] in, This represents the corrected assembly relationship data vector. Substitute the first The value after quantization function of each precision index and These are the lower and upper limits of the indicator, respectively. This indicates taking the larger value between 0 and the value within the parentheses. The expression represents the sum of all constraint violations. (The option to choose...) The minimum proposed correction will be the sole implementation plan for this round, and the correction magnitude in this plan will be used as the benchmark correction magnitude for this round. .
[0088] Step 4.4, dual-channel step size adaptive correction execution.
[0089] Determine the direction of this round of corrections and the baseline correction range. Then, the actual execution step size for this round is determined through dual-channel calculation.
[0090] Channel 1, Target-Driven Channel: Based on the gap between the current assembly relationship data status and the correction target, calculate the theoretical minimum step size required to reach the correction target within a preset number of iterations.
[0091] Specifically, calculate the difference between each dimension of the current assembly relationship data and the constraint boundary of the assembly relationship criterion model. For the first... One assembly relationship dimension Its distance from the constraint boundary for:
[0092]
[0093] in, For the first A quantification function for each assembly accuracy index. and These are the lower and upper limits of the indicator, respectively. This indicates that the smaller of the two values in parentheses should be selected. The minimum gap is determined by taking the value closest to the constraint boundary across all dimensions. ,Right now: ,in Indicates to From 1 to Take the minimum value.
[0094] Target-driven step size :
[0095]
[0096] in For the remaining iteration rounds, , For the current iteration round, The relaxation coefficient is... In this embodiment, we take Relaxation coefficient The setting of 0.8 is based on the fact that a 20% relaxation margin is reserved in the calculation of the target-driven step size to avoid excessively large step sizes due to optimistic estimations in linear prediction. Those skilled in the art can adjust this parameter within the range of 0.6 to 0.95. The formula means: the step size required per round to uniformly reduce the current minimum gap to zero over the remaining rounds.
[0097] Channel 2, Sensitivity Constraint Channel: Based on the current deviation, the sensitivity coefficient is transferred, and the maximum step size that can be safely executed under the current sensitivity is calculated.
[0098] The deviations in each assembly relationship dimension are transferred to the sensitivity coefficient. Multiply by the candidate step size respectively The candidate step size The setup method is as follows: starting from a preset initial step size, the candidate step size is gradually decreased by a preset step size reduction amount. Each time the step size is decreased, it is verified whether the product of all dimensions does not exceed its respective safety threshold. When the condition is met, the current candidate step size is taken as the sensitivity constraint step size. If the product of any dimension exceeds the preset safety threshold of that dimension, the sensitivity constraint step size is determined. If the candidate step size is reduced, the product of all dimensions will not exceed their respective safety thresholds.
[0099] Safety threshold The setting method is as follows: ,in The maximum allowable deviation variation in this dimension is determined by the tolerance range in the assembly relationship criterion model, i.e. , For safety reasons, In this embodiment, we take Safety factor The setting of 0.5 is based on the fact that the sensitivity constraint step size is only allowed to be corrected within half of the safety threshold, reserving a 50% safety margin for uncertainty and prediction error. Those skilled in the art can adjust this parameter within the range of 0.3 to 0.8 according to the assembly accuracy requirements.
[0100] Sensitivity constraint step size ,in, This represents the candidate step size that satisfies all dimensional sensitivity constraints. Take the maximum value from the middle. This means for all That is, the maximum step size that satisfies all dimensional sensitivity constraints.
[0101] Actual execution step size in this round Perform this round of corrections according to this step size, and update the assembly relationship data:
[0102]
[0103] in This is the current assembly relationship data vector. This is the correction direction vector determined in this round. In the first state, it is the weighted average direction of the correction direction vectors of all agents; in the second state, it is the correction direction vector of the selected unique execution plan. This is the corrected assembly relationship data vector. Before performing this round of correction, the actual execution step size is determined first. Is it zero or negative? If it is zero or negative, skip this round of correction and proceed directly to the post-correction feedback stage; if it is positive, perform correction according to the step size.
[0104] Step 4.5: Correction feedback and closed-loop update.
[0105] After this round of corrections is completed, the error propagation path diagram is re-evaluated based on the corrected assembly relationship data. The corrected assembly relationship data is then substituted into the Jacobi screw model to recalculate the Jacobi transfer matrix and sensitivity coefficients. The updated error propagation path diagram is then used as the common basis for the proposals of each agent in the next round of corrections, ensuring that the error propagation path used by each agent in the next round of proposals remains synchronized with the current assembly state.
[0106] Simultaneously, record the actual effect of this round of correction. Compare the actual effect of this round of correction with the expected effect predicted based on the current error propagation path diagram: if the actual effect is better than the expected effect, the current calculation method of the sensitivity constraint step size will remain unchanged in the next round of correction; if the actual effect is worse than the expected effect, the calculated result of the sensitivity constraint step size will be forcibly multiplied by a preset attenuation coefficient in the next round of correction. Then it participates in the calculation to take the smaller value. The attenuation coefficient... It is a fixed constant greater than 0 and less than 1. In this embodiment, it is taken as... Attenuation coefficient The setting of 0.7 is based on the following principle: when the actual effect is worse than expected, the sensitivity constraint step size in the next round is forcibly reduced to 70% of the original calculated value, so as to continue the correction with a more conservative step size and avoid overcorrection and continuous deterioration due to an excessively large step size. Those skilled in the art can adjust this parameter within the range of 0.5 to 0.9.
[0107] The method for comparing actual results with expected results is as follows: calculate the actual reduction in distance between the assembly relationship data after this round of correction and the constraint boundary of the criterion model. The reduction amount predicted based on the error propagation path diagram before correction Comparison. Among them, The sum of all constraint violations before correction. This is the sum of the corrected constraint violations predicted by the Jacobi spinor model based on the corrected direction vector to be executed in this round and the actual execution step size. This is the sum of all constraint violations after correction. The calculation method is as follows: ; The calculation method is as follows: .like If the actual effect is better than or reaches the expected effect, then it is determined that the actual effect is better than or reaches the expected effect; if If the actual effect is worse than the expected effect, the attenuation coefficient will be triggered.
[0108] The historical accuracy of each agent is updated based on the actual effect of this round of corrections. Specifically, if a weighted average scheme is adopted in this round (i.e., in the first state), the historical accuracy of all agents participating in the weighting will increase when the correction is effective and decrease when it is ineffective. If a single agent scheme is adopted in this round (i.e., in the second state), only the historical accuracy of the adopted agent will be adjusted according to the correction effect. The adjustment amount for historical accuracy is a fixed step size. The upper limit is 1.0, and the lower limit is 0.01. Historical accuracy adjustment step size. The setting of 0.01 is based on the following principle: after each correction, the historical accuracy of the relevant agent is fine-tuned according to whether the correction is effective or ineffective, ensuring the smoothness and stability of weight changes. Those skilled in the art can adjust this parameter within the range of 0.005 to 0.02.
[0109] Step 5: Convergence determination and result output.
[0110] Determine whether the current assembly relationship data satisfies all constraints of the assembly relationship criterion model: If all constraints... All are satisfied, that is, for all All have If the condition is met, the iteration terminates and the locally corrected assembly relationship data is output.
[0111] When the number of iterations reaches the preset maximum iteration limit. When forced termination occurs, the correction effects of the three most recent consecutive rounds are compared: if the correction effect continues to improve in the three rounds, that is, the total amount of constraint violations in the three rounds continues to decrease, the latest correction result is output; if the correction effect does not continue to improve in the three rounds, the assembly relationship data corresponding to the round with the best correction effect in the three most recent rounds is used as the output.
[0112] Example 2
[0113] Please see Figure 4 Another embodiment of the present invention provides a local correction system for assembly relationships in mechanical design, comprising the following modules:
[0114] The data acquisition module is used to acquire mechanical design assembly relationship data. This module connects to a mechanical product design database or CAD assembly simulation system via a data interface, receiving structured data containing assembly constraint relationships, mating dimension relationships, and assembly sequence relationships.
[0115] The criterion model construction module is used to establish assembly relationship criterion models. This module has a built-in mechanical assembly standard database, which contains assembly tolerance standards, fit standards, and assembly sequence specifications for various mechanical designs. It can select the corresponding combination of constraints from the database according to the specific design task to build a criterion model applicable to the current design scenario.
[0116] The multi-agent module comprises multiple agents, each responsible for correcting different dimensions or regions within the assembly relationship. A communication switch exists between the agents; this switch is disabled during the proposal phase to isolate them. Each agent has a built-in correction suggestion generation unit, independently proposing correction suggestions containing a correction direction vector and magnitude value based on the current error propagation path graph. Each agent also has a built-in historical accuracy recording unit, used to record the adoption status and effectiveness of its historical correction suggestions.
[0117] The path evaluation module, with its built-in Jacobian screw model calculation unit, establishes an error propagation path diagram based on the current assembly relationship data and marks the deviation propagation sensitivity coefficient. This module is triggered for re-evaluation after each round of correction is completed, realizing the dynamic updating of the error propagation path.
[0118] The consensus determination module, which includes a built-in direction vector angle analysis unit and a matching degree calculation unit, is used to determine the baseline correction magnitude for this round based on the consensus degree of deviation between each correction direction vector and the matching degree between each correction suggestion and the assembly relationship criterion model. This module first calculates the cosine value of the angle between each correction direction vector and statistically analyzes its concentration as a consensus degree measure; in the first state, it selects the weighted average mode, and in the second state, it selects the matching degree arbitration mode.
[0119] The step size control module incorporates a target-driven step size calculation unit and a sensitivity constraint step size calculation unit. These units calculate the target-driven step size and the sensitivity constraint step size, respectively, and use the smaller of the two as the actual execution step size for the current round. The module also includes a step size exception handling unit, which skips the current round of correction when the actual execution step size is zero or negative.
[0120] The feedback update module records the actual effect of the current correction and triggers a re-evaluation by the path evaluation module. It also adjusts the calculation parameters of the sensitivity constraint step size (i.e., triggering the decay coefficient) based on the comparison between the actual and expected results. This module is also responsible for updating the historical accuracy weights of each agent.
[0121] The convergence determination module is used to determine whether the current assembly relationship data meets the constraints of the assembly relationship criterion model, and outputs the locally corrected assembly relationship data when it does. This module is also used to forcibly terminate the iteration when the preset maximum iteration limit is reached, and then perform three rounds of backtracking comparison before outputting the corresponding results.
[0122] Taking a simple mechanical design model with five assembly relationship dimensions as an example, the data acquisition module obtains the initial values of the five dimensions of assembly relationship data for the design model. The criterion model construction module establishes the allowable tolerance range of each dimension as constraints based on mechanical assembly standards, such as using the general tolerance standard GB / T 1804-2000. The five agents in the multi-agent module are each responsible for correcting the five dimensions, with an initial historical accuracy weight of 0.2 for each. The path evaluation module establishes the error propagation path diagram of the Jacobian screw model based on the initial data and calculates the sensitivity coefficient of each dimension. Dimension 3 has the highest sensitivity coefficient of 0.85, while dimension 5 has the lowest at 0.12.
[0123] In the first iteration, five agents independently proposed correction suggestions while communication was closed. Agent 1 suggested increasing dimension 1 by 0.05mm, Agent 2 suggested decreasing dimension 2 by 0.03mm, Agent 3 suggested decreasing dimension 3 by 0.08mm, and Agents 4 and 5 suggested no correction. The consensus determination module calculated the cosine of the angle between the vectors in each direction and found that Agent 3's correction direction differed significantly from the majority of agents, exceeding 60°. The consensus on the deviation direction was determined to be in the second state, and the system entered the matching degree arbitration mode. The scheme of Agent 3, which minimized the distance between the assembly relationship data and the constraint boundary of the criterion model, was selected as the execution scheme for this round. The step size control module calculated the target-driven step size to be 0.06mm and the sensitivity constraint step size to be 0.05mm. Due to the high sensitivity of dimension 3, the actual execution step size was set to the smaller value of 0.05mm, and the correction was executed.
[0124] The feedback update module found that the actual effect was better than expected after the correction. It maintained the same step size calculation method and updated the historical accuracy of each agent. Agent 3 saw its historical accuracy improve because its correction suggestion was adopted and effective. The system then entered the next iteration until all five dimensions of data fell within the allowable tolerance range. Finally, the convergence determination module output the final correction result.
[0125] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments under the guidance of the present invention without departing from the spirit and scope of the present invention. All of these variations are within the protection scope of the present invention.
Claims
1. A method for local correction of assembly relationships in mechanical design, characterized in that, Includes the following steps: Acquire mechanical design assembly relationship data and establish an assembly relationship criterion model; Initialize the multi-agent system and assign initial historical accuracy weights to each agent; Based on the current assembly relationship data, establish an error propagation path diagram in the current state and mark the deviation propagation sensitivity coefficient of each assembly relationship dimension; Each agent independently proposes a correction suggestion for this round based on the current error propagation path diagram. After collecting the correction suggestions from all agents, the execution plan and the baseline correction range for this round are determined. The target driving step size is determined based on the gap between the current assembly relationship data status and the preset correction target. The sensitivity constraint step size is determined based on the current deviation propagation sensitivity coefficient. The smaller value between the target driving step size and the sensitivity constraint step size is taken as the actual execution step size for this round, and the correction is performed according to this step size. After the correction is completed, the error propagation path diagram is re-evaluated based on the corrected assembly relationship data, and the actual effect of the correction is recorded. Determine whether the current assembly relationship data meets the constraints of the assembly relationship criterion model. If it does, terminate the iteration and output the locally corrected assembly relationship data.
2. The method for local correction of assembly relationships in mechanical design according to claim 1, characterized in that, The error propagation path diagram is dynamically updated as the assembly relationship data status changes after each round of correction. Specifically, after each round of correction is completed, the assembly relationship data after this round of correction is substituted into the Jacobian spinor model to recalculate the propagation path weights. The updated error propagation path diagram is used as the common basis for the proposals of each agent in the next round of correction, so that the error propagation path based on each agent in the next round of proposals remains synchronized with the current assembly status.
3. The method for local correction of assembly relationships in mechanical design according to claim 1, characterized in that, Before each agent independently proposes its own correction suggestions, all communication channels between agents are closed, so that each agent can make independent judgments based on the same current error propagation path graph in a state of information isolation. After this round of corrections is completed, the historical accuracy of each agent is updated based on the actual effect of this round of corrections. The historical accuracy is used to calculate the weight of the weighted average of the correction magnitudes of each agent when determining the consensus level in each round.
4. The method for local correction of assembly relationships in mechanical design according to claim 1, characterized in that, Based on the consensus on the deviation directions among the correction direction vectors and the matching degree between each correction suggestion and the assembly relationship criterion model, the specific method for determining the execution plan and benchmark correction magnitude for this round is as follows: Calculate the degree of consensus of the deviation direction among the correction direction vectors; If the consensus on the deviation direction is higher than a preset threshold, it is determined that each agent has a consistent judgment on the correction direction. The correction magnitude values of each agent are weighted and averaged to serve as the benchmark correction magnitude for this round. The weight of each agent is positively correlated with the historical accuracy of that agent. If the consensus on the deviation direction is lower than or equal to a preset threshold, it is determined that there is a fundamental disagreement among the agents regarding the correction direction. The distance between the assembly relationship data and the constraint boundary of the assembly relationship criterion model after each correction suggestion is adopted is calculated, and the correction suggestion that minimizes this distance is selected as the sole execution plan for this round.
5. The method for local correction of assembly relationships in mechanical design according to claim 4, characterized in that, The consensus degree of the deviation direction is calculated by using the concentration of the cosine value of the angle between each correction direction vector as the consensus degree measure. When the angle between each directional vector is less than a first preset threshold, the deviation direction consensus is in the first state; When the angle between any two directional vectors is greater than a second preset threshold, the deviation direction consensus is in the second state.
6. The method for local correction of assembly relationships in mechanical design according to claim 1, characterized in that, After taking the smaller value between the target-driven step size and the sensitivity constraint step size as the actual execution step size for this round, before executing this round of correction, it is first determined whether the actual execution step size is zero or negative: if it is zero or negative, this round of correction is skipped and the correction feedback stage is directly entered; if it is positive, the correction is executed according to the step size.
7. The method for local correction of assembly relationships in mechanical design according to claim 1, characterized in that, After this round of correction is completed, the actual effect of this round of correction will be compared with the expected effect predicted based on the current error propagation path diagram: if the actual effect is better than the expected effect, the current calculation method of the sensitivity constraint step size will remain unchanged in the next round of correction. If the actual effect is worse than the expected effect, the calculated result of the sensitivity constraint step size will be forcibly multiplied by the preset attenuation coefficient in the next round of correction before participating in the calculation of the smaller value.
8. The method for local correction of assembly relationships in mechanical design according to claim 1, characterized in that, When the iteration reaches the preset maximum iteration limit and is forcibly terminated, compare the correction effect of the three most recent consecutive iterations: if the correction effect continues to improve in the three iterations, output the latest correction result; if the correction effect does not continue to improve in the three iterations, revert to the assembly relationship data corresponding to the iteration with the best correction effect in the three most recent iterations as the output.
9. A method for local correction of assembly relationships in mechanical design according to claim 4, characterized in that, The dynamic update of the error propagation path diagram and the calculation of the deviation direction consensus are executed sequentially in each round, and the update result of the error propagation path diagram serves as a common premise for inputting each agent in the next round of deviation direction consensus calculation, so that the determination of deviation direction consensus is based on error propagation that matches the current assembly state.
10. A system for local correction of assembly relationships in mechanical design, used to implement the method for local correction of assembly relationships in mechanical design according to any one of claims 1 to 9, characterized in that, The system includes: The data acquisition module is used to acquire mechanical design assembly relationship data; The criterion model building module is used to establish assembly relationship criterion models; A multi-agent module, comprising multiple agents, with communication switches between each agent; The path evaluation module is used to establish an error propagation path diagram and mark the deviation propagation sensitivity coefficient, and is triggered to re-evaluate after each round of correction is completed. The consensus determination module is used to calculate the consensus degree of deviation direction and select either the weighted average mode or the matching degree arbitration mode based on the consensus degree. The step size control module is used to calculate the target-driven step size and the sensitivity constraint step size, and use the smaller of the two as the actual execution step size for this round. The feedback update module is used to record the actual effect of the correction and trigger the path evaluation module to re-evaluate; The convergence determination module is used to determine whether the current assembly relationship data meets the constraints, and to forcibly terminate the iteration when the iteration reaches the preset maximum iteration limit and then perform three rounds of backtracking comparison before outputting the corresponding result.
Citation Information
Patent Citations
Processing parameter optimization method for reducing mounting error sensitivity of hypoid gear
CN109993464A
Multi-agent reinforcement learning-based conduit assembly sequence optimization method
CN119861667A
Method for calculating assembly error of spiral bevel gear pair by comprehensively counting bearing clearance and assembly relation
CN121256971A