# Optimization Method of Assembly Tolerance Types Based on Degree of Freedom
## 6 Case Study  
The simplified assembly model of a mechanical product is shown in Figure 7a. The product consists of four main parts, and its geometric tolerance requirement is perpendicularity. The part P4 is movably connected to the hydraulic cylinder drive unit, which drives the part P4 in an up and down motion. Part P4 moves up and down relative to part P1. When designing the tolerance items of each part, it is necessary to select a reasonable tolerance type to meet the geometric functional requirements of the assembly. In this section, with reference to the automatic generation algorithm of tolerance items shown in Figure 7, the working part P4 in the assembly model is selected as the research object to explain in detail the implementation steps of optimizing tolerance items by screening with DOFs of the tolerance zone, and to verify the validity of optimizing the assembly tolerance types by using the DOFs of the tolerance zone. Figure 6: Algorithm for automatic generation of tolerance items based on DOF: subscript \(i\) for part number (\(l\) = 1,2..., n), j for feature number (\(j\) = 1,2..., q), and k for tolerance type sequence number (\(k\) = 1,2..., m). * Step 1: Construct a CAD three-dimensional assembly model according to the model in Figure 7a. * Step 2: Select the global coordinate system, and select the target part and measurement reference part of the assembly. Considering the convenience of determining the degrees of freedom of the tolerance band, the principle to be followed when establishing the overall coordinate system is as follows: take the measurement reference datum of the geometric function of the assembly as the XY plane, define the X-axis, Y-axis, and the direction perpendicular to the XY plane as the Z-axis. This is shown in Figure 8a. From Figure 8a of the model, it can be seen that the geometric functional requirement of the assembly is the perpendicularity, part P4 is the target part of the assembly, and P1 is the measurement reference part. The measured feature element is the center axis of the cylindrical surface P4S2, and the reference datum element is the plane P1S1 of part P1 as shown in Figure 7b. * Step 3: According to Figure 5, the CPDF vector \(V_{0}\) of the assembly body is determined. First, according to the global coordinate system, determine the DOF vectors \(V_{t}\) and \(V_{f}\), the feature being measured is the center axis of the P4S2 cylindrical surface, the tolerance type is perpendicularity, and the shape of the tolerance zone is a cylinder with diameter size \(t\). According to Table 1, the DOF of the tolerance zone vector \(V_{t}=(1\;0\;1\;1\;0)\), and according to Figure 4, the feature DOF vector \(V_{f}\) of the reference feature P1S1 plane can be obtained as \((0\;0\;1\;1\;1\;0)\). Secondly, determine the common DOF vector \(V_{c}\). From Equation (8), it can be seen that  
\[V_{c}=V_{t}\cap V_{f}=(1\;1\;0\;1\;1\;0\;)\cap(0\;0\;1\;1\;1\;0\;)=(0\;0\;0\; 1\;1\;0\;) \tag{17}\]  
Finally, determine the CPDF vector \(V_{0}\). The geometric functional tolerance of the assembly is the perpendicularity, which belongs to the direction tolerance. Therefore, by introducing Equation (12) into Equation (9) and performing a Boolean operation, we obtain \(V_{0}=(0\;0\;0\;1\;1\;0)\). Figure 7: (**a**) Simple assembly model; and (**b**) assembly constraints diagram between parts. * Step 4: Select the automatic tolerance generation method based on the rule reasoning algorithm, and deduce the tolerance item \(TSS_{i(j)\_k}\) of the assembly feature elements of each part. The recent ontology-based automatic reasoning algorithm of [PERSON] et al. [33; 34] is a representative automatic generation method of tolerance specifications. In this paper, we choose the automatic generation algorithm of tolerance items proposed in the literature by [PERSON] [33], use Protege software to construct the tolerance domain knowledge ontology, input the SWRL inference rules, and obtain the automatically recommend tolerance items of each part of the assembly.