Dr. R. Vepa, QMUL, U of L., 07/01/21 1 School of Engineering and Material Science DENM011/DEN408 Robotics Computer Aided Simulation Tutorial Exercise 2021 Title: Simulation of a two-link planar anthropomorphic simulator Learning objectives of the Simulation: The learning objective of this experiment is primarily to familiarize the student with basic robot manipulator positioning and control followed by an assessment of its design and performance features. This process is expected to aid the student in understanding the experimental method with reference to robot control systems. The student will then also be able to relate the process to the relevant mathematical modeling techniques presented in the lectures and the computer simulation he carries out on the PC. Method of assessment: Assessment is based on coursework (including any evidence of having completed the simulation independently by the student, in MATLAB) and a formal report of about (length) 10-20 pages, including graphs, plots, etc. The formal report is then assessed based on the evidence of understanding, depth, breadth and quality of the material presented. Aim of the Simulation: To investigate the factors governing the performance of a simple servo-controlled two link robot manipulator, and relate these to basic analytical techniques. Background Theory: In this section we shall briefly outline the dynamics of the two link robot manipulator and present the basis for the method of control. The control law is derived by the application of a generic method known as the computed torque method. The ideal case of a two-link manipulator is considered and the end-effector and its payload are modelled as a lumped mass, located at the tip of the outer link. Dr. R. Vepa, QMUL, U of L., 07/01/21 2 Fig. 1 Two-link planar anthropomorphic manipulator; the Z axes are all aligned normal to the plane of the paper The general equations of motion of a two-link manipulator may be expressed as: 11 ωθ = , 122 ωωθ −= , ( ) ( ) ( ) ( ) = Γ Γ + − + ++ 2 1 2 1 2 1 2 2 2 1 221 2 1 22221 2222122111 sin cos coscos T T gI II IIII ω ωωθ ω ω θ θθ where im , iL , icgL and icgk are the mass, length, the position of the c.g. with reference to the ith joint and radius of gyration about the c.g. of the ith link, ( ) ( ) 21222112121111 LMmLMkLmI cgcg ++++= , ( ) 1221222221 LLLMLmI cg Γ=+= , ( ) 2222222222 LMkLmI cgcg ++= , ( ) ( )21221111 coscos θθθ +Γ+Γ=Γ , ( )21222 cos θθ +Γ=Γ , and ( )1211121111 LMLMLmLm cg +++=Γ , ( )222222 LMLm cg +=Γ . 1T and 2T are the externally applied torques at the two joints. In the special case when the two links are uniform and identical to each other, i.e. when LLLLL cgcg ==== 2121 22 , mmm == 21 , mM 11 µ= , mM 22 µ= and 12122 2 1 == cgcg kk , Dr. R. Vepa, QMUL, U of L., 07/01/21 3 ++= 21 2 11 3 4 µµmLI , += 2 2 21 2 1 µmLI , += 2 2 22 3 1 µmLI , ++=Γ 2111 2 3 µµmL , +=Γ 222 2 1 µmL . The equations may be written in standard state-space form as, 11 ωθ = 122 ωωθ −= , ( ) ( ) ( ) + + ++ + ++ ++ 2 1 222 2222221 3 1 cos 2 1 3 1 cos 2 1 cos 2 1 3 4 ω ω µθµ µθµθµµµ ( ) = + ++ + − ++ 2 1 2 2 21 2 1 2 2 2 1 22 1 2 1 2 3 sin 2 1 T T mLL g µ µµ ω ωωθµ . Let, the inertia matrix be defined as, ( ) ( ) ( ) 1 2 2 2 2 2 2 2 2 2 4 1 1 1 cos cos 3 2 2 3 1 1 cos 2 3 robot µ µ µ θ µ θ µ µ θ µ + + + + + + + = + + I . Then it follows that, ( ) ( ) ( ) ( ) 2 2 2 2 1 1 2 2 2 1 2 2 2 1 1 1 cos 3 2 31 , 1 4 1 cos cos 2 3 2 robot µ µ θ µ µ µ µ θ µ µ µ θ − + − + − + = ∆ − + + + + + I , where, the determinant of the inertia matrix robotI is: ( ) ++ +++=∆ 2 2 2 221221 sin2 1 3 1 3 2 36 7 , θµµµµµµ . Thus the complete equations of motion of the manipulator are expressed in state space form as, 11 ωθ = , 122 ωωθ −= , Dr. R. Vepa, QMUL, U of L., 07/01/21 4 ( ) 1 22 2 1 1 1 21 2 22 22 2 1 2 3 21 1 sin 2 1 2 robot T g T LmL µ µ ω ω ωµ θ ω ω µ − + + − = − + − + I . Fig. 2 The strategy for Computed torque control The strategy of Computed torque control involves feeding back, to each of the joint servos, a signal that cancels all of the effects of gravity, friction, the manipulator inertia torques as well as the Coriolis and centrifugal torques. All these forces are computed on the basis of Euler-Lagrange dynamic model. All these effects are treated as disturbances that must be cancelled at each of the joints. Additional feedbacks are then provided to put in place the desired inertia torques, viscous friction torques and stiffness torques which are selected so the error dynamics behaves in a desirable and prescribed manner Thus the two servo-control torque motors at the joints may be assumed to identical and the feedback law may be assumed to be a computed torque controller. In the general case the computed torque controller inputs are, ( )qqhD ,ˆˆ 2 1 2 1 + ≡ v v T T c c . For the above 2-link manipulator, the equations of motion are written as, ( ) ( ) ( ) ( ) 2 2 1 1 1 2 111 21 2 22 21 2 22 21 2 221 2 22 222 22 1 2 cos cos sin cos c c T I I I I I I g I I IT θ ω ωθ θ θ θ θ ω − Γ+ + + = + + + Γ . (Observe that the Kinetic energy of the manipulator is, ( ) ( ) ( ) 1 111 21 2 22 21 2 22 1 2 1 2 21 2 22 22 2 2 2 cos cos1 1 cos2 2 I I I I I KE I I I θ θθ θθ θ θ θ θ θ θ + + + = = + H .) The equation for the control torques may be expressed in terms of two auxiliary inputs as: Dr. R. Vepa, QMUL, U of L., 07/01/21 5 ( ) ( ) ( ) ( ) 2 2 1 1 1 2 111 21 2 22 21 2 22 21 2 221 2 22 222 2 21 2 cos cos sin cos c c T vI I I I I I g I I IT v ω ωθ θ θθ ω − Γ+ + + = + + + Γ where the auxiliary control inputs are defined as, − − + + = 2 12 2 1 2 12 2 1 2 1 2 1 22 θ θ ω θ θ ω θ θ ω θ θ ω θ θ nn des des n des des n des des v v and [ ]TdesdesTdes 21 θθ=q are the demanded angular position commands to the joint servo motors. Substituting the control torques for the external in the dynamical equations, ( ) ( ) ( ) ( ) = Γ Γ + − + ++ 2 1 2 1 2 1 2 2 2 1 221 2 1 22221 2222122111 sin cos coscos T T gI II IIII ω ωωθ ω ω θ θθ and for 11 θω = and 212 θθω += , gives, ( ) ( ) ( ) 1 111 21 2 22 21 2 22 21 2 22 22 22 2 cos cos 0 cos 0 vI I I I I I I I v θθ θ θ θ + + + − = + , which simplifies to, = − 0 0 2 1 2 1 θ θ v v . It may be expressed as, = − + − + − 0 0 22 2 12 2 12 2 1 2 1 2 1 2 1 θ θ ω θ θ ω θ θ ω θ θ ω θ θ θ θ n des des nn des des n des des . Thus when the tracking error is defined by, − =−= 2 1 2 1 2 1 θ θ θ θ des des actdes e e qq , it satisfies the equation, = + + 0 0 2 2 12 2 1 2 1 e e e e e e nn ωω and is exponentially stable. Procedure: i) In the first instance construct a SIMULINK robot model employing the equations, 11 ωθ = , 122 ωωθ −= , ( ) 1 22 2 1 1 1 21 2 22 22 2 1 2 3 21 1 sin 2 1 2 robot T g T LmL µ µ ω ω ωµ θ ω ω µ − + + − = − + − + I , Dr. R. Vepa, QMUL, U of L., 07/01/21 6 with, ( ) ( ) ( ) ( ) 2 2 2 2 1 1 2 2 2 1 2 2 2 1 1 1 cos 3 2 31 , 1 4 1 cos cos 2 3 2 robot µ µ θ µ µ µ µ θ µ µ µ θ − + − + − + = ∆ − + + + + + I , ( ) ++ +++=∆ 2 2 2 221221 sin2 1 3 1 3 2 36 7 , θµµµµµµ . For simplicity you may ignore g, (set, g = 0) and set 2µ µ= . The corresponding equivalent SIMULINK diagram is shown below. The SIMULINK robot model The subsystem labelled as the “Subsystem” is referred to as the “ 1− robotI subsystem” and is shown overleaf. Verify the above SIMULINK block diagram before implementing them. ii) Consider the general case of a two link manipulator and assume that the computed control torques are the baseline torques and express the external joint torques, in general, as: Dr. R. Vepa, QMUL, U of L., 07/01/21 7 ∆ ∆ + ≡ − + = 2 1 2 1 2 1 2 1 2 1 2 1 T T T T T T T T T T T T c c c c c c . Hence show that that the tracking error satisfies the equation, ∆ ∆ + + = + + − 2 1 1 222221 121211 2 12 2 1 2 1 2 T T III III e e e e e e nn ωω , − = ∆ ∆ c c T T T T T T 2 1 2 1 2 1 . The 1− robotI subsystem iii) To simulate the dynamics of the ideal two-link manipulator (two equal uniform links of length 1m each and mass 1kg each, with a tip mass of 2µ µ= kg), with the computed torque control law in place, − = 2 1 2 1 2 1 θ θ θ θ d d e e are simulated with SIMULINK with the appropriate non-trivial initial conditions. Furthermore the servo-motor control torque inputs are then given by, ( ) ( ) ( ) ( ) 2 2 1 1 1 2 111 21 2 22 21 2 22 21 2 221 2 22 222 2 21 2 cos cos sin cos c c T vI I I I I I g I I IT v ω ωθ θ θ θ ω − Γ+ + + = + + + Γ where the auxiliary control inputs are, Dr. R. Vepa, QMUL, U of L., 07/01/21 8 − − + + = 2 12 2 1 2 12 2 1 2 1 2 1 22 θ θ ω θ θ ω θ θ ω θ θ ω θ θ nn d d n d d n d d v v . The complete simulation of the closed loop system is illustrated in the figure overleaf. iv) Assume that the end-effector (tip mass) is to be moved from an initial position of rest at ( ) ( )0,1, 00 =YX with the elbow being in the upper half plane, to a final position at ( ) ( )8.0,6.0, −=ff YX . One strategy in achieving this task is rotate the inner link counter-clockwise through an angle of 6.87° with the outer link locked to it followed by a counter-clockwise rotation of the outer link through angle of 240°. Assume that the demanded rotation angles have the form, ( ) −−= τ θθ tt dd exp10 ; i.e. 0ddd θθθτ =+ . Making suitable assumptions, determine the auxiliary control inputs for this task, for, 1 0, 0.1µ = , 2 0µ µ= = , 0.1, 0.2, 0.5, 1.0, 2.0 and 10. v) Often there is a limit on the maximum angular rotation that the servo motor can deliver at any one time. Assume that this limit is 30°. This means that a demanded rotation of 240° can be realised in eight distinct steps. Obtain the auxiliary control inputs in this case, for, 1 0, 0.1µ = , 2 0µ µ= = , 0.1, 0.2, 0.5, 1.0, 2.0 and 10. vi) Illustrate the torques on a typical SIMULINK sink, such as a scope and determine the maximum and minimum values of the demanded torque for both the case ii and iii. Demonstrate the performance of the SIMULINK robot model, particularly when there is a mis-match between the assumed parameters in the SIMULINK robot model and the computed torques. Dr. R. Vepa, QMUL, U of L., 07/01/21 8 Dr. R. Vepa, QMUL, U of L., 07/01/21 9 Some Points to consider in writing your FORMAL report i) Apply the Lagrangian method and verify the governing dynamical equations presented in the section on “Background Theory”. Recall that the Lagrangian is defined as, VTL −= , T is the total translational and rotational kinetic energy and V is the total potential energy. Also recall that the Euler-Lagrange equations are given by, d dt L q L q Q i i i ∂ ∂ ∂ ∂ − = . ii) Is the proposed strategy an “optimal” one in any sense? If so, why do you consider it optimal? If not could you propose an alternate strategy that in some sense better than the one proposed? iii) Discuss the salient features of the simulation and the practical limitations and the feasibility of implementing the computed torque controller. iv) Why was it acceptable to set the acceleration due to gravity to zero (g = 0)? Explain. v) Discuss the effects and consequences of any modeling errors, on the controller and on the performance of the manipulator. Identify the most important sources of modelling errors and the appropriate methods for assessing the influence of specific modeling errors. vi) Identify the inertial, Coriolis, centrifugal and gravitational force terms in the equation of motion. Discuss the effects on the performance of the manipulator of any other environmental effects or other disturbances (such as bearing friction). Discussion: You must provide evidence of your understanding by including an in-depth discussion of the results you have obtained (in the formal report) and the interpretations of these results. You must maintain and provide evidence of having independently completed the simulation in MATLAB-SUMULINK, by entering the experimental/simulation data in a separate notebook. In writing your formal report you must adhere to all the departmental guidelines as outlined in the undergraduate handbook. Briefly discuss the impact of future technologies such as Artificial Intelligence on the design of robot controllers. Dr. Ranjan Vepa January 2019. Dr. R. Vepa, QMUL, U of L., 07/01/21 10 MARKING SCHEME FOR YOUR FORMAL REPORT ON THE SIMULATION EXERCISE Name: The marks for this report are distributed across a number of parts. Marks are awarded for each part or aspect separately and totalled up. TOPIC DESCRIPTION OF REQUIREMENTS MAX. % Marks Marks Scored Contents, Summary, Introduction Contents list, Aims, context, contribution 5% Theory Description of the relevant background theory behind the simulation. 10% System Description and diagram of the system 5% Simulation Approach Explanation of procedures and how the simulation was performed. 10% Observations Presentation of observations, including the recording of observations. 5% Analysis and Calculations Analysis of observations, calculations and comparison with theory. (Sample) 10% Results (including graphs) Presentation of the analysed results, including appropriate graphs 10% Discussion and achievement Logical deductions from analysis and results, achievement and independent contribution. 20% Conclusions The major conclusions reached at end of the analysis of the simulation results. 5% References A complete and self-contained reference list.(including chapter/page numbers of books used) 5% Presentation and style of writing The overall care and style of presentation including readability, spelling and correctness of grammar. 10% Diagrams Clear and informative diagrams and graphs with good labelling and captions. 5% Total Total percentage marks for report 100% ADDITIONAL COMMENTS:
欢迎咨询51作业君