FIGURE 6-20. The Part with the Mislocated Peg in Figure 6-18 Is Assembled to the Part with the Misoriented Hole in Figure 6-19. Assembly occurs by placing frame D' of part A directly onto frame E' of part B. Transform T' AF tells in frame A coordinates where point F is as a result of including both peg location and hole orientation errors. The last equation can be read to say: "To go from A to F, first go from A to D', then from D' to E', then from E' to F." Because we put D' onto E' when we assembled the parts, the interface transform TOE is the same as IDE- FIGURE 6-21. Wedging Conditions for Assembling Round Pegs and Chamfered Holes. On the left is a simplified model of peg-hole assembly. D and d are hole and peg diameters, respectively. SQ and BQ ar e ini- tial lateral and angular error of the peg with respect to the hole. W is the width of the chamfer, /x is the coeffi- cient of friction, and c is the clearance ratio, defined in the figure. On the right is a graph showing values of SQ and do that permit successful assembly, avoiding wedg- ing the parts or a collision outside the chamfer. FIGURE 6-22. Illustration of Assembly Process Capability. Top left: A robot puts a peg in a hole on a set of assembled parts. The chain of frames at the bottom left TA-TD describes the nominal location of the tip of the next part to be assembled, while the chain of frames T1-T4 describes the nominal location of the receiving part. Transform TO links these two chains. Bottom left: The nominal design is correct, so that the chains meet and the errors in position and angle fall inside the wedging diagram, as indicated by the open circle. On the right there are some errors in the fabrication of the parts so that the chains of frames do not meet exactly. The resulting lateral and angular errors are shown schematically as a black dot just outside the wedging diagram. Not shown, but also possible, are errors in frames TA-TD representing robot errors, along with an error in TO representing calibration or other errors that misplace the assembly fixture in robot coordinates. 154 6.D. EXAMPLES 155 FIGURE 6-23. Combination of Wedging Conditions and Probability Ellipsoid of Position and Angle Error. The area of the ellipse covered by the parallelogram represents the probability that assembly will not fail due to wedging. FIGURE 6-24. Three Planar Parts Assembled by Welding, and Their Liaison Diagram. The KG is the relative location of point 1 on part A and point 2 on part C. The thick shaded lines represent welds. FIGURE 6-25. First Step in the Assembly, Joining Parts A and B Using Fixture 1. Parts A and B are placed in the fixture using pin-hole and pin-slot features. Then they are welded together. The fixture is shown in heavy lines. The state of the parts before they are put on the fixture is shown in dashed lines. 6.D.3. Variation Buildup with Fixtures In the previous section we looked at error buildup in an assembly and its effect on assembleability of the next part. In this section we look at how errors build up when more than one fixture is used. There are many ways to design an assembly process using fixtures. Some of these are bet- ter than others. For example, the fixtures may actually overconstrain the parts, a point that underlies one of the thought questions at the end of the chapter. Another ex- ample is studied here, namely different ways that the parts can be fixtured, especially when the assembly consists of several parts, the KC is measured across parts that are not adjacent to each other, and several fixtures are used one after the other to build up the assembly. Someone has proposed a process for assembling the planar sheet metal parts shown in Figure 6-24. Parts A and B are welded together using fixture 1, and the sub- assembly of A and B is then moved to fixture 2 in order that part C may be welded on. The KC in question is the relative location of a point on part C with respect to one on part A. The parts in question do not pass constraint or location to each other. Their relative positions and angles are set entirely by the fixtures. We will see as we look at this proposed process that it is not the optimum way to accomplish the assembly. The thought questions at the end of the chapter ask you to consider many alternative fixturing arrangements. The first step in the proposed assembly process is shown in Figure 6-25, in which parts A and B are joined on fixture 1. The second step is shown in Figure 6-26, in which the subassembly A-B is carried to fixture 2 and joined there to part C. Fixture 2 locates the subassembly using features on part B. Figure 6-27 uses coordinate frames to show what hap- pens while assembling these parts. Fixture Fl locates parts A and B relative to each other, while fixture F2 lo- cates parts B and C relative to each other. A coordinate frame representation of the complete as- sembly and the KC appears in Figure 6-28. It is constructed by placing the two frames labeled "B" in Figure 6-27 on top of each other. The figure shows that, in order to find the relative location of the points on parts A and C that constitute the KC, we need to trace a chain of frames be- tween these points that includes both fixtures. This does not mean that we have to account for the relative location of the fixtures with respect to each other on the factory floor. We can see this because there is no direct chain link 156 6 MODELING AND MANAGING VARIATION BUILDUP IN ASSEMBLIES FIGURE 6-27. Coordinate Frame Representation of the Two-Step Assembly of Parts A and B Using Fixtures F1 and F2. between these two frames in Figure 6-28. What we must do is account for the error that fixture 1 introduces between parts A and B as well as the error that fixture 2 introduces between parts B and C, plus the errors inside each part between the KC points and the features used for fixturing. Note that this assembly plan locates the first assembly operation by means of features on parts A and B while the second step's operations are done by locating the sub- assembly using features on parts B and C. In cases like this, we say that a datum transfer or datum shift has occurred because the second fixture uses different part features than the first fixture does. If fixture 2 located the subassembly using the same part A features that fixture 1 used, then there would be no datum shift and the chain links between fixture 1 and fixture 2 would not appear in Figure 6-28. In fact, neither fixture 1 nor part B would even appear in Figure 6-28! One of the thought questions at the end of the chapter asks for a drawing of the chain under those circumstances. Consider the instance where the subassembly of A and B is built by a supplier using fixture 1 while C (or a sub- assembly more complex than just one part) is made by another supplier. Now consider the problem faced by the final assembler who buys these subassemblies and puts them together using fixture 2. If the KC is not achieved, the final assembler must be aware of the entire chain in Figure 6-28 in order to carry out an effective diagnosis of the problem. If the suppliers are far apart, the "length" of this chain could be hundreds or thousands of miles. On the other hand, if step 2 used the features on part A, the final assembler would have an easier diagnosis problem because most of the chain would be contained within his plant. Only that part of the chain representing errors within part A would be outside his plant. FIGURE 6-28. Left: A chain of frames joins the ends of the KC. Steps 1 and 2 are indi- cated by ellipses. Only frame B is in both el- lipses. Right: For clarity, the arrows represent- ing the 4x4 transforms in the chain are shown separately. FIGURE 6-26. The Second Step in the Assembly, Adding Part C to the Subassembly of Parts A and B, Using Fix- ture 2. The weld joint between parts A and B is shown as a thick shaded line. The fixture locates subassembly AB using features on B. 6.D. EXAMPLES 157 FIGURE 6-29. Car Door Dimensions. These are typical di- mensions, taken from the author's car. 6.D.4. Car Doors In this section we will do some examples that illustrate the following: • The difference between worst-case and statistical tol- erancing assumptions • The difference between uniform and Gaussian or nor- mal statistics The MATLAB files that support these examples are on the CD-ROM that is packaged with this book. Consider the car door sketched in Figure 6-29. We would like to know the effect on the location (position and orientation) of the door in three dimensions of mis- locating the hinges on either the door or the car body frame. To do this, we need to define the KC and the rel- evant dimensions. These are shown in Figure 6-30. The hinges are positioned on the door at coordinate locations shown in this figure but are assumed possibly mislocated in dimensions Y and Z with respect to frame 0, which is the door's base coordinate frame. Errors with respect to X FIGURE 6-31. Example of the Effect on Door Position and Orientation Due to Misplacement of the Hinges. The door is tilted clockwise in the Y-Z plane and counterclock- wise in the X-Z plane. It is also lifted along Z. The door's nominal position and orientation are shown in gray while the varied door is shown in black. Some horizontal and vertical grid lines have been added to help make the variation easier to see. are most likely to occur when the door is mounted to the car body but are modeled below in MATLAB as though they occur when the hinges are mounted to the door. To perform the analysis, we assume that the two hinges comprise one compound feature as defined in Section 6.B.2. The origin of this feature is the lower hinge whose frame a is nominally located at frame 1, while the other feature component of the compound feature is the upper hinge located at frame b. The tolerance on each hinge's location in X, Y, and Z is assumed to be ±4.5 mm or ±0.1771". Figure 6-31 shows the door out of position and orien- tation due to an example set of misplaced hinges. FIGURE 6-30. Coordinates and KC for a Car Door. The KC is the length of the vector joining the origin of the nominal frame 2 and varied origin of frame 2. Frame 0 is the door's base coordinate frame. Frame 1 is the nominal location of the lower hinge, which anchors the compound feature comprising the two hinges. The actual location of the lower hinge is frame a while the actual location of the upper hinge is frame b. For clarity, frames a and b are shown to one side of the two views of the door. 158 6 MODELING AND MANAGING VARIATION BUILDUP IN ASSEMBLIES TABLE 6-2. MATLAB Code for Worst-Case Analysis of Door Variation %door_main_worst %Door Main Program for Worst Case door_nominal ERR_MAX=0; for jj=l:64 VERRW(jj)=0; end q=0; for i=0:l; for j=0:l; for k=0:l; for 1=0:1; for m=0:l; for n=0:l; V=[ (-l) A i(-l)":i (-irk(-iri(-irm(-irn] q=q+l; door_dev; door_errs; door_act; DT; q; ERR; VERRW(q)=ERR; if ERR>ERR_MAX ERR_MAX=ERR; is = i ; js = j; ks=k; ls = l; ms =m ; ns=n; qs=q; end end end end end end end is js ks Is ms ns ERR_MAX 6.D. EXAMPLES 159 TABLE 6-3. Supporting Routines for Worst-Case Door Variation Calculation First we will perform a worst-case analysis. For this purpose we assume that each hinge could be at either ex- treme of its allowed range. With two hinges and three ± dimensions for each, we have a total of 64 cases to look at. The approach taken is a MATLAB simulation. The main code is in Table 6-2. It is not very imaginative: it simply enumerates all 64 cases. The supporting routines are given in Table 6-3. The results are shown in Figure 6-32. All 64 cases ap- pear, of which 8 are identical and worst, with an error of 1.1894". If a statistical analysis is done instead, we have our choice of probability distributions for the individual errors. If we choose Gaussian, we need to assign a standard de- viation. For this purpose, we use 3a = 0.1771. A sample histogram of individual hinge position errors calculated this way appears in Figure 6-33. Figure 6-34 shows an example uniform distribution of individual hinge location errors analogous to Figure 6-33. The MATLAB code for conducting the statistical anal- ysis of assembled door variation, given Gaussian or uni- formly distributed individual hinge location errors, is %door_nominal %nominal location of door coordinate frames Al=[l 0 0 5;0 I 0 0;0 0 1 11,-0 0 0 1] ; A2 =[1 0 0 40,-0 1 0 0;0 0 1 34,-0 0 0 1 ] ; %door_dev %calculate deviations E=4.5/25.4 dxl=E*V(l) dx2=E*V(2) dyl=E*V(3) dy2=E*V(4) dzl=E*V(5) dz2=E*V(6) %door_errs %door error matrices dAl=[0 0 0 dxl;0 0 0 dyl;0 0 0 dzl;0 0 0 0]; ddx2=-(dy2-dyl)718; ddy2=(dx2-dxl) 718; ddz2=0; dA2=[0 -ddz2 ddy2 0;ddz2 0 -ddx2 0;-ddy2 ddx2 0 0;0 000]; %door_act %actual door position T=(eye(4)+dAl)*Al*(eye(4)+dA2)*A2; DT=T-A1*A2; ERR=V_L(DT(1:3, 4 ) ) ; %V_L %calculate length of vector function vector_length=V_L(x) vector_length=sqrt (x(l) / "2+x(2) / '2+x(3)' N 2) ; 160 6 MODELING AND MANAGING VARIATION BUILDUP IN ASSEMBLIES given in Table 6-4 and Table 6-5. The results are given in Figure 6-35 for Gaussian and in Figure 6-36 for uniform. Several things are worth noting about this example. First, it is a full three-dimensional analysis. It is not a FIGURE 6-32. Histogram of Worst-Case Analysis of Door Variation. All 64 cases appear, and 8 (12.5%) of these have the same worst value of over an inch! One of these 8 is listed in the figure. There, the notation ">0" means that the individ- ual error is at the positive maximum end of the range, namely 0.1771, while the notation "<0" means that the individual error is at the negative maximum end of the range, namely -0.1771. simple RSS analysis of a linear stack of tolerances. As such, it is difficult to compare worst-case and statistical error accumulation using an analysis like that in Equa- tions (5-23) and (5-24). The best way to make that com- parison is to compare Figure 6-32 with Figure 6-35 and Figure 6-36. This comparison indicates that the statistical analysis (whether using Gaussian or uniform distributions of individual feature errors) gives a much smaller range of predicted assembly-level errors and a much smaller max- imum value, based on a simulation using 10,000 sam- ples. It is also interesting that the uniform distribution assumption for individual hinge errors, while allowing many more large individual errors, nonetheless gives similar results to the Gaussian analysis, reaffirming our assumption, discussed in Chapter 5, that the sum of sev- eral random variables of any distribution tends toward a Gaussian distribution. Note that a combined vector error of over an inch is huge. It could be argued that typical automobile door fab- rication and hinge placement can easily avoid 3cr errors of 0.177". Nevertheless, 0.177" is not large compared to the size of the door. The reason such a small error has such a huge effect is that it enables an angular error which in turn has a lever arm over 40" long in which to operate. Even if we were able to cut the individual feature place- ment errors by two-thirds to 0.06" corresponding to 1.5 mm (close to the minimum feasible), the resulting error at the FIGURE 6-33. Sample Histogram of Gaussian Random Individual Hinge Location Errors for Statistical Analysis of Door Variation, Based on 10000 Trials. The figure shows that nearly all the individual errors will fall within the bounds of the worst-case values, which are shown for reference. FIGURE 6-34. Sample Histogram of Uniform Random Hinge Location Errors for Statistical Analysis of Door Vari- ation, Based on 10,000 Trials. 6.D. EXAMPLES 161 opposite corner of the door would still be approximately 0.33", which is unacceptably large. For this reason, door fit accuracy is not achieved by raw control of hinge location errors but instead makes use of a variety of clever fixtures and hinging and door mounting techniques mentioned in Chapter 2 and discussed in more detail in Chapter 8. 2 Finally, all these calculations assume no mean shifts. If there are mean shifts, then the errors will be much worse. TABLE 6-4. MATLAB Code for Statistical Analysis of Door Variations %Door Main Program for Statistical Case %In line 8, call door_dev_statu for uniform random errors %In line 8, call door_dev_statg for gaussian random errors door_nominal for jj=l:10000 VERRS(jj)=0; end for kk=l:10000 door_dev_statu; %door_dev_statg door_errs; door_act; ERR; VERRS(kk)=ERR; end Note: Supporting routines are given in Table 6-3 and Table 6-5. TABLE 6-5. Supporting MATLAB Routines for Statistical Analysis of Door Variations %door_dev_statu %statistical door errors, uniform distribution E=4.5/25.4; dxl=2*E*(rand 5) dx2=2*E*(rand 5) dyl=2*E*(rand 5) dy2=2*E*(rand 5) dzl=2*E*(rand 5) dz2=2*E*(rand 5) %door_dev_statg %statistical door errors E=4.5/(3*25.4); vrn=E; dxl=randn*vrn dx2=randn*vrn dyl-randn*vrn dy2=randn*vrn dzl=randn*vrn dz2=randn*vrn FIGURE 6-35. Histogram of Statistical Analysis of Door Variation Using Gaussian Distribution of Individual Fea- ture Variations Based on 10,000 Trials Using the Code in Table 6-4. This error is the length of the three-dimensional vector from the nominal XYZ position of point 2 on the door (shown in Figure 6-30) to its varied position. 2 Sometimes, in addition, a person known respectfully as "Big Mike" makes some final adjustments. Next Page 162 6 MODELING AND MANAGING VARIATION BUILDUP IN ASSEMBLIES 6.E. TOLERANCE ALLOCATION Tolerances are applied to parts so that the final assembly will achieve its KCs. In most cases, only the sum of part variations over the parts in each assembly matters. For this reason, the amount of variation tolerable from each part is to some degree a decision that the designer can make, as long as the total variation is within limits. This decision is called tolerance allocation. The models and examples in Section 6.B are based on assigning the same tolerance to each dimension, but this is neither necessary nor de- sirable. The typical approach to this problem, other than guessing or giving each part the same tolerance, is to find the minimum cost solution. Another approach, one that is consistent with the theory in this book, is to allocate the tolerances so that the assembly-level dimension achieves some C p k and that the individual part dimensions do so as well. We will briefly discuss each of these approaches in the next two subsections. 6.E.1. Tolerance Allocation to Minimize Fabrication Costs Tolerance allocation to minimize fabrication costs has been extensively studied by academic researchers. The discussion that follows is based on [Chase, Greenwood, Loosli, and Hauglund], which contains a survey of toler- ance cost models. The basic idea is that cost rises as tolerances get smaller. The reasons include requiring a more expensive machine, requiring more process steps, changing tool bits or mea- suring more often, paying a more highly skilled operator, taking more time, or scrapping (or reworking) more parts. Among cost models that have been used are the following: where A is a fixed cost, B is a tolerance cost factor, and T is the tolerance. The problem is posed as one of choosing n tolerances Ti, i = !, ,«, for parts involved in delivering a KC so as to minimize the total cost of making the parts while sat- isfying the constraint that the total variation equal a certain amount. The total variation can be modeled as accumu- lating according to statistical tolerancing assumptions or worst-case assumptions. The typical way to do this for the statistical accumulation case is the method of Lagrange multipliers: Constrained minimization problem: where A. = the Lagrange multiplier This is solved by differentiating with respect to 7} and solving for A. This expression is substituted into the FIGURE 6-36. Histogram of Statistical Analysis of Door Variation Using Uniform Distribution of Individual Feature Variations. Previous Page 6.E. TOLERANCE ALLOCATION 163 total variation constraint to obtain the individual 7}. The result is The procedure is to solve Equation (6-21) for T\ and substitute it into Equation (6-20) for each value of i to obtain the other 7}. This method works for the case where the assembly tolerance is wanted exactly rather than as an upper limit. In addition, the cost functions must be differ- entiable. Moreover, if different process options are avail- able for different ranges of tolerances, a different method that involves search must be used. Several alternatives are discussed in [Chase, Greenwood, Loosli, and Hauglund]. 6.E.2. Tolerance Allocation to Achieve a Given C pk at the Assembly Level and at the Fabrication Level In this method, developed in [Terry], we can again use either statistical tolerancing or worst-case tolerancing, but statistical tolerancing is assumed in the discussion that follows. Here, the basic idea is that customer require- ments dictate some upper and lower specification limits USL K c and LSL K c for some KC. We assume that we have a model for how the KC will be distributed statistically, so that we can calculate a C^KC f° r it- We start by assigning a machine to fabricate each fea- ture and determining, from history or experiments, what variance the machine can achieve while fabricating that feature. After obtaining variance data for each machine- feature combination, we must assign a USL and an LSL to each feature (this is the tolerance allocation step) and use the achievable variances to calculate the C p kFt of each feature F/. Our goal is to have each feature under control and capable as well as to have the KC under control and capable. This typically means achieving Cpfc/r, = 1.33 for all the features and C P &KC = 1 -33 for the KC. A search al- gorithm is required to find the appropriate USLs and LSLs. Several outcomes are possible: C pk = 1.33 or better can be achieved for the KC and each feature with the given machines by assigning the features to machines appropriately (which may require a search of its own). CpkKC near 1.33 can be achieved, but 100% inspec- tion might be necessary if one or more processes has C p kn = 1-00 or less. Some features might have to be assigned to differ- ent machines with smaller variances in order to achieve C p kKC = 1-33. In this case, an additional search must be conducted to find the best assignments of features to TABLE 6-6. Tolerance Allocation Process to Achieve Desired C p ^ for Each KC and Contributing Feature Ke 1 1.1 1.2 2 2.1 2.2 y Tasks and Substeps Define the key characteristic (KC) and its design limits. Determine the relationship between the KC and product performance. Determine the failure condition. Determine mathematical relationship between the KC and its component assembly key characteristics (AKC). Determine component AKCs. Calculate sensitivity of KC to each of its AKCs. Quantitative Evaluation Criteria Efficiency, capacity, other quantified performance measure Mechanical interference, excessive stress, etc. Y = f(X } ,X 2 ,X 3 , ,X m ) Y = the top-level KC Xj = contributing feature parameters or lower-level KCs Depends on datum structure and feature or dimension location on part o 3Y ^> - dXi Results Fully specified KC. Specification limit. For clearances, this is most often the USL. Specification limit. For clearances, this is most often the LSL. Relationship between the KC and each of its component AKCs. List of contributing features Sensitivity of the KC to each of its AKCs Analytical Tools Used, References, and Comments May require designed experiments, engineering models, etc. Failure modes and effects analysis Engineering analysis Engineering analysis Engineering analysis (continued) [...]... for Mechanical Assemblies with Automated Process Selection," Manufacturing Review, vol 3, no 1, pp 49 -59, 1990 [Chase et al.] Chase, K W., Magleby, S P., and Glancy, G., "A Comprehensive System for Computer-Aided Tolerance Analysis of 2-D and 3-D Mechanical Assemblies, " in Geometric Design Tolerancing: Theories, Standards, and Applications, ElMaraghy, H A., editor, London: Chapman and Hall, pp 2 94- 307,... bearing B The desired situation is shown in Figure 6 -43 If part A is overrepresented by ones that are too small while part B is overrepresented by ones that are too big, then big A's and small B's will be quickly used up and the process will stop with a lot of small A's and big B's unable to find mates This issue is illustrated in Figure 6 -44 FIGURE 6 -43 Illustrating Selective Assembly of a Shaft and... Copyright © David Glenn Used by permission.) dies It should be clear from Figure 6 -47 that rework will be less likely under functional build However, all its disadvantages must be weighed in deciding whether to adopt it or not 6.H CHAPTER SUMMARY This chapter showed how to build models of varied open chain assemblies using 4 x 4 matrix transforms Methods were developed to represent single features, compound... information determines the quality of the model 4 Statistically allocate tolerances to maximize manufacturability 4. 1 Statistically combine contributing AKCs to get the expected mean and standard deviation values oftheKC Fully specified statistical distribution of the KC Excel, statistical analysis software 4. 2 Evaluate the expected capability of the KC 4. 3 Assign preliminary upper specification limits... Application of Tolerance Analysis to the Design of Mechanical Assemblies, " Research in Engineering Design, vol 3, pp 23-37, 1991 [Glenn] Glenn, D W., "Modeling Supplier Coordination in Manufacturing Process Validation," Ph.D thesis, University of Michigan IOE Department, 2000 [Hu] Hu, S J., "Stream of Variation Theory for Automotive Body Assemblies, " Annals ofCIRP, vol 46 , no 1, pp 1-6, 1997 [Jastrzebski] Jastrzebski,... "Software for Analysis of 3D Statistical Tolerance Propagation in Assemblies Using Closed Form Matrix Transforms," S.M thesis, MIT Department of Mechanical Engineering, June 1991 [Lafond and Laperriere] Lafond, P., and Laperriere, L., "Jacobian-based Modeling of Dispersions Affecting Predefined Functional Requirements of Mechanical Assemblies, Parts 1 and 2," 1999 IEEE International Symposium on Assembly... slot 1 74 6 MODELING AND MANAGING VARIATION BUILDUP IN ASSEMBLIES How much will the angle of plate 2, moving about the Z axis, change if the location of pin f2 changes by ±0.003 in either the X or Y directions in part 1 home coordinates (at the lower left)? Answer separately for X and Y Provide numerical answers FIGURE 6-50 Second Figure for Problem 2 5 Answer the same question as in problem 4 but instead... as well as in Problem 9 above, noting which are the same and which are different FIGURE 6-59 Figure for Problem 13 14 Consider Figure 6 -47 Assume that errors v 1 and v2 are independent and normal with mean of zero and 3a = 2 What is the 176 6 MODELING AND MANAGING VARIATION BUILDUP IN ASSEMBLIES probability that dies built according to the build to print strategy will need no adjustment? Answer the... 4. 3 Assign preliminary upper specification limits (USL) to each of the AKCs and calculate the standard deviation required to achieve a Cp/tx, of 1.33 Estimate the Cpk of each AKC using the USLX above 4. 4 4. 5 Using the specification limits on the KC from step 1 as a constraint, iteratively adjust the USL;c for each AKC to maximize the individual Cp&s without exceeding a constraint condition USLy is determined... the 48 6 microprocessors discussed in Chapter 5, they are placed in the bin reserved for lifters of that thickness At one factory visited by the author, there were fifty such bins, as indicated on the right in Figure 6 -42 The difference in thickness from the thinnest to the thickest lifter was 200 /u,m, indicating that the builders of this engine cared about differences in cam-valve spacing of 4 /zm . 1 11,-0 0 0 1] ; A2 =[1 0 0 40 ,-0 1 0 0;0 0 1 34, -0 0 0 1 ] ; %door_dev %calculate deviations E =4. 5/25 .4 dxl=E*V(l) dx2=E*V(2) dyl=E*V(3) dy2=E*V (4) dzl=E*V(5) dz2=E*V(6) %door_errs %door . distribution E =4. 5/25 .4; dxl=2*E*(rand 5) dx2=2*E*(rand 5) dyl=2*E*(rand 5) dy2=2*E*(rand 5) dzl=2*E*(rand 5) dz2=2*E*(rand 5) %door_dev_statg %statistical door errors E =4. 5/(3*25 .4) ; vrn=E; dxl=randn*vrn dx2=randn*vrn dyl-randn*vrn dy2=randn*vrn dzl=randn*vrn dz2=randn*vrn FIGURE . 0;-ddy2 ddx2 0 0;0 000]; %door_act %actual door position T=(eye (4) +dAl)*Al*(eye (4) +dA2)*A2; DT=T-A1*A2; ERR=V_L(DT(1:3, 4 ) ) ; %V_L %calculate length of vector function vector_length=V_L(x) vector_length=sqrt