CN109506613A - One kind being based on the depth of parallelism assessment method of maximum material requirement (MMR) cylinder - Google Patents

One kind being based on the depth of parallelism assessment method of maximum material requirement (MMR) cylinder Download PDF

Info

Publication number
CN109506613A
CN109506613A CN201710830122.7A CN201710830122A CN109506613A CN 109506613 A CN109506613 A CN 109506613A CN 201710830122 A CN201710830122 A CN 201710830122A CN 109506613 A CN109506613 A CN 109506613A
Authority
CN
China
Prior art keywords
cylinder
actual
population
measured
parallelism
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201710830122.7A
Other languages
Chinese (zh)
Inventor
鲁周抗
黄美发
宋励
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guilin University of Electronic Technology
Original Assignee
Guilin University of Electronic Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guilin University of Electronic Technology filed Critical Guilin University of Electronic Technology
Priority to CN201710830122.7A priority Critical patent/CN109506613A/en
Publication of CN109506613A publication Critical patent/CN109506613A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B21/00Measuring arrangements or details thereof, where the measuring technique is not covered by the other groups of this subclass, unspecified or not relevant
    • G01B21/22Measuring arrangements or details thereof, where the measuring technique is not covered by the other groups of this subclass, unspecified or not relevant for measuring angles or tapers; for testing the alignment of axes
    • G01B21/24Measuring arrangements or details thereof, where the measuring technique is not covered by the other groups of this subclass, unspecified or not relevant for measuring angles or tapers; for testing the alignment of axes for testing alignment of axes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/12Computing arrangements based on biological models using genetic models
    • G06N3/126Evolutionary algorithms, e.g. genetic algorithms or genetic programming

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biophysics (AREA)
  • General Physics & Mathematics (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • Theoretical Computer Science (AREA)
  • Biomedical Technology (AREA)
  • Molecular Biology (AREA)
  • Genetics & Genomics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Physiology (AREA)
  • Complex Calculations (AREA)

Abstract

本发明属于精密计量与计算机应用领域,具体涉及一种基于最大实体要求(MMR)圆柱的平行度的数字化评定方法,该方法首先获取实际被测圆柱和实际基准圆柱的关键参数信息并判定该零件是否可以用本方法对其平行度公差的进行评定,然后通过三坐标测量机测得实际被测圆柱和实际基准圆柱的测点数据并分别判断实际被测圆柱和实际基准圆柱的尺寸误差是否合格,然后对实际基准圆柱的测点数据进行拟合,并对实际基准圆柱和实际被测圆柱的测点数据进行坐标变换,然后计算出实际被测圆柱的极限当量直径,最后通过被测圆柱的相关公差要求来判定零件平行度误差的合格性。

The invention belongs to the field of precision measurement and computer application, and in particular relates to a digital evaluation method for the parallelism of a cylinder based on a maximum entity requirement (MMR). Is it possible to use this method to evaluate its parallelism tolerance, and then measure the measurement point data of the actual measured cylinder and the actual reference cylinder through a three-coordinate measuring machine, and judge whether the dimensional errors of the actual measured cylinder and the actual reference cylinder are qualified or not? , and then fit the measurement point data of the actual reference cylinder, and perform coordinate transformation on the measurement point data of the actual reference cylinder and the actual measured cylinder, then calculate the limit equivalent diameter of the actual measured cylinder, and finally pass the measured cylinder. The relevant tolerance requirements are used to determine the eligibility of the parallelism error of the part.

Description

一种基于最大实体要求(MMR)圆柱的平行度评定方法A Method for Evaluating Parallelism of Cylinders Based on Maximum Solid Requirement (MMR)

技术领域technical field

本发明属于精密计量与计算机应用领域,具体涉及一种基于最大实体要求(MMR)圆柱的平行度的数字化评定方法,可用于被测圆柱轴线的平行度公差及其基准圆柱同时应用MMR时产品平行度误差合格性的评定。The invention belongs to the field of precision metrology and computer application, and in particular relates to a digital evaluation method for the parallelism of a cylinder based on a maximum entity requirement (MMR), which can be used for the parallelism tolerance of the axis of the cylinder to be measured and the parallelism of the reference cylinder when the MMR is simultaneously applied to the product. Evaluation of accuracy error compliance.

背景技术Background technique

平行度误差是反映零件加工质量的一项关键参数,它直接影响着产品的装配成功率以及工作寿命。快速有效地评定零件的平行度误差,对提高零件的装配成功率和节省产品的检验成本具有重要的现实意义。形位公差与尺寸公差可以通过公差原则联系在一起,不同的公差原则可以满足不同的使用要求,例如最大实体要求体现了零件的可装配性。Parallelism error is a key parameter that reflects the machining quality of parts, which directly affects the assembly success rate and working life of the product. Evaluating the parallelism error of parts quickly and effectively has important practical significance for improving the success rate of assembly of parts and saving the cost of product inspection. Geometric tolerances and dimensional tolerances can be linked together by tolerance principles. Different tolerance principles can meet different usage requirements. For example, the maximum entity requirement reflects the assemblability of parts.

国家标准GB/T16671-2009中给出了当基准圆柱轴线的平行度公差及其对应基准圆柱都采用MMR时的一些约束,约束如下:1、被测圆柱和基准圆柱都处于最大实体状态;2、被测圆柱和基准圆柱局部尺寸应分别介于其各自最大极限尺寸与最小极限尺寸之间;3、处于最大实体状态下被测圆柱的轴线与处于最大实体状态下基准圆柱的轴线的存在方向之间的关系。The national standard GB/T16671-2009 gives some constraints when MMR is used for the parallelism tolerance of the reference cylinder axis and its corresponding reference cylinder. The constraints are as follows: 1. Both the measured cylinder and the reference cylinder are in the maximum solid state; 2. . The local dimensions of the measured cylinder and the reference cylinder should be between their respective maximum limit size and minimum limit size; 3. The existence direction of the axis of the measured cylinder in the maximum solid state and the axis of the reference cylinder in the maximum solid state The relationship between.

因此,为了检测介于最大极限尺寸与最小极限尺寸之间(评定尺寸误差合格性的方法众多,已经成熟,不属于本发明的范畴)的零件的上述平行度的合格性,国家标准GB/T1958-2004给出了使用具有高精度的、尺寸一定的综合物理量规来检验被测圆柱的上述平行度公差合格性的方法。然而具有高精度的、尺寸一定的物理量规存在生产成本高、测量具有局限性(特定尺寸的量具只能测量特定的零件)等缺点。Therefore, in order to detect the eligibility of the above-mentioned parallelism of parts between the maximum limit size and the minimum limit size (there are many methods for evaluating the eligibility of dimensional errors, which are mature and do not belong to the scope of the present invention), the national standard GB/T1958 -2004 gives a method for checking the eligibility of the above-mentioned parallelism tolerance of the cylinder under test using a comprehensive physical gauge with high precision and a certain size. However, physical gauges with high precision and a certain size have disadvantages such as high production cost and limited measurement (a gauge of a specific size can only measure a specific part).

当被测圆柱轴线的平行度公差有MMR,但其基准圆柱没有MMR时检验被测圆柱的平行度公差是否合格的方法,在精密计量与计算机应用领域可以通过三坐标测量机获得实际被测圆柱及实际基准圆柱上的测点集,然后将实际基准圆柱上的测点进行拟合为理想基准圆柱,进而计算实际被测圆柱的轴线相对于其基准圆柱轴线的平行度误差,并评判实际被测圆柱的平行度是否满足要求。然而,目前还未有有效的数学评定方法来检验被测圆柱的平行度公差及其基准圆柱同时应用MMR时平行度公差的合格性。When the parallelism tolerance of the axis of the measured cylinder has MMR, but the reference cylinder does not have MMR, the method to check whether the parallelism tolerance of the measured cylinder is qualified, in the field of precision measurement and computer applications, the actual measured cylinder can be obtained through a three-coordinate measuring machine. and the set of measuring points on the actual datum cylinder, and then fit the measuring points on the actual datum cylinder to an ideal datum cylinder, and then calculate the parallelism error of the axis of the actual measured cylinder relative to the axis of its datum cylinder, and judge the actual measured point. Check whether the parallelism of the cylinder meets the requirements. However, there is no effective mathematical evaluation method to check the parallelism tolerance of the measured cylinder and its eligibility of the parallelism tolerance when MMR is simultaneously applied to the reference cylinder.

发明内容SUMMARY OF THE INVENTION

本发明所要解决的技术问题是给出了一种基于最大实体要求(MMR)的平行度评定方法,该方法可以实现对被测圆柱轴线的平行度公差及其基准圆柱同时采用MMR时产品的平行度误差合格性的判定,另外该方法可以拓展到其它的被测要素的定向公差及其基准要素都采用MMR时零件定向误差的合格性评定中。The technical problem to be solved by the present invention is to provide a parallelism evaluation method based on the maximum entity requirement (MMR), which can realize the parallelism tolerance of the axis of the measured cylinder and the parallelism of the product when the reference cylinder adopts MMR at the same time. In addition, the method can be extended to the qualification evaluation of the orientation error of the parts when the orientation tolerance of other measured elements and their reference elements are MMR.

为了解决上述问题,本发明是通过以下方案来实现的:In order to solve the above-mentioned problems, the present invention is achieved through the following solutions:

步骤1:判断零件是否适用于本评定方法。从零件图纸上分别获得基准圆柱A、被测圆柱B的关键信息;若被测圆柱B的平行度公差及其相应基准圆柱都采用MMR,而且基准圆柱A的形状公差也采用MMR,则转入步骤2。Step 1: Determine if the part is suitable for this evaluation method. Obtain the key information of the reference cylinder A and the measured cylinder B respectively from the part drawings; if the parallelism tolerance of the measured cylinder B and its corresponding reference cylinder are MMR, and the shape tolerance of the reference cylinder A is also MMR, then transfer to Step 2.

所述基准圆柱A的关键信息有以下几部分内容:基准圆柱的名义直径d 1 、基准圆柱的上偏差、下偏差分别为es 1 ei 1 ;形状公差应用MMR,形状公差为T 1 ;基准圆柱A的长度L 1 The key information of the datum cylinder A has the following contents: the nominal diameter d 1 of the datum cylinder, the upper deviation and the lower deviation of the datum cylinder are es 1 and ei 1 respectively; the shape tolerance is MMR, and the shape tolerance is T 1 ; Length L 1 of cylinder A.

所述被测圆柱B的关键信息有以下几部分内容:被测圆柱的名义直径d 2 ;被测圆柱的上偏差、下偏差分别为es 2 ei 2 ;平行度公差T 2 ;平行度公差及其对应基准都使用MMR。The key information of the tested cylinder B has the following contents: the nominal diameter d 2 of the tested cylinder; the upper and lower deviations of the tested cylinder are es 2 and ei 2 respectively; the parallelism tolerance T 2 ; the parallelism tolerance and its corresponding benchmarks both use MMR.

步骤2:判定实际基准圆柱A的尺寸误差和实际被测圆柱B的尺寸误差是否同时合格。首先使用三坐标测量机分别获取实际基准圆柱A和实际被测圆柱B的轮廓上的测点数据集,然后判定实际基准圆柱A和实际被测圆柱B两者的尺寸误差是否同时合格,若两者尺寸误差都合格,则进入步骤3,否则终止本评定方法。Step 2: Determine whether the size error of the actual reference cylinder A and the size error of the actual measured cylinder B are both qualified. First, use a three-coordinate measuring machine to obtain the measuring point data sets on the contours of the actual reference cylinder A and the actual measured cylinder B , and then determine whether the dimensional errors of the actual reference cylinder A and the actual measured cylinder B are qualified at the same time. If the dimensional errors are all qualified, go to step 3, otherwise terminate the evaluation method.

步骤3:通过计算,拟合出实际基准圆柱A的拟合圆柱A 1 ,在拟合圆柱A 1 上建立局部坐标系,并将三坐标测量机测得的实际基准圆柱A和实际被测圆柱B的测点坐标值进行坐标变换,获得实际基准圆柱A和实际被测圆柱B的测点在该局部坐标系中的坐标值。Step 3: Fit the fitting cylinder A 1 of the actual datum cylinder A through calculation, establish a local coordinate system on the fitting cylinder A 1 , and compare the actual datum cylinder A measured by the three-coordinate measuring machine with the actual measured cylinder. Coordinate transformation is performed on the coordinate value of the measuring point of B to obtain the coordinate value of the measuring point of the actual reference cylinder A and the actual measured cylinder B in the local coordinate system.

步骤4:将实际基准圆柱A相对于其最大实体实效圆柱A 2 的空间位置变动量q A 作为设计变量,以q A 的变动范围作为目标函数的约束条件,并以实际被测圆柱B在不同空间位置时的有定向约束的最小外接圆柱的直径d B,n =f(q A )为目标函数进行优化,通过求解有约束目标优化问题来获得实际被测圆柱B的极限当量尺寸d B,min ,其中,实际被测圆柱B的有定向约束的最小外接圆柱:在实际基准圆柱A在其最大实体实效圆柱A 2 内情况下,以平行于最大实体实效圆柱A 2 的轴线为轴线、能包容实际被测圆柱B的最大理想包容圆柱;实际被测圆柱B的极限当量直径d B,min :实际基准圆柱A相对于其最大实体实效圆柱A 2 的空间位置变动的过程中,通过拟合所得的所有有定向约束的最小外接圆柱中最小的那个圆柱的直径。Step 4: Take the spatial position variation q A of the actual reference cylinder A relative to its largest entity effective cylinder A 2 as the design variable, take the variation range of q A as the constraint condition of the objective function, and use the actual measured cylinder B in different The diameter d B,n = f ( q A ) of the smallest circumscribed cylinder with orientation constraints at the spatial position is optimized as the objective function, and the limit equivalent dimension d B of the actual measured cylinder B is obtained by solving the constrained objective optimization problem , min , among them, the smallest circumscribed cylinder with orientation constraint of the actual measured cylinder B : when the actual reference cylinder A is within its maximum solid effective cylinder A 2 , take the axis parallel to the maximum solid effective cylinder A 2 as the axis, and the energy The maximum ideal accommodating cylinder that contains the actual measured cylinder B ; the limit equivalent diameter d B,min of the actual measured cylinder B : in the process of changing the spatial position of the actual reference cylinder A relative to its largest solid effective cylinder A 2 , by fitting The diameter of the smallest of all resulting smallest circumscribed cylinders with orientation constraints.

步骤5:通过比较被测圆柱B的最大实体实效尺寸d B 和被测圆柱B的极限当量直径d B,min 的大小,来判断实际被测孔B的平行度误差的合格性。Step 5: Judging the eligibility of the parallelism error of the actual measured hole B by comparing the maximum actual size d B of the measured cylinder B and the limit equivalent diameter d B, min of the measured cylinder B.

为了使本发明操作方便,并考虑到形状公差对零件总误差的影响,本发明具体化为:In order to make the present invention easy to operate, and taking into account the influence of shape tolerance on the total error of the parts, the present invention is embodied as:

步骤1:判断零件是否适用于本评定方法。从零件图纸上分别获得基准圆柱A、被测圆柱B的关键信息;若被测圆柱B的平行度公差及其相应基准圆柱都采用MMR,而且基准圆柱A的形状公差也采用MMR,则转入步骤2。Step 1: Determine if the part is suitable for this evaluation method. Obtain the key information of the reference cylinder A and the measured cylinder B respectively from the part drawings; if the parallelism tolerance of the measured cylinder B and its corresponding reference cylinder are MMR, and the shape tolerance of the reference cylinder A is also MMR, then transfer to Step 2.

所述基准圆柱A的关键信息有以下几部分内容:基准圆柱的名义直径d 1 、基准圆柱的上偏差、下偏差分别为es 1 ei 1 ;形状公差应用MMR,形状公差为T 1 ;基准圆柱A的长度L 1 The key information of the datum cylinder A has the following contents: the nominal diameter d 1 of the datum cylinder, the upper deviation and the lower deviation of the datum cylinder are es 1 and ei 1 respectively; the shape tolerance is MMR, and the shape tolerance is T 1 ; Length L 1 of cylinder A.

所述被测圆柱B的关键信息有以下几部分内容:被测圆柱的名义直径d 2 ;被测圆柱的上偏差、下偏差分别为es 2 ei 2 ;平行度公差T 2 ;平行度公差及其相应基准都标有MMR。The key information of the tested cylinder B has the following contents: the nominal diameter d 2 of the tested cylinder; the upper and lower deviations of the tested cylinder are es 2 and ei 2 respectively; the parallelism tolerance T 2 ; the parallelism tolerance and their corresponding benchmarks are marked MMR.

步骤2:判定实际基准圆柱A的尺寸误差和实际被测圆柱B的尺寸误差是否同时合格。首先使用三坐标测量机分别获取实际基准圆柱A和实际被测圆柱B的轮廓上的测点集,这些测点集分别为实际基准圆柱A的测点集{g A,m,0 (x A,m,0 , y A,m,0 , z A,m,0 )},其中,m为实际基准圆柱轮廓上测点的序号,m=1, 2, … , MM为正整数;实际被测圆柱B的测点集{g B,n,0 (x B,n,0 , y B,n,0 , z B,n,0 )},其中,n为实际被测圆柱轮廓上测点的序号,n=1, 2, … , NN为正整数。Step 2: Determine whether the size error of the actual reference cylinder A and the size error of the actual measured cylinder B are both qualified. First, use a three - coordinate measuring machine to obtain the measuring point sets on the contours of the actual reference cylinder A and the actual measured cylinder B , respectively . ,m,0 , y A,m,0 , z A,m,0 )}, where m is the serial number of the measuring point on the actual reference cylinder profile, m =1, 2, … , M , M is a positive integer; The measuring point set of the actual measured cylinder B { g B,n,0 ( x B,n,0 , y B,n,0 , z B,n,0 )}, where n is the The serial number of the measuring point, n = 1, 2, … , N , where N is a positive integer.

然后判定实际基准圆柱A和实际被测圆柱B两者的尺寸误差是否同时合格,若两者尺寸误差都合格,则进入步骤3,否则终止本评定方法。Then determine whether the dimensional errors of the actual reference cylinder A and the actual measured cylinder B are qualified at the same time. If the dimensional errors of both are qualified, go to step 3, otherwise terminate the evaluation method.

步骤3:为了计算方便以及降低后续计算的复杂度,需要先将实际基准圆柱的几何中心粗略地移至局部坐标系的坐标原点,即公式1:g A,m1 = g A,m,0 - ( g A,max + g A,min )/2。g A,max g A,min 分别为实际基准圆柱轮廓测点中离坐标原点最远点和最近点的坐标。随着实际基准圆柱的移动,实际被测圆柱的测点坐标值相应的发生变化,其变化后的坐标值为公式2:g B,n,1 = g B,n,0 - ( g A,max +g A,min )/2。然后,经过拟合获得实际基准圆柱的最小外接圆柱A 1 ,并将最小外接圆柱A 1 的轴线移至局部坐标系的z轴。Step 3: In order to facilitate the calculation and reduce the complexity of subsequent calculations, it is necessary to roughly move the geometric center of the actual reference cylinder to the coordinate origin of the local coordinate system, that is, formula 1: g A,m1 = g A,m,0 - ( g A,max + g A,min )/2. g A,max , g A,min are the coordinates of the farthest point and the nearest point from the coordinate origin in the actual reference cylinder contour measuring points, respectively. With the movement of the actual datum cylinder, the coordinate value of the measuring point of the actual measured cylinder changes accordingly, and the coordinate value after the change is Formula 2: g B,n,1 = g B,n,0 - ( g A, max + g A,min )/2. Then, the smallest circumscribed cylinder A 1 of the actual reference cylinder is obtained by fitting, and the axis of the smallest circumscribed cylinder A 1 is moved to the z -axis of the local coordinate system.

然后计算目标优化问题1:Then compute objective optimization problem 1:

s.t. st.

解得最优解(x 1,min , y 1,min ,μ 1,min ,ν 1,min ),此时得到实际基准圆柱A的最小外接圆柱A 1 The optimal solution ( x 1,min , y 1,min , μ 1,min , ν 1,min ) is obtained, and the smallest circumscribed cylinder A 1 of the actual reference cylinder A is obtained.

将实际基准圆柱轮廓上的测点集{g A,m,1 (x A,m,1 , y A,m,1 , z A,m,1 )}代入下式进行坐标变换,m=1 , 2 , … , MSubstitute the measuring point set { g A,m,1 ( x A,m,1 , y A,m,1 , z A,m,1 )} on the outline of the actual reference cylinder into the following formula for coordinate transformation, m =1 , 2 , … , M ;

即可得到变换后实际基准圆柱轮廓上的测点集{g A,m (x A,m , y A,m , z A,m )}。The set of measuring points { g A,m ( x A,m , y A,m , z A,m )} on the contour of the actual reference cylinder after transformation can be obtained.

将实际被测圆柱轮廓上的测点集{g B,n,1 (x B,n,1 , y B,n,1 , z B,n,1 )}代入下式进行坐标变换,n=1 , 2 , … , NSubstitute the measuring point set { g B,n,1 ( x B,n,1 , y B,n,1 , z B,n,1 )} on the actual measured cylindrical contour into the following formula to perform coordinate transformation, n = 1 , 2 , … , N ;

即可得到变换后实际被测圆柱轮廓上的测点集{g B,n (x B,n , y B,n , z B,n )}。The set of measuring points { g B,n ( x B,n , y B,n , z B,n )} on the actual measured cylindrical contour after transformation can be obtained.

步骤4:首先通过公式3 :d A = d 1 +es 1 +T 1 ,获得基准圆柱A的最大实体实效圆柱A 2 的直径d A Step 4: First, through formula 3: d A = d 1 + es 1 + T 1 , obtain the diameter d A of the largest solid effective cylinder A 2 of the reference cylinder A ;

然后,求解目标优化问题2:Then, solve objective optimization problem 2:

s.t. st.

解得实际被测圆柱B的极限当量直径d B,min =mind B,n Solve the limit equivalent diameter d B,min =min d B,n of the actual measured cylinder B.

步骤5:通过公式4:d B = d 2 +es 2 +T 2 ,计算被测孔B的最大实体实效圆柱B 2 的直径d B Step 5: Calculate the diameter d B of the largest solid effective cylinder B 2 of the measured hole B by formula 4: d B = d 2 + es 2 + T 2 .

若被测圆柱B的极限当量直径d B,min d B ,则可判定实际被测圆柱的平行度误差合格,否则得出实际被测圆柱的平行度误差不合格。If the limit equivalent diameter of the tested cylinder B d B,min d B , it can be determined that the parallelism error of the actual measured cylinder is qualified, otherwise the parallelism error of the actual measured cylinder is unqualified.

在本发明中,需要求解目标优化问题1和目标优化问题2,这两个目标优化问题存在以下两个相同的特点:目标函数值在最优解附近不会有明显的下降;一般情况下需要给出多个可行的初始解。根据上述目标优化问题的特点,本发明给出遗传算法来求解目标优化问题1和目标优化问题2,该算法的具体步骤如下:In the present invention, the objective optimization problem 1 and the objective optimization problem 2 need to be solved. These two objective optimization problems have the following two identical characteristics: the objective function value will not drop significantly near the optimal solution; Give multiple feasible initial solutions. According to the characteristics of the above-mentioned objective optimization problem, the present invention provides a genetic algorithm to solve the objective optimization problem 1 and the objective optimization problem 2. The specific steps of the algorithm are as follows:

步骤11:首先初始化种群的参数,这些参数存在以下几方面内容:种群的规模N S 、每个个体的长度R、最大进化代数K、交叉概率W、变异概率CStep 11: First initialize the parameters of the population. These parameters have the following contents: the size of the population N S , the length of each individual R , the maximum evolutionary generation K , the crossover probability W , and the mutation probability C .

步骤12:定义N S 个个体P S,q (P S,q,1 , P S,q,2 , … , P S,q,r ),每个个体的值与目标优化问题中的可行解(x 1 , x 2 , … , x r )具有一一对应的关系,且P S,q,r x r 的具有相同的取值范围;q=1, 2, … , N S r=1, 2, … , R;由所有个体构成的集合为{P S,q }。Step 12: Define N S individuals P S,q ( P S,q,1 , P S,q,2 , … , P S,q,r ), the value of each individual and the feasible solution in the objective optimization problem ( x 1 , x 2 , … , x r ) has a one-to-one correspondence, and P S, q, r and x r have the same value range; q =1, 2, … , N S ; r = 1, 2, … , R ; the set consisting of all individuals is { P S, q }.

步骤13:按照均匀分布,在 P S,q,r 取值范围内随机获得N S 个个体P S,q n=1, … ,N S r=1, 2, … , RStep 13: According to a uniform distribution, randomly obtain N S individuals P S,q within the value range of P S,q,r ; n =1, ... , N S ; r =1, 2, ... , R .

P S,q,r 的值作为上述目标优化问题中x r 的值,计算其目标函数值f q =f(x 1 , x 2 , …, x r ); q=1, 2, … , N S r=1, 2, … , RTaking the value of P S, q, r as the value of x r in the above objective optimization problem, calculate its objective function value f q = f ( x 1 , x 2 , …, x r ); q =1, 2, … , N S ; r =1, 2, … , R .

记录此时最优目标函数值f min =minf q ,并记录全局最优目标函数值所对应的最优解P S,min q=1, 2, … , N S Record the optimal objective function value f min =min f q at this time, and record the optimal solution P S,min , q =1, 2, … , N S corresponding to the global optimal objective function value.

步骤14:从上述种群{P S,q }中以一定的概率随机选取个体用于步骤15和步骤16的操作。个体P S,q 被选中的概率为公式5:Step 14: Randomly select individuals from the above-mentioned population { P S, q } with a certain probability for the operations of Step 15 and Step 16 . The probability that the individual P S,q is selected is Equation 5:

,

q=1,2,…,N S q = 1, 2, ..., N S .

步骤15:从种群{P S,q }中随机选择两个个体P S,k P S,l ,将个体P S,k 中的第i个元素P S,k,i 与个体P S,l 中的第j个元素P S,l,j 按照公式6进行交叉操作,其中k, l=1, 2, … , N S i, j=1, 2, … , R。公式6:P S,k,i = P S,k,i (1-W)+ P S,l,j WP S,k,j = P S,k,j (1-W)+ P S,l,i W,其中,W是[0,1]区间内的随机数。Step 15: Randomly select two individuals P S,k and P S,l from the population { P S,q }, and compare the i -th element P S,k,i in the individual P S ,k with the individual P S, The jth element P S,l,j in l is crossed according to formula 6, where k, l =1, 2, … , N S ; i, j =1, 2, … , R . Equation 6: P S,k,i = P S,k,i (1- W )+ P S,l,j W ; P S,k,j = P S,k,j (1- W )+ P S,l,i W , where W is a random number in the interval [0,1].

步骤16:从种群{P S,q }中随机选择一个个体P S,h ,将P S,h 中的第t个元素按照公式7进行变异操作,公式7:Step 16: Randomly select an individual P S,h from the population { P S,q }, and perform mutation operation on the t -th element in P S,h according to formula 7, formula 7:

其中,P min P max 分别为P S,h,t 取值范围的下界、上界;k为当前迭代次数;K为最大进化次数;C为[0,1]区间内的随机数。Among them, P min and P max are the lower and upper bounds of the value range of P S,h,t respectively; k is the current iteration number; K is the maximum evolution number; C is a random number in the [0,1] interval.

步骤17:经过步骤15和步骤16,形成新的种群{P S,q }。将(x 1 , x 2 , … , x r )=P S,q 代入有目标优化问题的约束方程;如果个体满足约束方程,则可计算该个体对应的目标函数值f q Step 17: After Step 15 and Step 16, a new population { P S, q } is formed. Substitute ( x 1 , x 2 , . _

f min f q ,则更新最优解为P S,min =P S,q ,且更新其对应的目标函数最优值f min =f q q=1,2, … , N S r=1, 2, … , RIf f min f q , update the optimal solution to P S,min = P S,q , and update the corresponding optimal value of the objective function f min = f q ; q =1,2, … , N S ; r =1, 2, … , R .

步骤18:如果遗传算法的进化代数大于最大进化代数K,则停止迭代,且输出目标优化问题的最优解P S,min 和其相对应的目标函数值f min ,否则将此时的种群{P S,q }作为下一次进化的初始种群,并跳转至步骤14继续寻优。Step 18: If the evolutionary algebra of the genetic algorithm is greater than the maximum evolutionary algebra K , stop the iteration, and output the optimal solution P S,min of the objective optimization problem and its corresponding objective function value f min , otherwise the population { P S, q } is used as the initial population for the next evolution, and jumps to step 14 to continue the optimization.

为了增加本方法的可操作性,可将前述遗传算法的初始参数设置如下:种群的规模N S 为20、每个个体的长度R为4、最大进化代数K为200、交叉概率W为0.6、变异概率C为0.1。In order to increase the operability of this method, the initial parameters of the aforementioned genetic algorithm can be set as follows: the size of the population N S is 20, the length R of each individual is 4, the maximum evolutionary generation K is 200, the crossover probability W is 0.6, The mutation probability C is 0.1.

为了使本发明的计算更加有效率,可用下述算法求解计算本发明中的目标优化问题1:In order to make the calculation of the present invention more efficient, the following algorithm can be used to solve and calculate the target optimization problem 1 in the present invention:

步骤21:首先初始化种群的参数,这些参数存在以下几方面内容:种群的规模N S 、每个个体的长度R、最大进化代数K、交叉概率W、变异概率CStep 21: First initialize the parameters of the population. These parameters have the following contents: the size of the population N S , the length R of each individual, the maximum evolutionary generation K , the crossover probability W , and the mutation probability C .

步骤22:设置N S 个个体P S,q (P S,q,1 , P S,q,2 , P S,q,3 , P S,q,4 ),它的值与目标优化问题1中的解(x 1 , y 1 , α 1 , β 1 )相对应,q=1, 2, … , N S ;由所有个体构成的集合为{P S,q }。Step 22: Set N S individuals P S,q ( P S,q,1 , P S,q,2 , P S,q,3 , P S,q,4 ), whose value is the same as the target optimization problem 1 The solutions in ( x 1 , y 1 , α 1 , β 1 ) correspond to, q =1, 2, … , N S ; the set consisting of all individuals is { P S,q }.

步骤23:按照均匀分布,分别在 P S,q,1 , P S,q,2 , P S,q,3 , P S,q,4 取值范围内随机获得N S 个值,以生成N S 个个体P S,q q =1, … ,N S Step 23: According to uniform distribution, randomly obtain N S values within the value range of P S,q,1 , P S,q,2 , P S,q,3 , P S,q,4 to generate N S individuals P S,q ; q =1, . . . , N S .

P S,q,1 , P S,q,2 , P S,q,3 , P S,q,4 的值分别作为上述目标优化问题1中自变量x 1 , y 1 ,α 1 , β 1 的值,并计算其对应目标函数值d A,q q=1, 2, … , N S Take the values of P S,q,1 , P S,q,2 , P S,q,3 , P S,q,4 as the independent variables x 1 , y 1 , α 1 , β in the above objective optimization problem 1, respectively 1 , and calculate its corresponding objective function value d A, q ; q =1, 2, … , N S ;

记录此时最优目标函数值d A,min =min(d A,q,min ),并记录最优函数值所对应的最优解P S,min Record the optimal objective function value d A,min =min( d A,q,min ) at this time, and record the optimal solution P S,min corresponding to the optimal function value.

步骤24:从上述种群{P S,q }中以一定的概率随机选取个体用于步骤25和步骤26的操作。个体P S,q 被选中的概率为公式5:Step 24: Randomly select individuals from the above-mentioned population { P S, q } with a certain probability for the operations of Step 25 and Step 26 . The probability that the individual P S,q is selected is Equation 5:

,

q=1,2,…,N S q = 1, 2, ..., N S .

步骤25:从种群{P S,q }中随机选择两个个体P S,k P S,l ,将个体P S,k 中的第i个元素P S,k,i 与个体P S,l 中的第j个元素P S,l,j 按照公式6进行交叉操作,其中k, l=1, 2, … , N S i, j=1, 2, 3, 4。公式6:P S,k,i = P S,k,i (1-W)+ P S,l,j WP S,k,j = P S,k,j (1-W)+ P S,l,i W,其中,W是[0,1]区间内的随机数。Step 25: Randomly select two individuals P S,k and P S,l from the population { P S,q }, and compare the i -th element P S,k,i in the individual P S ,k with the individual P S, The jth element P S,l,j in l is crossed according to formula 6, where k, l =1, 2, … , N S ; i, j =1, 2, 3, 4. Equation 6: P S,k,i = P S,k,i (1- W )+ P S,l,j W ; P S,k,j = P S,k,j (1- W )+ P S,l,i W , where W is a random number in the interval [0,1].

步骤26:从种群{P S,q }中随机选择一个个体P S,h ,将P S,h 中的第t个元素按照公式7进行变异操作,公式7:Step 26: Randomly select an individual P S,h from the population { P S,q }, and perform mutation operation on the t -th element in P S,h according to formula 7, formula 7:

其中,P min P max 分别为P S,h,t 取值范围的下界、上界;k为当前迭代次数;K为最大进化次数;C为[0,1]区间内的随机数。Among them, P min and P max are the lower and upper bounds of the value range of P S,h,t respectively; k is the current iteration number; K is the maximum evolution number; C is a random number in the [0,1] interval.

步骤27:经过步骤25和步骤26,形成新的种群{P S,q }。将(x 1 , x 2 , … , x r )=P S,q 代入有目标优化问题的约束方程;如果个体满足约束方程,则可计算该个体对应的目标函数值f q Step 27: After Step 25 and Step 26, a new population { P S, q } is formed. Substitute ( x 1 , x 2 , . _

f min f q ,则更新最优解为P S,min =P S,q ,且更新其对应的目标函数最优值f min =f q q=1,2, … , 20;r=1, 2, … , 4。If f min f q , update the optimal solution to P S,min = P S,q , and update the corresponding optimal value of the objective function f min = f q ; q =1,2, … , 20; r =1, 2, … , 4.

步骤28:如果遗传算法的进化代数大于最大进化代数200,则停止迭代,且输出目标优化问题的最优解(x 1 , y 1 , α 1 , β 1 )=P S,min 和其相对应的目标函数值d A,min =min(d A,q,max ),否则将此时的种群{P S,q }作为下一次进化的初始种群,并跳转至步骤24继续寻优。Step 28: If the evolutionary algebra of the genetic algorithm is greater than the maximum evolutionary algebra of 200, stop the iteration, and output the optimal solution of the target optimization problem ( x 1 , y 1 , α 1 , β 1 ) = P S,min and its corresponding The objective function value d A,min =min( d A,q,max ), otherwise the population at this time { P S, q } is used as the initial population of the next evolution, and jump to step 24 to continue the optimization.

为了使本发明的计算更加有效率,可用下述算法求解计算本发明中的目标优化问题2:In order to make the calculation of the present invention more efficient, the following algorithm can be used to solve and calculate the target optimization problem 2 in the present invention:

步骤31:首先初始化种群的参数,这些参数存在以下几方面内容:种群的规模N S 、每个个体的长度R、最大进化代数K、交叉概率W、变异概率CStep 31: First initialize the parameters of the population. These parameters have the following contents: the size of the population N S , the length R of each individual, the maximum evolutionary generation K , the crossover probability W , and the mutation probability C .

步骤32:设置N S 个个体P S,q (P S,q,1 , P S,q,2 , P S,q,3 , P S,q,4 ),它的值与目标优化问题2中的解(x 0 , y 0 , , )一一对应,q=1, 2, … , N S ;由所有个体构成的集合为{P S,q }。Step 32: Set N S individuals P S,q ( P S,q,1 , P S,q,2 , P S,q,3 , P S,q,4 ), whose value is the same as the target optimization problem 2 The solutions in ( x 0 , y 0 , , ) correspond one-to-one, q =1, 2, … , N S ; the set composed of all individuals is { P S,q }.

步骤33:按照均匀分布,分别在 P S,q,1 , P S,q,2 , P S,q,3 , P S,q,4 取值范围内随机获得N S 个值,以生成N S 个个体P S,q q =1, … ,N S Step 33: According to a uniform distribution, randomly obtain N S values within the value range of P S,q,1 , P S,q,2 , P S,q,3 , P S,q,4 to generate N S individuals P S,q ; q =1, . . . , N S .

P S,q,1 , P S,q,2 , P S,q,3 , P S,q,4 的值分别作为上述目标优化问题2中自变量x 0 , y 0 ,, 的值,并计算其对应目标函数值d B,q q=1, 2, … , N S Take the values of P S,q,1 , P S,q,2 , P S,q,3 , P S,q,4 as the independent variables x 0 , y 0 , , in the above objective optimization problem 2, respectively value, and calculate its corresponding objective function value d B,q ; q =1, 2, … , N S ;

记录此时最优目标函数值d B,min =min(d B,q,min ),并记录最优函数值所对应的最优解P S,min Record the optimal objective function value d B,min =min( d B,q,min ) at this time, and record the optimal solution P S,min corresponding to the optimal function value.

步骤34:从上述种群{P S,q }中以一定的概率随机选取个体用于步骤35和步骤36的操作。个体P S,q 被选中的概率为公式5:Step 34: Randomly select individuals from the above-mentioned population { P S, q } with a certain probability for the operations of Step 35 and Step 36 . The probability that the individual P S,q is selected is Equation 5:

,

q=1,2,…,N S q = 1, 2, ..., N S .

步骤35:从种群{P S,q }中随机选择两个个体P S,k P S,l ,将个体P S,k 中的第i个元素P S,k,i 与个体P S,l 中的第j个元素P S,l,j 按照公式6进行交叉操作,其中k, l=1, 2, … , N S i, j=1, 2, 3, 4。公式6:P S,k,i = P S,k,i (1-W)+ P S,l,j WP S,k,j = P S,k,j (1-W)+ P S,l,i W,其中,W是[0,1]区间内的随机数。Step 35: Randomly select two individuals P S,k and P S,l from the population { P S,q }, and compare the i -th element P S,k,i in the individual P S ,k with the individual P S, The jth element P S,l,j in l is crossed according to formula 6, where k, l =1, 2, … , N S ; i, j =1, 2, 3, 4. Equation 6: P S,k,i = P S,k,i (1- W )+ P S,l,j W ; P S,k,j = P S,k,j (1- W )+ P S,l,i W , where W is a random number in the interval [0,1].

步骤36:从种群{P S,q }中随机选择一个个体P S,h ,将P S,h 中的第t个元素按照公式7进行变异操作,公式7:Step 36: Randomly select an individual P S,h from the population { P S,q }, and perform mutation operation on the t -th element in P S,h according to formula 7, formula 7:

其中,P min P max 分别为P S,h,t 取值范围的下界、上界;k为当前迭代次数;K为最大进化次数;C为[0,1]区间内的随机数。Among them, P min and P max are the lower and upper bounds of the value range of P S,h,t respectively; k is the current iteration number; K is the maximum evolution number; C is a random number in the [0,1] interval.

步骤37:经过步骤35和步骤36,形成新的种群{P S,q }。将(x 1 , x 2 , … , x r )=P S,q 代入有目标优化问题的约束方程;如果个体满足约束方程,则可计算该个体对应的目标函数值f q Step 37: After Step 35 and Step 36, a new population { P S, q } is formed. Substitute ( x 1 , x 2 , . _

f min f q ,则更新最优解为P S,min =P S,q ,且更新其对应的目标函数最优值f min =f q q=1,2, … , 20;r=1, 2, … , 4。If f min f q , update the optimal solution to P S,min = P S,q , and update the corresponding optimal value of the objective function f min = f q ; q =1,2, … , 20; r =1, 2, … , 4.

步骤38:如果遗传算法的进化代数大于最大进化代数200,则停止迭代,且输出目标优化问题的最优解(x 0 , y 0 , , )=P S,min 和其相对应的目标函数值d B,min =min(d B,q,min ),否则将此时的种群{P S,q }作为下一次进化的初始种群,并跳转至步骤34继续寻优。Step 38: If the evolutionary algebra of the genetic algorithm is greater than the maximum evolutionary algebra of 200, stop the iteration, and output the optimal solution of the target optimization problem ( x 0 , y 0 , , ) = P S,min and its corresponding target The function value d B,min =min( d B,q,min ), otherwise, the population { P S,q } at this time is used as the initial population of the next evolution, and jump to step 34 to continue the optimization.

附图说明Description of drawings

图1,本发明的基本方法的流程图。Figure 1 is a flow chart of the basic method of the present invention.

图2,本发明中求解目标优化问题的遗传算法的基本流程图。Fig. 2 is the basic flow chart of the genetic algorithm for solving the target optimization problem in the present invention.

图3,实验对象的零件设计图。Figure 3. Parts design diagram of the experimental object.

具体实施方式Detailed ways

实验实施实例:Experiment implementation example:

步骤1:判断零件是否适用于本评定方法。从零件图纸上分别获得基准圆柱A、被测圆柱B的关键信息;若被测圆柱B的平行度公差及其相应基准圆柱都采用MMR,而且基准圆柱A的形状公差也采用MMR,则转入步骤2。Step 1: Determine if the part is suitable for this evaluation method. Obtain the key information of the reference cylinder A and the measured cylinder B respectively from the part drawings; if the parallelism tolerance of the measured cylinder B and its corresponding reference cylinder are MMR, and the shape tolerance of the reference cylinder A is also MMR, then transfer to Step 2.

所述基准圆柱A的关键信息有以下几部分内容:基准圆柱的名义直径d 1 、基准圆柱的上偏差、下偏差分别为es 1 ei 1 ;形状公差应用MMR,形状公差为T 1 ;基准圆柱A的长度L 1 The key information of the datum cylinder A has the following contents: the nominal diameter d 1 of the datum cylinder, the upper deviation and the lower deviation of the datum cylinder are es 1 and ei 1 respectively; the shape tolerance is MMR, and the shape tolerance is T 1 ; Length L 1 of cylinder A.

所述被测圆柱B的关键信息有以下几部分内容:被测圆柱的名义直径d 2 ;被测圆柱的上偏差、下偏差分别为es 2 ei 2 ;平行度公差T 2 ;平行度公差及其相应基准都标有MMR。The key information of the tested cylinder B has the following contents: the nominal diameter d 2 of the tested cylinder; the upper and lower deviations of the tested cylinder are es 2 and ei 2 respectively; the parallelism tolerance T 2 ; the parallelism tolerance and their corresponding benchmarks are marked MMR.

步骤2:判定实际基准圆柱A的尺寸误差和实际被测圆柱B的尺寸误差是否同时合格。首先使用三坐标测量机分别获取实际基准圆柱A和实际被测圆柱B的轮廓上的测点集,这些测点集分别为实际基准圆柱A的测点集{g A,m,0 (x A,m,0 , y A,m,0 , z A,m,0 )},其中,n为实际基准圆柱轮廓上测点的序号,m=1, 2, … , MM为正整数;实际被测圆柱B的测点集{g B,n,0 (x B,n,0 , y B,n,0 , z B,n,0 )},其中,n为实际被测圆柱轮廓上测点的序号,n=1, 2, … , NN为正整数。Step 2: Determine whether the size error of the actual reference cylinder A and the size error of the actual measured cylinder B are both qualified. First, use a three - coordinate measuring machine to obtain the measuring point sets on the contours of the actual reference cylinder A and the actual measured cylinder B , respectively . ,m,0 , y A,m,0 , z A,m,0 )}, where n is the serial number of the measuring point on the actual reference cylinder profile, m =1, 2, … , M , M is a positive integer; The measuring point set of the actual measured cylinder B { g B,n,0 ( x B,n,0 , y B,n,0 , z B,n,0 )}, where n is the The serial number of the measuring point, n = 1, 2, … , N , where N is a positive integer.

然后判定实际基准圆柱A和实际被测圆柱B两者的尺寸误差是否同时合格,若两者尺寸误差都合格,则进入步骤3,否则终止本评定方法。Then determine whether the dimensional errors of the actual reference cylinder A and the actual measured cylinder B are qualified at the same time. If the dimensional errors of both are qualified, go to step 3, otherwise terminate the evaluation method.

步骤3:为了计算方便以及降低后续计算的复杂度,需要先将实际基准圆柱的几何中心粗略地移至局部坐标系的坐标原点,即公式1:g A,m1 = g A,m,0 - ( g A,max + g A,min )/2。g A,max g A,min 分别为实际基准圆柱轮廓测点中离坐标原点最远点和最近点的坐标。随着实际基准圆柱的移动,实际被测圆柱的测点坐标值相应的发生变化,其变化后的坐标值为公式2:g B,n,1 = g B,n,0 - ( g A,max +g A,min )/2。然后,经过拟合获得实际基准圆柱的最小外接圆柱A 1 ,并将最小外接圆柱A 1 的轴线移至局部坐标系的z轴。Step 3: In order to facilitate the calculation and reduce the complexity of subsequent calculations, it is necessary to roughly move the geometric center of the actual reference cylinder to the coordinate origin of the local coordinate system, that is, formula 1: g A,m1 = g A,m,0 - ( g A,max + g A,min )/2. g A,max , g A,min are the coordinates of the farthest point and the nearest point from the coordinate origin in the actual reference cylinder contour measuring points, respectively. With the movement of the actual datum cylinder, the coordinate value of the measuring point of the actual measured cylinder changes accordingly, and the coordinate value after the change is Formula 2: g B,n,1 = g B,n,0 - ( g A, max + g A,min )/2. Then, the smallest circumscribed cylinder A 1 of the actual reference cylinder is obtained by fitting, and the axis of the smallest circumscribed cylinder A 1 is moved to the z -axis of the local coordinate system.

然后计算目标优化问题1:Then compute objective optimization problem 1:

s.t. st.

步骤21:首先初始化种群的参数,这些参数存在以下几方面内容:种群的规模N S 为20、每个个体的长度R为4、最大进化代数K为200、交叉概率W为0.6、变异概率C为0.1。Step 21: First initialize the parameters of the population. These parameters have the following contents: the size of the population N S is 20, the length R of each individual is 4, the maximum evolutionary generation K is 200, the crossover probability W is 0.6, and the mutation probability C is is 0.1.

步骤22:设置N S 个个体P S,q (P S,q,1 , P S,q,2 , P S,q,3 , P S,q,4 ),它的值与目标优化问题1中的解(x 1 , y 1 , α 1 , β 1 )相对应,q=1, 2, … , 20;由所有个体构成的集合为{P S,q }。Step 22: Set N S individuals P S,q ( P S,q,1 , P S,q,2 , P S,q,3 , P S,q,4 ), whose value is the same as the target optimization problem 1 The solutions in ( x 1 , y 1 , α 1 , β 1 ) correspond to, q =1, 2, … , 20; the set composed of all individuals is { P S,q }.

步骤23:按照均匀分布,分别在 P S,q,1 , P S,q,2 , P S,q,3 , P S,q,4 取值范围内随机获得N S 个值,以生成N S 个个体P S,q q =1, … ,20。Step 23: According to uniform distribution, randomly obtain N S values within the value range of P S,q,1 , P S,q,2 , P S,q,3 , P S,q,4 to generate N S individuals P S,q ; q = 1, . . . , 20.

P S,q,1 , P S,q,2 , P S,q,3 , P S,q,4 的值分别作为上述目标优化问题1中自变量x 1 , y 1 ,α 1 , β 1 的值,并计算其对应目标函数值d A,q q=1, 2, … , 20;Take the values of P S,q,1 , P S,q,2 , P S,q,3 , P S,q,4 as the independent variables x 1 , y 1 , α 1 , β in the above objective optimization problem 1, respectively 1 , and calculate its corresponding objective function value d A,q ; q =1, 2, … , 20;

记录此时最优目标函数值d A,min =min(d A,q,min ),并记录最优函数值所对应的最优解P S,min Record the optimal objective function value d A,min =min( d A,q,min ) at this time, and record the optimal solution P S,min corresponding to the optimal function value.

步骤24:从上述种群{P S,q }中以一定的概率随机选取个体用于步骤25和步骤26的操作。个体P S,q 被选中的概率为公式5:Step 24: Randomly select individuals from the above-mentioned population { P S, q } with a certain probability for the operations of Step 25 and Step 26 . The probability that the individual P S,q is selected is Equation 5:

,

q=1,2,…,20。 q = 1, 2, ..., 20.

步骤25:从种群{P S,q }中随机选择两个个体P S,k P S,l ,将个体P S,k 中的第i个元素P S,k,i 与个体P S,l 中的第j个元素P S,l,j 按照公式6进行交叉操作,其中k, l=1, 2, … , N S i, j=1, 2, 3, 4。公式6:P S,k,i = P S,k,i (1-0.6)+ P S,l,j 0.6;P S,k,j = P S,k,j (1-0.6)+ P S,l,i 0.6,其中,W是[0,1]区间内的随机数。Step 25: Randomly select two individuals P S,k and P S,l from the population { P S,q }, and compare the i -th element P S,k,i in the individual P S ,k with the individual P S, The jth element P S,l,j in l is crossed according to formula 6, where k, l =1, 2, … , N S ; i, j =1, 2, 3, 4. Equation 6: P S,k,i = P S,k,i (1-0.6)+ P S,l,j 0.6; P S,k,j = P S,k,j (1-0.6)+ P S,l,i 0.6, where W is a random number in the interval [0,1].

步骤26:从种群{P S,q }中随机选择一个个体P S,h ,将P S,h 中的第t个元素按照公式7进行变异操作,公式7:Step 26: Randomly select an individual P S,h from the population { P S,q }, and perform mutation operation on the t -th element in P S,h according to formula 7, formula 7:

其中,P min P max 分别为P S,h,t 取值范围的下界、上界;k为当前迭代次数;C为[0,1]区间内的随机数。Among them, P min and P max are the lower bound and upper bound of the value range of P S, h, t respectively; k is the current iteration number; C is a random number in the [0,1] interval.

步骤27:经过步骤25和步骤26,形成新的种群{P S,q }。将(x 1 , x 2 , … , x r )=P S,q 代入有目标优化问题的约束方程;如果个体满足约束方程,则可计算该个体对应的目标函数值f q Step 27: After Step 25 and Step 26, a new population { P S, q } is formed. Substitute ( x 1 , x 2 , . _

f min f q ,则更新最优解为P S,min =P S,q ,且更新其对应的目标函数最优值f min =f q q=1,2, … , 20;r=1, 2, … , 4。If f min f q , update the optimal solution to P S,min = P S,q , and update the corresponding optimal value of the objective function f min = f q ; q =1,2, … , 20; r =1, 2, … , 4.

步骤28:如果遗传算法的进化代数大于最大进化代数200,则停止迭代,且输出目标优化问题的最优解(x 1 , y 1 , α 1 , β 1 )=P S,min 和其相对应的目标函数值d A,min =min(d A,q,max ),否则将此时的种群{P S,q }作为下一次进化的初始种群,并跳转至步骤24继续寻优。Step 28: If the evolutionary algebra of the genetic algorithm is greater than the maximum evolutionary algebra of 200, stop the iteration, and output the optimal solution of the target optimization problem ( x 1 , y 1 , α 1 , β 1 ) = P S,min and its corresponding The objective function value d A,min =min( d A,q,max ), otherwise the population at this time { P S, q } is used as the initial population of the next evolution, and jump to step 24 to continue the optimization.

解得最优解(x 1,min , y 1,min ,μ 1,min ,ν 1,min ),此时得到实际基准圆柱A的最小外接圆柱A 1 的直径d A,min= mind A,m m=1 , 2 , … , MThe optimal solution ( x 1,min , y 1,min , μ 1,min , ν 1,min ) is obtained, and the diameter d A,min= min d A of the smallest circumscribed cylinder A 1 of the actual reference cylinder A is obtained at this time ,m , m =1 , 2 , … , M .

将实际基准圆柱轮廓上的测点集{g A,m,1 (x A,m,1 , y A,m,1 , z A,m,1 )}代入下式进行坐标变换,m=1 , 2 , … , MSubstitute the measuring point set { g A,m,1 ( x A,m,1 , y A,m,1 , z A,m,1 )} on the outline of the actual reference cylinder into the following formula for coordinate transformation, m =1 , 2 , … , M ;

即可得到变换后实际基准圆柱轮廓上的测点集{g A,m (x A,m , y A,m , z A,m )}。The set of measuring points { g A,m ( x A,m , y A,m , z A,m )} on the contour of the actual reference cylinder after transformation can be obtained.

将实际被测圆柱轮廓上的测点集{g B,n,1 (x B,n,1 , y B,n,1 , z B,n,1 )}代入下式进行坐标变换,n=1 , 2 , … , NSubstitute the measuring point set { g B,n,1 ( x B,n,1 , y B,n,1 , z B,n,1 )} on the actual measured cylindrical contour into the following formula to perform coordinate transformation, n = 1 , 2 , … , N ;

即可得到变换后实际被测圆柱轮廓上的测点集{g B,n (x B,n , y B,n , z B,n )}。The set of measuring points { g B,n ( x B,n , y B,n , z B,n )} on the actual measured cylindrical contour after transformation can be obtained.

步骤4:首先通过公式3 :d A = d 1 +es 1 +T 1 ,获得基准圆柱A的最大实体实效圆柱A 2 的直径d A Step 4: First, through formula 3: d A = d 1 + es 1 + T 1 , obtain the diameter d A of the largest solid effective cylinder A 2 of the reference cylinder A ;

然后,求解目标优化问题2:Then, solve objective optimization problem 2:

s.t. st.

步骤31:首先初始化种群的参数,这些参数存在以下几方面内容:种群的规模N S 为20、每个个体的长度R为4、最大进化代数K为200、交叉概率W为0.6、变异概率C为0.1。Step 31: First initialize the parameters of the population. These parameters have the following contents: the size of the population N S is 20, the length R of each individual is 4, the maximum evolutionary generation K is 200, the crossover probability W is 0.6, and the mutation probability C is is 0.1.

步骤32:设置N S 个个体P S,q (P S,q,1 , P S,q,2 , P S,q,3 , P S,q,4 ),它的值与目标优化问题1中的解(x 1 , y 1 , α 1 , β 1 )相对应,q=1, 2, … , 20;由所有个体构成的集合为{P S,q }。Step 32: Set N S individuals P S,q ( P S,q,1 , P S,q,2 , P S,q,3 , P S,q,4 ), whose value is the same as the target optimization problem 1 The solutions in ( x 1 , y 1 , α 1 , β 1 ) correspond to, q =1, 2, … , 20; the set composed of all individuals is { P S,q }.

步骤33:按照均匀分布,分别在 P S,q,1 , P S,q,2 , P S,q,3 , P S,q,4 取值范围内随机获得N S 个值,以生成N S 个个体P S,q q =1, … ,20。Step 33: According to a uniform distribution, randomly obtain N S values within the value range of P S,q,1 , P S,q,2 , P S,q,3 , P S,q,4 to generate N S individuals P S,q ; q = 1, . . . , 20.

P S,q,1 , P S,q,2 , P S,q,3 , P S,q,4 的值分别作为上述目标优化问题1中自变量x 1 , y 1 ,α 1 , β 1 的值,并计算其对应目标函数值d A,q q=1, 2, … , 20;Take the values of P S,q,1 , P S,q,2 , P S,q,3 , P S,q,4 as the independent variables x 1 , y 1 , α 1 , β in the above objective optimization problem 1, respectively 1 , and calculate its corresponding objective function value d A,q ; q =1, 2, … , 20;

记录此时最优目标函数值d A,min =min(d A,q,min ),并记录最优函数值所对应的最优解P S,min Record the optimal objective function value d A,min =min( d A,q,min ) at this time, and record the optimal solution P S,min corresponding to the optimal function value.

步骤34:从上述种群{P S,q }中以一定的概率随机选取个体用于步骤25和步骤26的操作。个体P S,q 被选中的概率为公式5:Step 34: Randomly select individuals from the above-mentioned population { P S, q } with a certain probability for the operations of Step 25 and Step 26 . The probability that the individual P S,q is selected is Equation 5:

,

q=1,2,…,20。 q = 1, 2, ..., 20.

步骤35:从种群{P S,q }中随机选择两个个体P S,k P S,l ,将个体P S,k 中的第i个元素P S,k,i 与个体P S,l 中的第j个元素P S,l,j 按照公式6进行交叉操作,其中k, l=1, 2, … , N S i, j=1, 2, 3, 4。公式6:P S,k,i = P S,k,i (1-0.6)+ P S,l,j 0.6;P S,k,j = P S,k,j (1-0.6)+ P S,l,i 0.6,其中,W是[0,1]区间内的随机数。Step 35: Randomly select two individuals P S,k and P S,l from the population { P S,q }, and compare the i -th element P S,k,i in the individual P S ,k with the individual P S, The jth element P S,l,j in l is crossed according to formula 6, where k, l =1, 2, … , N S ; i, j =1, 2, 3, 4. Equation 6: P S,k,i = P S,k,i (1-0.6)+ P S,l,j 0.6; P S,k,j = P S,k,j (1-0.6)+ P S,l,i 0.6, where W is a random number in the interval [0,1].

步骤36:从种群{P S,q }中随机选择一个个体P S,h ,将P S,h 中的第t个元素按照公式7进行变异操作,公式7:Step 36: Randomly select an individual P S,h from the population { P S,q }, and perform mutation operation on the t -th element in P S,h according to formula 7, formula 7:

其中,P min P max 分别为P S,h,t 取值范围的下界、上界;k为当前迭代次数;C为[0,1]区间内的随机数。Among them, P min and P max are the lower bound and upper bound of the value range of P S, h, t respectively; k is the current iteration number; C is a random number in the [0,1] interval.

步骤37:经过步骤35和步骤36,形成新的种群{P S,q }。将(x 1 , x 2 , … , x r )=P S,q 代入有目标优化问题的约束方程;如果个体满足约束方程,则可计算该个体对应的目标函数值f q Step 37: After Step 35 and Step 36, a new population { P S, q } is formed. Substitute ( x 1 , x 2 , . _

f min f q ,则更新最优解为P S,min =P S,q ,且更新其对应的目标函数最优值f min =f q q=1,2, … , 20;r=1, 2, … , 4。If f min f q , update the optimal solution to P S,min = P S,q , and update the corresponding optimal value of the objective function f min = f q ; q =1,2, … , 20; r =1, 2, … , 4.

步骤38:如果遗传算法的进化代数大于最大进化代数200,则停止迭代,且输出目标优化问题的最优解(x 0 , y 0 , , )=P S,min 和其相对应的目标函数值d B,min =min(d B,q,min ),否则将此时的种群{P S,q }作为下一次进化的初始种群,并跳转至步骤34继续寻优。Step 38: If the evolutionary algebra of the genetic algorithm is greater than the maximum evolutionary algebra of 200, stop the iteration, and output the optimal solution of the target optimization problem ( x 0 , y 0 , , ) = P S,min and its corresponding target The function value d B,min =min( d B,q,min ), otherwise the population { P S,q } at this time is used as the initial population of the next evolution, and jumps to step 34 to continue the optimization.

解得实际被测圆柱B的极限当量直径d B,min =mind B,n ,此时最优解为(x 0,min , y 0,min , min , min )。Solve the actual measured cylinderBThe limiting equivalent diameter ofd B,min =mind B,n , then the optimal solution is (x 0,min ,y 0,min , min , min ).

步骤5:通过公式4:d B = d 2 +es 2 +T 2 ,计算被测圆柱B的最大实体实效圆柱B 2 的直径d B Step 5: Through formula 4: d B = d 2 + es 2 + T 2 , calculate the diameter d B of the largest solid effective cylinder B 2 of the tested cylinder B.

若被测圆柱B的极限当量直径d B,min d B ,则可判定实际被测圆柱的平行度误差合格,否则得出实际被测圆柱的平行度误差不合格。If the limit equivalent diameter of the tested cylinder B d B,min d B , it can be judged that the parallelism error of the actual measured cylinder is qualified, otherwise the parallelism error of the actual measured cylinder is unqualified.

实验对象:test subject:

被测圆柱既有尺寸公差又有方向公差,且被测圆柱的轴线的平行度公差及其基准皆有最大实体要求、基准圆柱既有尺寸公差又有形状公差,且形状公差有最大实体要求的零件的平行度误差合格性的评定如下:The measured cylinder has both dimensional tolerance and directional tolerance, and the parallelism tolerance of the axis of the measured cylinder and its datum have maximum entity requirements. The reference cylinder has both dimensional tolerance and shape tolerance, and the shape tolerance has the maximum entity requirement. The qualification of the parallelism error of the part is evaluated as follows:

步骤1:从图3所示的零件图纸上分别获取基准圆柱A、被测圆柱B的关键信息(长度单位为毫米,角度单位为弧度)。Step 1: Obtain the key information of the reference cylinder A and the measured cylinder B (the unit of length is millimeters, and the unit of angle is radians) from the parts drawing shown in Figure 3.

所述基准圆柱A的关键信息有以下几部分内容:基准圆柱的名义直径d 1 =64、基准圆柱的上偏差、下偏差分别为es 1 =0、ei 1 =-0.019;形状公差应用MMR,形状公差为T 1 =0.1;基准圆柱A的长度L 1 =36。The key information of the datum cylinder A includes the following parts: the nominal diameter of the datum cylinder d 1 =64, the upper and lower deviations of the datum cylinder are es 1 =0, ei 1 =-0.019 respectively; the shape tolerance is applied MMR, The shape tolerance is T 1 =0.1; the length of the reference cylinder A is L 1 =36.

所述被测圆柱B的关键信息有以下几部分内容:被测圆柱的名义直径d 2 =30;被测圆柱的上偏差、下偏差分别为es 2 =0、ei 2 =-0.013;平行度公差T 2 =0.01;平行度公差及其对应基准都使用MMR。The key information of the tested cylinder B has the following contents: the nominal diameter of the tested cylinder d 2 =30; the upper and lower deviations of the tested cylinder are es 2 =0, ei 2 =-0.013 respectively; parallelism Tolerance T 2 =0.01; both the parallelism tolerance and its corresponding datum use MMR.

被测圆柱B的平行度公差及其相应基准圆柱都采用MMR,而且基准圆柱A的形状公差也采用MMR,则进入步骤2。The parallelism tolerance of the measured cylinder B and its corresponding reference cylinder are MMR, and the shape tolerance of the reference cylinder A is also MMR, then go to step 2.

步骤2:使用三坐标测量机分别获取实际基准圆柱A和实际被测圆柱B的轮廓上的测点数据集,它们的测点数据集如表1所示:Step 2: Use a three-coordinate measuring machine to obtain the measuring point datasets on the contours of the actual reference cylinder A and the actual measured cylinder B , respectively, and their measuring point datasets are shown in Table 1:

在实际基准圆柱A轮廓上测得6层相同间距的测点数据,且每层测点包含8个均匀分布的测点,在实际基准圆柱A轮廓上总共测得48个测点,这48个测点构成的测点数据集为{p A,m },其中,m为实际基准孔上测点的序号,m=1, 2, … , 48;在实际被测圆柱B轮廓上测得6层相同间距的测点数据,且每层测点包含8个均匀分布的测点,在实际被测圆柱B轮廓上总共测得48个测点,这48个测点构成的测点数据集为{p B,n },其中,n为实际被测圆柱B轮廓上测点的序号,n=1, 2, … , 48。On the contour of the actual datum cylinder A , 6 layers of measuring point data with the same spacing are measured, and each layer of measuring points contains 8 evenly distributed measuring points. A total of 48 measuring points are measured on the contour of the actual datum cylinder A. These 48 measuring points are The measuring point data set composed of measuring points is { p A, m }, where m is the serial number of the measuring point on the actual reference hole, m = 1, 2, … , 48; 6 is measured on the actual measured cylinder B profile The measuring point data with the same spacing between layers, and each layer of measuring points contains 8 evenly distributed measuring points, a total of 48 measuring points are measured on the actual measured cylinder B contour, and the measuring point data set composed of these 48 measuring points is { p B, n }, where n is the serial number of the measuring point on the contour of the actual measured cylinder B , n = 1, 2, … , 48.

将实际基准圆柱A的每层测点p A,n 分别进行拟合操作获得一个拟合圆,共6个拟合圆,这6个拟合圆的直径分别为63.983、63.987、63.985、63.993、63.997、63.991,每层拟合圆的直径都在实际基准圆柱A的最小极限尺寸与最大极限尺寸之间,因此判定实际基准圆柱A的尺寸误差合格;将实际被测圆柱B的每层测点p B,m 分别进行拟合操作获得一个拟合圆,共6个拟合圆,这6个拟合圆的直径分别为29.989、29.992、29.988、29.996、29.994、29.997,每层拟合圆的直径都在实际被测圆柱B的最小极限尺寸与最大极限尺寸之间,因此可判定实际被测圆柱B的尺寸误差合格;由于实际基准圆柱A和实际被测圆柱B两者尺寸误差都合格,则可以进入步骤3。Fitting the measuring points p A, n of each layer of the actual datum cylinder A respectively to obtain a fitting circle, a total of 6 fitting circles, the diameters of these 6 fitting circles are 63.983, 63.987, 63.985, 63.993, 63.997, 63.991 , the diameter of each layer of fitting circle is between the minimum limit size and the maximum limit size of the actual reference cylinder A , so it is judged that the size error of the actual reference cylinder A is qualified; p B, m respectively perform the fitting operation to obtain a fitted circle, a total of 6 fitted circles, the diameters of the 6 fitted circles are 29.989, 29.992, 29.988, 29.996, 29.994, 29.997, respectively. The diameters are between the minimum limit size and the maximum limit size of the actual measured cylinder B , so it can be determined that the size error of the actual measured cylinder B is qualified; since both the actual reference cylinder A and the actual measured cylinder B have qualified size errors, Then you can go to step 3.

步骤3:为了计算方便以及降低后续计算的复杂度,需要先将实际基准圆柱的几何中心粗略地移至局部坐标系的坐标原点,即公式1:g A,m1 = g A,m,0 - ( g A,max + g A,min )/2。g A,max g A,min 分别为实际基准圆柱轮廓测点中离坐标原点最远点和最近点的坐标。随着实际基准圆柱的移动,实际被测圆柱的测点坐标值相应的发生变化,其变化后的坐标值为公式2:g B,n,1 = g B,n,0 - ( g A,max +g A,min )/2。然后,经过拟合获得实际基准圆柱的最小外接圆柱A 1 ,并将最小外接圆柱A 1 的轴线移至局部坐标系的z轴。Step 3: In order to facilitate the calculation and reduce the complexity of subsequent calculations, it is necessary to roughly move the geometric center of the actual reference cylinder to the coordinate origin of the local coordinate system, that is, formula 1: g A,m1 = g A,m,0 - ( g A,max + g A,min )/2. g A,max , g A,min are the coordinates of the farthest point and the nearest point from the coordinate origin in the actual reference cylinder contour measuring points, respectively. With the movement of the actual datum cylinder, the coordinate value of the measuring point of the actual measured cylinder changes accordingly, and the coordinate value after the change is Formula 2: g B,n,1 = g B,n,0 - ( g A, max + g A,min )/2. Then, the smallest circumscribed cylinder A 1 of the actual reference cylinder is obtained by fitting, and the axis of the smallest circumscribed cylinder A 1 is moved to the z -axis of the local coordinate system.

然后计算目标优化问题1:Then compute objective optimization problem 1:

s.t. st.

步骤21:首先初始化种群的参数,这些参数存在以下几方面内容:种群的规模N S 为20、每个个体的长度R为4、最大进化代数K为200、交叉概率W为0.6、变异概率C为0.1。Step 21: First initialize the parameters of the population. These parameters have the following contents: the size of the population N S is 20, the length R of each individual is 4, the maximum evolutionary generation K is 200, the crossover probability W is 0.6, and the mutation probability C is is 0.1.

步骤22:设置N S 个个体P S,q (P S,q,1 , P S,q,2 , P S,q,3 , P S,q,4 ),它的值与目标优化问题1中的解(x 1 , y 1 , α 1 , β 1 )相对应,q=1, 2, … , 20;由所有个体构成的集合为{P S,q }。Step 22: Set N S individuals P S,q ( P S,q,1 , P S,q,2 , P S,q,3 , P S,q,4 ), whose value is the same as the target optimization problem 1 The solutions in ( x 1 , y 1 , α 1 , β 1 ) correspond to, q =1, 2, … , 20; the set composed of all individuals is { P S,q }.

步骤23:按照均匀分布,分别在 P S,q,1 , P S,q,2 , P S,q,3 , P S,q,4 取值范围内随机获得N S 个值,以生成N S 个个体P S,q q =1, … ,20。Step 23: According to uniform distribution, randomly obtain N S values within the value range of P S,q,1 , P S,q,2 , P S,q,3 , P S,q,4 to generate N S individuals P S,q ; q = 1, . . . , 20.

P S,q,1 , P S,q,2 , P S,q,3 , P S,q,4 的值分别作为上述目标优化问题1中自变量x 1 , y 1 ,α 1 , β 1 的值,并计算其对应目标函数值d A,q q=1, 2, … , 20;Take the values of P S,q,1 , P S,q,2 , P S,q,3 , P S,q,4 as the independent variables x 1 , y 1 , α 1 , β in the above objective optimization problem 1, respectively 1 , and calculate its corresponding objective function value d A,q ; q =1, 2, … , 20;

记录此时最优目标函数值d A,min =min(d A,q,min ),并记录最优函数值所对应的最优解P S,min Record the optimal objective function value d A,min =min( d A,q,min ) at this time, and record the optimal solution P S,min corresponding to the optimal function value.

步骤24:从上述种群{P S,q }中以一定的概率随机选取个体用于步骤25和步骤26的操作。个体P S,q 被选中的概率为公式5:Step 24: Randomly select individuals from the above-mentioned population { P S, q } with a certain probability for the operations of Step 25 and Step 26 . The probability that the individual P S,q is selected is Equation 5:

,

q=1,2,…,20。 q = 1, 2, ..., 20.

步骤25:从种群{P S,q }中随机选择两个个体P S,k P S,l ,将个体P S,k 中的第i个元素P S,k,i 与个体P S,l 中的第j个元素P S,l,j 按照公式6进行交叉操作,其中k, l=1, 2, … , N S i, j=1, 2, 3, 4。公式6:P S,k,i = P S,k,i (1-0.6)+ P S,l,j 0.6;P S,k,j = P S,k,j (1-0.6)+ P S,l,i 0.6,其中,W是[0,1]区间内的随机数。Step 25: Randomly select two individuals P S,k and P S,l from the population { P S,q }, and compare the i -th element P S,k,i in the individual P S ,k with the individual P S, The jth element P S,l,j in l is crossed according to formula 6, where k, l =1, 2, … , N S ; i, j =1, 2, 3, 4. Equation 6: P S,k,i = P S,k,i (1-0.6)+ P S,l,j 0.6; P S,k,j = P S,k,j (1-0.6)+ P S,l,i 0.6, where W is a random number in the interval [0,1].

步骤26:从种群{P S,q }中随机选择一个个体P S,h ,将P S,h 中的第t个元素按照公式7进行变异操作,公式7:Step 26: Randomly select an individual P S,h from the population { P S,q }, and perform mutation operation on the t -th element in P S,h according to formula 7, formula 7:

其中,P min P max 分别为P S,h,t 取值范围的下界、上界;k为当前迭代次数;C为[0,1]区间内的随机数。Among them, P min and P max are the lower bound and upper bound of the value range of P S, h, t respectively; k is the current iteration number; C is a random number in the [0,1] interval.

步骤27:经过步骤25和步骤26,形成新的种群{P S,q }。将(x 1 , x 2 , … , x r )=P S,q 代入有目标优化问题的约束方程;如果个体满足约束方程,则可计算该个体对应的目标函数值f q Step 27: After Step 25 and Step 26, a new population { P S, q } is formed. Substitute ( x 1 , x 2 , . _

f min f q ,则更新最优解为P S,min =P S,q ,且更新其对应的目标函数最优值f min =f q q=1,2, … , 20;r=1, 2, … , 4。If f min f q , update the optimal solution to P S,min = P S,q , and update the corresponding optimal value of the objective function f min = f q ; q =1,2, … , 20; r =1, 2, … , 4.

步骤28:如果遗传算法的进化代数大于最大进化代数200,则停止迭代,且输出目标优化问题的最优解(x 1 , y 1 , α 1 , β 1 )=P S,min 和其相对应的目标函数值d A,min =min(d A,q,max ),否则将此时的种群{P S,q }作为下一次进化的初始种群,并跳转至步骤24继续寻优。Step 28: If the evolutionary algebra of the genetic algorithm is greater than the maximum evolutionary algebra of 200, stop the iteration, and output the optimal solution of the target optimization problem ( x 1 , y 1 , α 1 , β 1 ) = P S,min and its corresponding The objective function value d A,min =min( d A,q,max ), otherwise the population at this time { P S, q } is used as the initial population of the next evolution, and jump to step 24 to continue the optimization.

解得最优解(x 1,min , y 1,min ,μ 1,min ,ν 1,min )= (-0.3315, 0.5641, 0.0206, 0.0141),此时得到实际基准圆柱A的最小外接圆柱A 1 的直径d A,min = 63.995。The optimal solution is obtained ( x 1,min , y 1,min , μ 1,min , ν 1,min )= (-0.3315, 0.5641, 0.0206, 0.0141), and the minimum circumscribed cylinder A of the actual reference cylinder A is obtained at this time The diameter of 1 is d A,min = 63.995.

将实际基准圆柱轮廓上的测点集{g A,m,1 (x A,m,1 , y A,m,1 , z A,m,1 )}代入下式进行坐标变换,m=1 , 2 , … , MSubstitute the measuring point set { g A,m,1 ( x A,m,1 , y A,m,1 , z A,m,1 )} on the outline of the actual reference cylinder into the following formula for coordinate transformation, m =1 , 2 , … , M ;

即可得到变换后实际基准圆柱轮廓上的测点集{g A,m (x A,m , y A,m , z A,m )}。The set of measuring points { g A,m ( x A,m , y A,m , z A,m )} on the contour of the actual reference cylinder after transformation can be obtained.

将实际被测圆柱轮廓上的测点集{g B,n,1 (x B,n,1 , y B,n,1 , z B,n,1 )}代入下式进行坐标变换,n=1 , 2 , … , NSubstitute the measuring point set { g B,n,1 ( x B,n,1 , y B,n,1 , z B,n,1 )} on the actual measured cylindrical contour into the following formula to perform coordinate transformation, n = 1 , 2 , … , N ;

即可得到变换后实际被测圆柱轮廓上的测点集{g B,n (x B,n , y B,n , z B,n )}。The set of measuring points { g B,n ( x B,n , y B,n , z B,n )} on the actual measured cylindrical contour after transformation can be obtained.

步骤4:首先通过公式3 :d A = d 1 +es 1 +T 1 =64+0+0.1=64.1,获得基准圆柱A的最大实体实效圆柱A 2 的直径d A ;然后,求解目标优化问题2:Step 4: First, through formula 3: d A = d 1 + es 1 + T 1 =64+0+0.1=64.1, obtain the diameter d A of the largest solid effective cylinder A 2 of the reference cylinder A ; then, solve the objective optimization problem 2:

s.t. st.

步骤31:首先初始化种群的参数,这些参数存在以下几方面内容:种群的规模N S 为20、每个个体的长度R为4、最大进化代数K为200、交叉概率W为0.6、变异概率C为0.1。Step 31: First initialize the parameters of the population. These parameters have the following contents: the size of the population N S is 20, the length R of each individual is 4, the maximum evolutionary generation K is 200, the crossover probability W is 0.6, and the mutation probability C is is 0.1.

步骤32:设置N S 个个体P S,q (P S,q,1 , P S,q,2 , P S,q,3 , P S,q,4 ),它的值与目标优化问题1中的解(x 1 , y 1 , α 1 , β 1 )相对应,q=1, 2, … , 20;由所有个体构成的集合为{P S,q }。Step 32: Set N S individuals P S,q ( P S,q,1 , P S,q,2 , P S,q,3 , P S,q,4 ), whose value is the same as the target optimization problem 1 The solutions in ( x 1 , y 1 , α 1 , β 1 ) correspond to, q =1, 2, … , 20; the set composed of all individuals is { P S,q }.

步骤33:按照均匀分布,分别在 P S,q,1 , P S,q,2 , P S,q,3 , P S,q,4 取值范围内随机获得N S 个值,以生成N S 个个体P S,q q =1, … ,20。Step 33: According to a uniform distribution, randomly obtain N S values within the value range of P S,q,1 , P S,q,2 , P S,q,3 , P S,q,4 to generate N S individuals P S,q ; q = 1, . . . , 20.

P S,q,1 , P S,q,2 , P S,q,3 , P S,q,4 的值分别作为上述目标优化问题1中自变量x 1 , y 1 ,α 1 , β 1 的值,并计算其对应目标函数值d A,q q=1, 2, … , 20;Take the values of P S,q,1 , P S,q,2 , P S,q,3 , P S,q,4 as the independent variables x 1 , y 1 , α 1 , β in the above objective optimization problem 1, respectively 1 , and calculate its corresponding objective function value d A,q ; q =1, 2, … , 20;

记录此时最优目标函数值d A,min =min(d A,q,min ),并记录最优函数值所对应的最优解P S,min Record the optimal objective function value d A,min =min( d A,q,min ) at this time, and record the optimal solution P S,min corresponding to the optimal function value.

步骤34:从上述种群{P S,q }中以一定的概率随机选取个体用于步骤25和步骤26的操作。个体P S,q 被选中的概率为公式5:Step 34: Randomly select individuals from the above-mentioned population { P S, q } with a certain probability for the operations of Step 25 and Step 26 . The probability that the individual P S,q is selected is Equation 5:

,

q=1,2,…,20。 q = 1, 2, ..., 20.

步骤35:从种群{P S,q }中随机选择两个个体P S,k P S,l ,将个体P S,k 中的第i个元素P S,k,i 与个体P S,l 中的第j个元素P S,l,j 按照公式6进行交叉操作,其中k, l=1, 2, … , N S i, j=1, 2, 3, 4。公式6:P S,k,i = P S,k,i (1-0.6)+ P S,l,j 0.6;P S,k,j = P S,k,j (1-0.6)+ P S,l,i 0.6,其中,W是[0,1]区间内的随机数。Step 35: Randomly select two individuals P S,k and P S,l from the population { P S,q }, and compare the i -th element P S,k,i in the individual P S ,k with the individual P S, The jth element P S,l,j in l is crossed according to formula 6, where k, l =1, 2, … , N S ; i, j =1, 2, 3, 4. Equation 6: P S,k,i = P S,k,i (1-0.6)+ P S,l,j 0.6; P S,k,j = P S,k,j (1-0.6)+ P S,l,i 0.6, where W is a random number in the interval [0,1].

步骤36:从种群{P S,q }中随机选择一个个体P S,h ,将P S,h 中的第t个元素按照公式7进行变异操作,公式7:Step 36: Randomly select an individual P S,h from the population { P S,q }, and perform mutation operation on the t -th element in P S,h according to formula 7, formula 7:

其中,P min P max 分别为P S,h,t 取值范围的下界、上界;k为当前迭代次数;C为[0,1]区间内的随机数。Among them, P min and P max are the lower bound and upper bound of the value range of P S, h, t respectively; k is the current iteration number; C is a random number in the [0,1] interval.

步骤37:经过步骤35和步骤36,形成新的种群{P S,q }。将(x 1 , x 2 , … , x r )=P S,q 代入有目标优化问题的约束方程;如果个体满足约束方程,则可计算该个体对应的目标函数值f q Step 37: After Step 35 and Step 36, a new population { P S, q } is formed. Substitute ( x 1 , x 2 , . _

f min f q ,则更新最优解为P S,min =P S,q ,且更新其对应的目标函数最优值f min =f q q=1,2, … , 20;r=1, 2, … , 4。If f min f q , update the optimal solution to P S,min = P S,q , and update the corresponding optimal value of the objective function f min = f q ; q =1,2, … , 20; r =1, 2, … , 4.

步骤38:如果遗传算法的进化代数大于最大进化代数200,则停止迭代,且输出目标优化问题的最优解(x 0 , y 0 , , )=P S,min 和其相对应的目标函数值d B,min =min(d B,q,min ),否则将此时的种群{P S,q }作为下一次进化的初始种群,并跳转至步骤34继续寻优。Step 38: If the evolutionary algebra of the genetic algorithm is greater than the maximum evolutionary algebra of 200, stop the iteration, and output the optimal solution of the target optimization problem ( x 0 , y 0 , , ) = P S,min and its corresponding target The function value d B,min =min( d B,q,min ), otherwise, the population { P S,q } at this time is used as the initial population of the next evolution, and jump to step 34 to continue the optimization.

解得实际被测圆柱B的极限当量直径d B,min =29.993,此时最优解为(0.116,0.089,0.012,-0.008)。The limit equivalent diameter d B,min = 29.993 of the actual measured cylinder B is obtained, and the optimal solution is (0.116, 0.089, 0.012, -0.008).

步骤5:通过公式4:d B = d 2 +es 2 +T 2 =30+0+0.01=30.01,计算被测圆柱B的最大实体实效圆柱B 2 的直径d B Step 5: Through formula 4: d B = d 2 + es 2 + T 2 =30+0+0.01=30.01, calculate the diameter d B of the largest solid effective cylinder B 2 of the tested cylinder B.

由于被测圆柱B的极限当量直径d B,min =29.993≤d B =30.01,则可判定实际被测圆柱的平行度误差合格。Since the limit equivalent diameter of the measured cylinder B is d B,min = 29.993≤d B =30.01, the parallelism error of the actual measured cylinder can be judged to be qualified.

表1基准圆柱与被测圆柱测点的数据集Table 1 Data set of the reference cylinder and the measuring point of the measured cylinder

Claims (7)

1.一种基于最大实体要求(MMR)圆柱的平行度评定方法,其特征在于,具体步骤如下:1. A method for evaluating parallelism based on maximum entity requirement (MMR) cylinder, characterized in that the specific steps are as follows: 步骤1:判断零件是否适用于本评定方法:从零件图纸上分别获得基准圆柱A、被测圆柱B的关键信息;若被测圆柱B的平行度公差及其相应基准圆柱都采用MMR,而且基准圆柱A的形状公差也采用MMR,则转入步骤2;Step 1: Determine whether the part is suitable for this evaluation method: Obtain the key information of the reference cylinder A and the measured cylinder B from the part drawings; if the parallelism tolerance of the measured cylinder B and its corresponding reference cylinder are MMR, and the benchmark The shape tolerance of cylinder A also adopts MMR, then go to step 2; 所述基准圆柱A的关键信息有以下几部分内容:基准圆柱的名义直径d 1 、基准圆柱的上偏差、下偏差分别为es 1 ei 1 ;形状公差应用MMR,形状公差为T 1 ;基准圆柱A的长度L 1 The key information of the datum cylinder A has the following contents: the nominal diameter d 1 of the datum cylinder, the upper deviation and the lower deviation of the datum cylinder are es 1 and ei 1 respectively; the shape tolerance is MMR, and the shape tolerance is T 1 ; the length L 1 of the cylinder A ; 所述被测圆柱B的关键信息有以下几部分内容:被测圆柱的名义直径d 2 ;被测圆柱的上偏差、下偏差分别为es 2 ei 2 ;平行度公差T 2 ;平行度公差及其对应基准都使用MMR;The key information of the tested cylinder B has the following contents: the nominal diameter d 2 of the tested cylinder; the upper and lower deviations of the tested cylinder are es 2 and ei 2 respectively; the parallelism tolerance T 2 ; the parallelism tolerance and its corresponding benchmarks use MMR; 步骤2:判定实际基准圆柱A的尺寸误差和实际被测圆柱B的尺寸误差是否同时合格:首先使用三坐标测量机分别获取实际基准圆柱A和实际被测圆柱B的轮廓上的测点数据集,然后判定实际基准圆柱A和实际被测圆柱B两者的尺寸误差是否同时合格,若两者尺寸误差都合格,则进入步骤3,否则终止本评定方法;Step 2: Determine whether the dimensional error of the actual datum cylinder A and the dimensional error of the actual measured cylinder B are qualified at the same time: First, use a three-coordinate measuring machine to obtain the measuring point data sets on the contours of the actual datum cylinder A and the actual measured cylinder B respectively. , and then determine whether the dimensional errors of the actual reference cylinder A and the actual measured cylinder B are both qualified at the same time. If the dimensional errors of both are qualified, go to step 3, otherwise terminate the evaluation method; 步骤3:通过计算,拟合出实际基准圆柱A的拟合圆柱A 1 ,在拟合圆柱A 1 上建立局部坐标系,并将三坐标测量机测得的实际基准圆柱A和实际被测圆柱B的测点坐标值进行坐标变换,获得实际基准圆柱A和实际被测圆柱B的测点在该局部坐标系中的坐标值;Step 3: Fit the fitting cylinder A 1 of the actual datum cylinder A through calculation, establish a local coordinate system on the fitting cylinder A 1 , and compare the actual datum cylinder A measured by the three-coordinate measuring machine with the actual measured cylinder. Coordinate transformation is performed on the coordinate value of the measuring point of B to obtain the coordinate value of the actual reference cylinder A and the measuring point of the actual measured cylinder B in the local coordinate system; 步骤4:将实际基准圆柱A相对于其最大实体实效圆柱A 2 的空间位置变动量q A 作为设计变量,以q A 的变动范围作为目标函数的约束条件,并以实际被测圆柱B在不同空间位置时的有定向约束的最小外接圆柱的直径d B,n =f(q A )为目标函数进行优化,通过求解有约束目标优化问题来获得实际被测圆柱B的极限当量尺寸d B,min ,其中,实际被测圆柱B的有定向约束的最小外接圆柱:在实际基准圆柱A在其最大实体实效圆柱A 2 内情况下,以平行于最大实体实效圆柱A 2 的轴线为轴线、能包容实际被测圆柱B的最大理想包容圆柱;实际被测圆柱B的极限当量直径d B,min :实际基准圆柱A相对于其最大实体实效圆柱A 2 的空间位置变动的过程中,通过拟合所得的所有有定向约束的最小外接圆柱中最小的那个圆柱的直径;Step 4: Take the spatial position variation q A of the actual reference cylinder A relative to its largest entity effective cylinder A 2 as the design variable, take the variation range of q A as the constraint condition of the objective function, and use the actual measured cylinder B in different The diameter d B,n = f ( q A ) of the smallest circumscribed cylinder with orientation constraints at the spatial position is optimized as the objective function, and the limit equivalent dimension d B of the actual measured cylinder B is obtained by solving the constrained objective optimization problem , min , among them, the smallest circumscribed cylinder with orientation constraint of the actual measured cylinder B : when the actual reference cylinder A is within its maximum solid effective cylinder A 2 , take the axis parallel to the maximum solid effective cylinder A 2 as the axis, and the energy The maximum ideal accommodating cylinder that contains the actual measured cylinder B ; the limit equivalent diameter d B,min of the actual measured cylinder B : in the process of changing the spatial position of the actual reference cylinder A relative to its largest solid effective cylinder A 2 , by fitting The diameter of the smallest of all the resulting smallest circumscribed cylinders with orientation constraints; 步骤5:通过比较被测圆柱B的最大实体实效尺寸d B 和被测圆柱B的极限当量直径d B,min 的大小,来判断实际被测孔B的平行度误差的合格性。Step 5: Judging the eligibility of the parallelism error of the actual measured hole B by comparing the maximum actual size d B of the measured cylinder B and the limit equivalent diameter d B, min of the measured cylinder B. 2.根据权利要求1所述的一种基于最大实体要求(MMR)圆柱的平行度评定方法,其特征是:2. A method for evaluating parallelism based on a maximum entity requirement (MMR) cylinder according to claim 1, characterized in that: 步骤2中所述实际基准圆柱A和实际被测圆柱B轮廓上的测点坐标值的数据是由三坐标测量机在空间直角坐标系中测得的,这些测点集分别为实际基准圆柱A的测点集{g A,m,0 (x A,m,0 , y A,m,0 , z A,m,0 )},其中,m为实际基准圆柱轮廓上测点的序号,m=1, 2, … , MM为正整数;实际被测圆柱B的测点集{g B,n,0 (x B,n,0 , y B,n,0 , z B,n,0 )},其中,n为实际被测圆柱轮廓上测点的序号,n=1, 2, … , NN为正整数。The data of the coordinate values of the measuring points on the outline of the actual reference cylinder A and the actual measured cylinder B described in step 2 are measured by a three-coordinate measuring machine in the space rectangular coordinate system, and these measuring point sets are the actual reference cylinder A respectively. The set of measuring points { g A,m,0 ( x A,m,0 , y A,m,0 , z A,m,0 )}, where m is the serial number of the measuring point on the actual datum cylinder profile, m =1, 2, … , M , M is a positive integer; the actual measuring point set of the measured cylinder B { g B,n,0 ( x B,n,0 , y B,n,0 , z B,n, 0 )}, where n is the serial number of the measuring point on the actual measured cylindrical contour, n =1, 2, … , N , N is a positive integer. 3.根据权利要求2所述的一种基于最大实体要求(MMR)圆柱的平行度评定方法,其特征是:3. A method for evaluating the parallelism of a cylinder based on maximum entity requirements (MMR) according to claim 2, wherein: 步骤1:判断零件是否适用于本评定方法:从零件图纸上分别获得基准圆柱A、被测圆柱B的关键信息;若被测圆柱B的平行度公差及其相应基准圆柱都采用MMR,而且基准圆柱A的形状公差也采用MMR,则转入步骤2;Step 1: Determine whether the part is suitable for this evaluation method: Obtain the key information of the reference cylinder A and the measured cylinder B from the part drawings; if the parallelism tolerance of the measured cylinder B and its corresponding reference cylinder are MMR, and the benchmark The shape tolerance of cylinder A also adopts MMR, then go to step 2; 所述基准圆柱A的关键信息有以下几部分内容:基准圆柱的名义直径d 1 、基准圆柱的上偏差、下偏差分别为es 1 ei 1 ;形状公差应用MMR,形状公差为T 1 ;基准圆柱A的长度L 1 The key information of the datum cylinder A has the following contents: the nominal diameter d 1 of the datum cylinder, the upper deviation and the lower deviation of the datum cylinder are es 1 and ei 1 respectively; the shape tolerance is MMR, and the shape tolerance is T 1 ; the length L 1 of the cylinder A ; 所述被测圆柱B的关键信息有以下几部分内容:被测圆柱的名义直径d 2 ;被测圆柱的上偏差、下偏差分别为es 2 ei 2 ;平行度公差T 2 ;平行度公差及其相应基准都标有MM;The key information of the tested cylinder B has the following contents: the nominal diameter d 2 of the tested cylinder; the upper and lower deviations of the tested cylinder are es 2 and ei 2 respectively; the parallelism tolerance T 2 ; the parallelism tolerance and their corresponding benchmarks are marked with MM; 步骤2:判定实际基准圆柱A的尺寸误差和实际被测圆柱B的尺寸误差是否同时合格:首先使用三坐标测量机分别获取实际基准圆柱A和实际被测圆柱B的轮廓上的测点集,这些测点集分别为实际基准圆柱A的测点集{g A,m,0 (x A,m,0 , y A,m,0 , z A,m,0 )},其中,n为实际基准圆柱轮廓上测点的序号,m=1, 2, … , MM为正整数;实际被测孔B的测点集{g B,n,0 (x B,n,0 , y B,n,0 , z B,n,0 )},其中,n为实际被测圆柱轮廓上测点的序号,n=1, 2, … , NN为正整数;Step 2: Determine the actual datum cylinderAThe dimensional error of the actual measured cylinderBWhether the dimensional error of the test is qualified at the same time: first use a three-coordinate measuring machine to obtain the actual reference cylinder respectivelyAand the actual measured cylinderBThe set of measuring points on the contour of , which are the actual datum cylinderAset of measuring points {g A,m,0 (x A,m,0 ,y A,m,0 ,z A,m,0 )},in,nis the serial number of the measuring point on the actual datum cylinder profile,m=1, 2, … ,M,Mis a positive integer; the actual measured holeBset of measuring points {g B,n,0 (x B,n,0 , y B,n,0 ,z B,n,0 )},in,nis the serial number of the measuring point on the actual measured cylindrical contour,n=1, 2, … ,N,Nis a positive integer; 然后判定实际基准圆柱A和实际被测圆柱B两者的尺寸误差是否同时合格,若两者尺寸误差都合格,则进入步骤3,否则终止本评定方法;Then determine whether the dimensional errors of the actual reference cylinder A and the actual measured cylinder B are both qualified at the same time. If the dimensional errors of both are qualified, go to step 3, otherwise terminate the evaluation method; 步骤3:为了计算方便以及降低后续计算的复杂度,需要先将实际基准圆柱的几何中心粗略地移至局部坐标系的坐标原点,即公式1:g A,m1 = g A,m,0 - ( g A,max + g A,min )/2;Step 3: In order to facilitate the calculation and reduce the complexity of subsequent calculations, it is necessary to roughly move the geometric center of the actual reference cylinder to the coordinate origin of the local coordinate system, that is, formula 1: g A,m1 = g A,m,0 - ( g A,max + g A,min )/2; g A,max g A,min 分别为实际基准圆柱轮廓测点中离坐标原点最远点和最近点的坐标;随着实际基准圆柱的移动,实际被测圆柱的测点坐标值相应的发生变化,其变化后的坐标值为公式2:g B,n,1 = g B,n,0 - ( g A,max +g A,min )/2;然后,经过拟合获得实际基准圆柱的最小外接圆柱A 1 ,并将最小外接圆柱A 1 的轴线移至局部坐标系的z轴; g A,max , g A,min are the coordinates of the farthest point and the nearest point in the measuring point of the actual datum cylinder profile respectively; with the movement of the actual datum cylinder, the coordinate value of the measuring point of the actual cylinder to be measured will occur correspondingly. change, the coordinate value after the change is formula 2: g B,n,1 = g B,n,0 - ( g A,max + g A,min )/2; then, the actual reference cylinder is obtained by fitting Minimum circumscribed cylinder A 1 , and move the axis of the minimum circumscribed cylinder A 1 to the z -axis of the local coordinate system; 然后计算目标优化问题1:Then compute objective optimization problem 1: s.t. st. 解得最优解(x 1,min , y 1,min ,μ 1,min ,ν 1,min ),此时得到实际基准圆柱A的最小外接圆柱A 1 The optimal solution ( x 1,min , y 1,min , μ 1,min , ν 1,min ) is obtained, and the minimum circumscribed cylinder A 1 of the actual reference cylinder A is obtained at this time; 将实际基准圆柱轮廓上的测点集{g A,m,1 (x A,m,1 , y A,m,1 , z A,m,1 )}代入下式进行坐标变换,m=1 , 2 , … , MSubstitute the measuring point set { g A,m,1 ( x A,m,1 , y A,m,1 , z A,m,1 )} on the outline of the actual reference cylinder into the following formula for coordinate transformation, m =1 , 2 , … , M ; 即可得到变换后实际基准圆柱轮廓上的测点集{g A,m (x A,m , y A,m , z A,m )};The measuring point set { g A,m ( x A,m , y A,m , z A,m )} on the contour of the actual datum cylinder after transformation can be obtained; 将实际被测圆柱轮廓上的测点集{g B,n,1 (x B,n,1 , y B,n,1 , z B,n,1 )}代入下式进行坐标变换,n=1 , 2 , … , NSubstitute the measuring point set { g B,n,1 ( x B,n,1 , y B,n,1 , z B,n,1 )} on the actual measured cylindrical contour into the following formula to perform coordinate transformation, n = 1 , 2 , … , N ; 即可得到变换后实际被测圆柱轮廓上的测点集{g B,n (x B,n , y B,n , z B,n )};The measuring point set { g B,n ( x B,n , y B,n , z B,n )} on the actual measured cylindrical contour after transformation can be obtained; 步骤4:首先通过公式3 :d A = d 1 +es 1 +T 1 ,获得基准圆柱A的最大实体实效圆柱A 2 的直径d A Step 4: First, through formula 3: d A = d 1 + es 1 + T 1 , obtain the diameter d A of the largest solid effective cylinder A 2 of the reference cylinder A ; 然后,求解目标优化问题2:Then, solve objective optimization problem 2: s.t. st. 解得实际被测圆柱B的极限当量直径d B,min =mind B,n Solve the limit equivalent diameter d B,min =min d B,n of the actual measured cylinder B ; 步骤5:通过公式4:d B = d 2 +es 2 +T 2 ,计算被测孔B的最大实体实效圆柱B 2 的直径d B Step 5: Calculate the diameter d B of the largest solid effective cylinder B 2 of the measured hole B by formula 4: d B = d 2 + es 2 + T 2 ; 若被测圆柱B的极限当量直径d B,min d B ,则可判定实际被测圆柱的平行度误差合格,否则得出实际被测圆柱的平行度误差不合格。If the limit equivalent diameter of the tested cylinder B d B,min d B , it can be determined that the parallelism error of the actual measured cylinder is qualified, otherwise the parallelism error of the actual measured cylinder is unqualified. 4.根据权利要求3所述的一种基于最大实体要求(MMR)圆柱的平行度评定方法,其特征是:4. A method for evaluating parallelism based on a maximum entity requirement (MMR) cylinder according to claim 3, characterized in that: 所述有约束的目标优化问题的求解步骤如下:The steps for solving the constrained objective optimization problem are as follows: 步骤11:首先初始化种群的参数,这些参数存在以下几方面内容:种群的规模N S 、每个个体的长度R、最大进化代数K、交叉概率W、变异概率CStep 11: Initialize the parameters of the population first. These parameters have the following contents: the size of the population N S , the length R of each individual, the maximum evolutionary algebra K , the crossover probability W , and the mutation probability C ; 步骤12:定义N S 个个体P S,q (P S,q,1 , P S,q,2 , … , P S,q,r ),每个个体的值与目标优化问题中的可行解(x 1 , x 2 , … , x r )具有一一对应的关系,且P S,q,r x r 的具有相同的取值范围;q=1, 2, … , N S r=1, 2, … , R;由所有个体构成的集合为{P S,q };Step 12: Define N S individuals P S,q ( P S,q,1 , P S,q,2 , … , P S,q,r ), the value of each individual and the feasible solution in the objective optimization problem ( x 1 , x 2 , … , x r ) has a one-to-one correspondence, and P S, q, r and x r have the same value range; q =1, 2, … , N S ; r = 1, 2, … , R ; the set composed of all individuals is { P S, q }; 步骤13:按照均匀分布,在 P S,q,r 取值范围内随机获得N S 个个体P S,q n=1, … ,N S r=1,2, … , RStep 13: According to uniform distribution, randomly obtain N S individuals P S,q within the value range of P S,q,r ; n =1, . . . , N S ; r =1, 2, . . , R ; P S,q,r 的值作为上述目标优化问题中x r 的值,计算其目标函数值f q =f(x 1 , x 2 , … ,x r ); q=1, 2, … , N S r=1, 2, … , RTaking the value of P S,q,r as the value of x r in the above objective optimization problem, calculate its objective function value f q = f ( x 1 , x 2 , … , x r ); q =1, 2, … , N S ; r =1, 2, … , R ; 记录此时最优目标函数值f min =minf q ,并记录全局最优目标函数值所对应的最优解P S,min q=1, 2, … , N S Record the optimal objective function value f min =min f q at this time, and record the optimal solution P S,min , q =1, 2, … , N S corresponding to the global optimal objective function value; 步骤14:从上述种群{P S,q }中以一定的概率随机选取个体用于步骤15和步骤16的操作;个体P S,q 被选中的概率为公式5:Step 14: Randomly select individuals from the above-mentioned population { P S, q } with a certain probability for the operations of Step 15 and Step 16; the probability of individual P S, q being selected is formula 5: , q=1,2,…,N S q = 1, 2, ..., N S ; 步骤15:从种群{P S,q }中随机选择两个个体P S,k P S,l ,将个体P S,k 中的第i个元素P S,k,i 与个体P S,l 中的第j个元素P S,l,j 按照公式6进行交叉操作,其中k, l=1, 2, … , N S i, j=1,2, … , RStep 15: Randomly select two individuals P S,k and P S,l from the population { P S,q }, and compare the i -th element P S,k,i in the individual P S ,k with the individual P S, The jth element P S,l,j in l is crossed according to formula 6, where k, l =1, 2, … , N S ; i, j =1,2, … , R ; 公式6:P S,k,i = P S,k,i (1-W)+ P S,l,j WP S,k,j = P S,k,j (1-W)+ P S,l,i W,其中,W是[0,1]区间内的随机数;Equation 6: P S,k,i = P S,k,i (1- W )+ P S,l,j W ; P S,k,j = P S,k,j (1- W )+ P S,l,i W , where W is a random number in the interval [0,1]; 步骤16:从种群{P S,q }中随机选择一个个体P S,h ,将P S,h 中的第t个元素按照公式7进行变异操作,公式7:Step 16: Randomly select an individual P S,h from the population { P S,q }, and perform mutation operation on the t -th element in P S,h according to formula 7, formula 7: 其中,P min P max 分别为P S,h,t 取值范围的下界、上界;k为当前迭代次数;K为最大进化次数;C为[0,1]区间内的随机数;Among them, P min and P max are the lower and upper bounds of the value range of P S,h,t respectively; k is the current iteration number; K is the maximum evolution number; C is a random number in the [0,1] interval; 步骤17:经过步骤15和步骤16,形成新的种群{P S,q };Step 17: After Step 15 and Step 16, a new population { P S, q } is formed; 将(x 1 , x 2 , … , x r )=P S,q 代入有目标优化问题的约束方程;如果个体满足约束方程,则可计算该个体对应的目标函数值f q Substitute ( x 1 , x 2 , . _ f min f q ,则更新最优解为P S,min =P S,q ,且更新其对应的目标函数最优值f min =f q q=1,2, … , N S r=1, 2, … , RIf f min f q , update the optimal solution to P S,min = P S,q , and update the corresponding optimal value of the objective function f min = f q ; q =1,2, … , N S ; r =1, 2, … , R ; 步骤18:如果遗传算法的进化代数大于最大进化代数K,则停止迭代,且输出目标优化问题的最优解P S,min 和其相对应的目标函数值f min ,否则将此时的种群{P S,q }作为下一次进化的初始种群,并跳转至步骤14继续寻优。Step 18: If the evolutionary algebra of the genetic algorithm is greater than the maximum evolutionary algebra K , stop the iteration, and output the optimal solution P S,min of the objective optimization problem and its corresponding objective function value f min , otherwise the population { P S, q } is used as the initial population for the next evolution, and jumps to step 14 to continue the optimization. 5.根据权利要求4所述的一种基于最大实体要求(MMR)圆柱的平行度评定方法,其特征是:5. A method for evaluating parallelism based on a maximum entity requirement (MMR) cylinder according to claim 4, characterized in that: 所述遗传算法的初始参数设置如下:种群的规模N S 为20、每个个体的长度R为4、最大进化代数K为200、交叉概率W为0.6、变异概率C为0.1。The initial parameters of the genetic algorithm are set as follows: the population size N S is 20, the length R of each individual is 4, the maximum evolutionary generation K is 200, the crossover probability W is 0.6, and the mutation probability C is 0.1. 6.根据权利要求4所述的一种基于最大实体要求(MMR)圆柱的平行度评定方法,其特征是:6. A method for evaluating the parallelism of a cylinder based on maximum physical requirements (MMR) according to claim 4, wherein: 对目标优化问题1的求解方法如下:The solution to objective optimization problem 1 is as follows: 步骤21:首先初始化种群的参数,这些参数存在以下几方面内容:种群的规模N S 为20、每个个体的长度R为4、最大进化代数K为200、交叉概率W为0.6、变异概率C为0.1;Step 21: First initialize the parameters of the population. These parameters have the following contents: the size of the population N S is 20, the length R of each individual is 4, the maximum evolutionary generation K is 200, the crossover probability W is 0.6, and the mutation probability C is is 0.1; 步骤22:设置N S 个个体P S,q (P S,q,1 , P S,q,2 , P S,q,3 , P S,q,4 ),它的值与目标优化问题1中的解(x 1 , y 1 , α 1 , β 1 )相对应,q=1, 2, … , 20;由所有个体构成的集合为{P S,q };Step 22: Set N S individuals P S,q ( P S,q,1 , P S,q,2 , P S,q,3 , P S,q,4 ), whose value is the same as the target optimization problem 1 The solutions in ( x 1 , y 1 , α 1 , β 1 ) correspond to, q =1, 2, … , 20; the set composed of all individuals is { P S,q }; 步骤23:按照均匀分布,分别在 P S,q,1 , P S,q,2 , P S,q,3 , P S,q,4 取值范围内随机获得N S 个值,以生成N S 个个体P S,q q =1, … ,20;Step 23: According to uniform distribution, randomly obtain N S values within the value range of P S,q,1 , P S,q,2 , P S,q,3 , P S,q,4 to generate N S individuals P S,q ; q =1, . . . , 20; P S,q,1 , P S,q,2 , P S,q,3 , P S,q,4 的值分别作为上述目标优化问题1中自变量x 1 , y 1 , α 1 ,β 1 的值,并计算其对应目标函数值d A,q q=1, 2, … , 20;Take the values of P S,q,1 , P S,q,2 , P S,q,3 , P S,q,4 as the independent variables x 1 , y 1 , α 1 , β in the above objective optimization problem 1, respectively 1 , and calculate its corresponding objective function value d A,q ; q =1, 2, … , 20; 记录此时最优目标函数值d A,min =min(d A,q,min ),并记录最优函数值所对应的最优解P S,min Record the optimal objective function value d A,min =min( d A,q,min ) at this time, and record the optimal solution P S,min corresponding to the optimal function value; 步骤24:从上述种群{P S,q }中以一定的概率随机选取个体用于步骤25和步骤26的操作;Step 24: randomly select individuals from the above-mentioned population { P S, q } with a certain probability for the operations of Step 25 and Step 26; 个体P S,q 被选中的概率为公式5:The probability that the individual P S,q is selected is Equation 5: , q=1,2,…,20; q = 1, 2, ..., 20; 步骤25:从种群{P S,q }中随机选择两个个体P S,k P S,l ,将个体P S,k 中的第i个元素P S,k,i 与个体P S,l 中的第j个元素P S,l,j 按照公式6进行交叉操作,其中k, l=1, 2, … , N S i, j=1,2, 3, 4;Step 25: Randomly select two individuals P S,k and P S,l from the population { P S,q }, and compare the i -th element P S,k,i in the individual P S ,k with the individual P S, The jth element P S,l,j in l is crossed according to formula 6, where k, l =1, 2, … , N S ; i, j =1, 2, 3, 4; 公式6:P S,k,i = P S,k,i (1-0.6)+ P S,l,j 0.6;P S,k,j = P S,k,j (1-0.6)+ P S,l,i 0.6,其中,W是[0,1]区间内的随机数;Equation 6: P S,k,i = P S,k,i (1-0.6)+ P S,l,j 0.6; P S,k,j = P S,k,j (1-0.6)+ P S,l,i 0.6, where W is a random number in the interval [0,1]; 步骤26:从种群{P S,q }中随机选择一个个体P S,h ,将P S,h 中的第t个元素按照公式7进行变异操作,公式7:Step 26: Randomly select an individual P S,h from the population { P S,q }, and perform mutation operation on the t -th element in P S,h according to formula 7, formula 7: 其中,P min P max 分别为P S,h,t 取值范围的下界、上界;k为当前迭代次数;C为[0,1]区间内的随机数;Among them, P min and P max are the lower and upper bounds of the value range of P S, h, t respectively; k is the current iteration number; C is a random number in the interval [0,1]; 步骤27:经过步骤25和步骤26,形成新的种群{P S,q };Step 27: After Step 25 and Step 26, a new population { P S, q } is formed; 将(x 1 , x 2 , … , x r )=P S,q 代入有目标优化问题的约束方程;如果个体满足约束方程,则可计算该个体对应的目标函数值f q Substitute ( x 1 , x 2 , . _ f min f q ,则更新最优解为P S,min =P S,q ,且更新其对应的目标函数最优值f min =f q q=1,2, … , 20;r=1, 2, … , 4;If f min f q , update the optimal solution to P S,min = P S,q , and update the corresponding optimal value of the objective function f min = f q ; q =1,2, … , 20; r =1, 2, … , 4; 步骤28:如果遗传算法的进化代数大于最大进化代数200,则停止迭代,且输出目标优化问题的最优解(x 1 , y 1 , α 1 , β 1 )=P S,min 和其相对应的目标函数值d A,min =min(d A,q,max ),否则将此时的种群{P S,q }作为下一次进化的初始种群,并跳转至步骤24继续寻优。Step 28: If the evolutionary algebra of the genetic algorithm is greater than the maximum evolutionary algebra of 200, stop the iteration, and output the optimal solution of the target optimization problem ( x 1 , y 1 , α 1 , β 1 ) = P S,min and its corresponding The objective function value d A,min =min( d A,q,max ), otherwise the population at this time { P S, q } is used as the initial population of the next evolution, and jump to step 24 to continue the optimization. 7.根据权利要求4所述的一种基于最大实体要求(MMR)圆柱的平行度评定方法,其特征是:7. A method for evaluating parallelism based on a maximum entity requirement (MMR) cylinder according to claim 4, characterized in that: 对目标优化问题2的求解方法如下:The solution to objective optimization problem 2 is as follows: 步骤31:首先初始化种群的参数,这些参数存在以下几方面内容:种群的规模N S 为20、每个个体的长度R为4、最大进化代数K为200、交叉概率W为0.6、变异概率C为0.1;Step 31: First initialize the parameters of the population. These parameters have the following contents: the size of the population N S is 20, the length R of each individual is 4, the maximum evolutionary generation K is 200, the crossover probability W is 0.6, and the mutation probability C is is 0.1; 步骤32:设置N S 个个体P S,q (P S,q,1 , P S,q,2 , P S,q,3 , P S,q,4 ),它的值与目标优化问题1中的解(x 1 , y 1 , α 1 , β 1 )相对应,q=1, 2, … , 20;由所有个体构成的集合为{P S,q };Step 32: Set N S individuals P S,q ( P S,q,1 , P S,q,2 , P S,q,3 , P S,q,4 ), whose value is the same as the target optimization problem 1 The solutions in ( x 1 , y 1 , α 1 , β 1 ) correspond to, q =1, 2, … , 20; the set composed of all individuals is { P S,q }; 步骤33:按照均匀分布,分别在 P S,q,1 , P S,q,2 , P S,q,3 , P S,q,4 取值范围内随机获得N S 个值,以生成N S 个个体P S,q q =1, … ,20;Step 33: According to a uniform distribution, randomly obtain N S values within the value range of P S,q,1 , P S,q,2 , P S,q,3 , P S,q,4 to generate N S individuals P S,q ; q =1, . . . , 20; P S,q,1 , P S,q,2 , P S,q,3 , P S,q,4 的值分别作为上述目标优化问题1中自变量x 1 , y 1 , α 1 ,β 1 的值,并计算其对应目标函数值d A,q q=1, 2, … , 20;Take the values of P S,q,1 , P S,q,2 , P S,q,3 , P S,q,4 as the independent variables x 1 , y 1 , α 1 , β in the above objective optimization problem 1, respectively 1 , and calculate its corresponding objective function value d A,q ; q =1, 2, … , 20; 记录此时最优目标函数值d A,min =min(d A,q,min ),并记录最优函数值所对应的最优解P S,min Record the optimal objective function value d A,min =min( d A,q,min ) at this time, and record the optimal solution P S,min corresponding to the optimal function value; 步骤34:从上述种群{P S,q }中以一定的概率随机选取个体用于步骤25和步骤26的操作,个体P S,q 被选中的概率为公式5:Step 34: Randomly select individuals from the above-mentioned population { P S, q } with a certain probability for the operations of Step 25 and Step 26. The probability of individual P S, q being selected is formula 5: , q=1,2,…,20; q = 1, 2, ..., 20; 步骤35:从种群{P S,q }中随机选择两个个体P S,k P S,l ,将个体P S,k 中的第i个元素P S,k,i 与个体P S,l 中的第j个元素P S,l,j 按照公式6进行交叉操作,其中k, l=1, 2, … , N S i, j=1,2, 3, 4;公式6:P S,k,i = P S,k,i (1-0.6)+ P S,l,j 0.6;P S,k,j = P S,k,j (1-0.6)+ P S,l,i 0.6,其中,W是[0,1]区间内的随机数;Step 35: Randomly select two individuals P S,k and P S,l from the population { P S,q }, and compare the i -th element P S,k,i in the individual P S ,k with the individual P S, The jth element P S,l,j in l is crossed according to formula 6, where k, l =1, 2, … , N S ; i, j =1,2, 3, 4; formula 6: P S,k,i = P S,k,i (1-0.6)+ P S,l,j 0.6; P S,k,j = P S,k,j (1-0.6)+ P S,l, i 0.6, where W is a random number in the interval [0,1]; 步骤36:从种群{P S,q }中随机选择一个个体P S,h ,将P S,h 中的第t个元素按照公式7进行变异操作,公式7:Step 36: Randomly select an individual P S,h from the population { P S,q }, and perform mutation operation on the t -th element in P S,h according to formula 7, formula 7: 其中,P min P max 分别为P S,h,t 取值范围的下界、上界;k为当前迭代次数;C为[0,1]区间内的随机数;Among them, P min and P max are the lower and upper bounds of the value range of P S, h, t respectively; k is the current iteration number; C is a random number in the [0,1] interval; 步骤37:经过步骤35和步骤36,形成新的种群{P S,q };Step 37: After Step 35 and Step 36, a new population { P S, q } is formed; 将(x 1 , x 2 , … , x r )=P S,q 代入有目标优化问题的约束方程;如果个体满足约束方程,则可计算该个体对应的目标函数值f q Substitute ( x 1 , x 2 , . _ f min f q ,则更新最优解为P S,min =P S,q ,且更新其对应的目标函数最优值f min =f q q=1,2, … , 20;r=1, 2, … , 4;If f min f q , update the optimal solution to P S,min = P S,q , and update the corresponding optimal value of the objective function f min = f q ; q =1,2, … , 20; r =1, 2, … , 4; 步骤38:如果遗传算法的进化代数大于最大进化代数200,则停止迭代,且输出目标优化问题的最优解(x 0 , y 0 , , )=P S,min 和其相对应的目标函数值d B,min =min(d B,q,min ),否则将此时的种群{P S,q }作为下一次进化的初始种群,并跳转至步骤34继续寻优。Step 38: If the evolutionary algebra of the genetic algorithm is greater than the maximum evolutionary algebra of 200, stop the iteration, and output the optimal solution of the target optimization problem ( x 0 , y 0 , , ) = P S,min and its corresponding target The function value d B,min =min( d B,q,min ), otherwise the population { P S,q } at this time is used as the initial population of the next evolution, and jumps to step 34 to continue the optimization.
CN201710830122.7A 2017-09-15 2017-09-15 One kind being based on the depth of parallelism assessment method of maximum material requirement (MMR) cylinder Pending CN109506613A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710830122.7A CN109506613A (en) 2017-09-15 2017-09-15 One kind being based on the depth of parallelism assessment method of maximum material requirement (MMR) cylinder

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710830122.7A CN109506613A (en) 2017-09-15 2017-09-15 One kind being based on the depth of parallelism assessment method of maximum material requirement (MMR) cylinder

Publications (1)

Publication Number Publication Date
CN109506613A true CN109506613A (en) 2019-03-22

Family

ID=65744719

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710830122.7A Pending CN109506613A (en) 2017-09-15 2017-09-15 One kind being based on the depth of parallelism assessment method of maximum material requirement (MMR) cylinder

Country Status (1)

Country Link
CN (1) CN109506613A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110809284A (en) * 2019-09-25 2020-02-18 福建新大陆软件工程有限公司 Positioning method, system, device and readable storage medium based on MR data

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110809284A (en) * 2019-09-25 2020-02-18 福建新大陆软件工程有限公司 Positioning method, system, device and readable storage medium based on MR data
CN110809284B (en) * 2019-09-25 2022-09-16 福建新大陆软件工程有限公司 Positioning method, system, device and readable storage medium based on MR data

Similar Documents

Publication Publication Date Title
WO2022161000A1 (en) Training method and training apparatus for machine learning model, and evaluation system
CN104298818B (en) A kind of end mill processing surface error prediction and emulation mode
Anthony et al. Reference software for finding Chebyshev best-fit geometric elements
CN103047959B (en) A kind of flat form error detection method based on entropy theory towards Fine Boring
CN106354942B (en) Assembly contact stress distribution evaluation method based on entropy theory
TW200921085A (en) Determining profile parameters of a structure using approximation and fine diffraction models in optical metrology
CN110285781B (en) Rapid assessment method for plane parallelism relative to reference plane
CN106202741B (en) A Concentricity Evaluation Method Based on Minimum Solid State
CN102136157A (en) Three-dimensional microscopic simulation model of concrete and establishment method thereof
Luo et al. A method for axis straightness error evaluation based on improved artificial bee colony algorithm
Wen et al. Monte Carlo method for the uncertainty evaluation of spatial straightness error based on new generation geometrical product specification
CN107609227A (en) A kind of assembly technology optimization method based on maximum entropy theory
CN110579201A (en) A Flatness Evaluation Method Based on Differential Evolution Algorithm
CN109506613A (en) One kind being based on the depth of parallelism assessment method of maximum material requirement (MMR) cylinder
CN112131679B (en) A reverse push adjustment method for initial residual stress of workpiece
CN105571629A (en) Additive manufacturing equipment or technology performance measurement method
Chen et al. Cylindricity error measuring and evaluating for engine cylinder bore in manufacturing procedure
CN113569448B (en) An optimization method for structural parameters of strain gauge sensitive gate based on response surface method
Cheng et al. A novel kinematic parameters identification method for articulated arm coordinate measuring machines using repeatability and scaling factor
CN109101759A (en) A kind of parameter identification method based on forward and reverse response phase method
Wang et al. Thermal error modeling of a machine tool using data mining scheme
CN113570147A (en) A method and equipment for rapid prediction of machining errors of thin-walled parts under multiple working conditions
CN110348118A (en) One kind being based on the gradient assessment method in the hole maximum material requirement (MMR)
CN103310106B (en) The computing method of a kind of hole in piece part system acts
CN108592852A (en) A kind of assessment method of the fast steady letter of the concentricity based on dual Tolerance Principle

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20190322

WD01 Invention patent application deemed withdrawn after publication