Professional Documents
Culture Documents
Robotics LAB - SSIR'08: Modeling, Trajectory Generation and Control of Robot Arms
Robotics LAB - SSIR'08: Modeling, Trajectory Generation and Control of Robot Arms
Robotics Lab
Overview
The objective of this robotics lab is to address the main modeling and control notions for robot arms using MATLAB/Simulink. The transition from joint to working space and vice versa will be treated pointing up the advantages and drawbacks in using each space. Kinematical and dynamical models for SACRA robot with 2 rotational articulations will be used. Other notions will be also treated such as: polynomial methods for trajectory generation; the use of PID or Computed-Torque controller to follow robot set-point; and finally the application of obstacle avoiding strategy. For necessary models or definitions to answers to the questions, you can use the Appendix. It is to note that the simulation of the studied robot will be made firstly without using the robot dynamical model (Part I). It is only thereafter (Part II) that the dynamical model will be used in order to address accurately robot control problem.
INTRODUCTION
The SCARA robot (Selective Compliance Assembly Robot Arm) (Figure. 1(a)) is one of the more used robots in industry. The version with two degrees of freedom (2 dof) of SCARA is going to serve us in this Lab as basis for the modeling and control of robotics system. The configuration of the robot is determined by the joint variables 1 and 2 (Figure 1(b)).
yb E l2 2
(a)
l1 xb
(b)
Figure 1
Lounis ADOUANE
Robotics Lab
This Lab intends firstly to implement under MATLAB/Simulink the different elementary modeling related to a SCARA robot, and thereafter to attach the set of these programs to other programs (previously provided) in the aim to obtain user-friendly and interactive robotics mini-simulator. Before performing any task, download the directory RoboticsLAB (from \\pcservnt02\SSIR08) toward your workspace. The files and their content are described briefly below. Test and explore attentively all recovered programs and Simulink models in order to understand the methods adopted to achieve the simulation. In certain cases you must add to some of these programs parts of codes (for m-files) or schemas-blocks (for Simulink models) which will permits to enhance the minisimulator functionalities. Note that, for a better readability of your programs, it is strongly recommended to comment them. Function (m-file .m or Simulink file .mdl) Main.m Description Permits to open one user interface (Figure 2) to simulate the robotics system with or without using Simulink blocks. One graphical representation of the robot SCARA 2dof as well as the possibility to animate it is accessible via this interface. This interface permits also to recover the mouse events. In this case, the mouse will allow you, in the setting of your Lab, to give position set-point (x, y) to be reached by the end-effector. Defines the positions (xT, yT) of the SCARA endeffector according to its joints coordinates. Defines the joints coordinates of the SCARA according to the position of its end-effector. The output function gives [Q1, Q2, err] with Q1 the solution when 2>0 (low elbow), Q2 the second solution. To satisfy some constraints linked to the robot workspace one imposes that: - the position of the end-effector belongs to the working space (cf. Figure 2) - the values of 1 and 2 vary in the robot joint domain (i.e. 01180; -180<2<180). Thus InverseKinematics.m function gives: err(1)=0 if the first solution Q1 is possible and =1 if the solution is not possible, and in the same way err(2) indicates the feasibility of the second solution. Defines, using simple geometrical construction, the joint coordinates of the SCARA according to the position of its end-effector. Gives the set-point to follow by the robot endeffector in the work space domain. Manage all events (click of mouse, pressed button, etc.) of the GUI (Graphical User Interface) window.
ForwardKinematics.m
InverseKinematics.m
InverseKinematicsUsingGeometry.m
SetPointTrajectory.m
GUI_Management.m
Lounis ADOUANE
Robotics Lab
SetDispaly.m
Updates the graphical representation of the SCARA robot as well as the display of the joint information and the position of the end-effector (Figure 2). Simulink model (Figure 3) that permits while interfacing it with the programs described above to control the movement of the SCARA in order to follow for example a trajectory.
SimulinkRobotControlWithoutDyMo.mdl
Figure 2
Figure 3
Lounis ADOUANE
Robotics Lab
Figure 4
Lounis ADOUANE
Robotics Lab
SimulinkLabLibrary.mdl
SimulinkRobotControlWithDyMo.mdl Simulink model (cf. Figure 5) that permits to use a PID controller to control the robot in the working space.
Figure 5
IV PID CONTROL
IV.1) The present parameters of the PID (figure 5) have been fixed empirically. Synthesize PID controllers adapted to the used SCARA robot basing on the Annex 5. Once the parameters of the PID controllers are obtained, you must automatically affect them to the corresponding blocks.
Lounis ADOUANE
Robotics Lab
Indications: - take wj = 2.5 to find the Kpi=1..2, Kdi=1..2, Kii =1..2 parameters, - a part of the code to obtain the PID parameters is already provided, you have just to complete the code lines in the Main.m file, more specifically between %% Beginning PID controller code %% and %% End PID controller code%%, - you can display the features characterizing the SACRA robot control when it follow the path while removing the comments in the GUI_Management.m file and more precisely between %% Beginning display figures code %% and %% End display figures code %%. IV.2) Modify the SimulinkRobotControlWithDyMo.mdl and GUI_Management.m files in order to permit to control the SCARA robot in its joint space using a polynomial interpolation of 5 degrees.
V COMPUTED-TORQUE CONTROL
Using the functions used above and annex 6, implement the Computed-Torque control on the SCARA robot.
Figure 6
Lounis ADOUANE
Robotics Lab
X = f ( )
Where:
= , 1 2
T
X = x , y
Inverse Kinematics The Inverse Kinematics Model (IKM) for a serial-chain manipulator consists to find the values of the joint positions given the positions and orientations of the end-effector.
= f 1 ( X )
Annex 2 (Forward and Inverse Instantaneous Kinematics Models)
Forward Instantaneous Kinematics The Forward Instantaneous Kinematics Model (FIKM) for serial-chain manipulators can be formulated as: given the positions of all members of the chain and the rates of motion about all the joints, find the total velocity of the end-effector. This is given by:
= J ( ) X Where: J ( )
Inverse Instantaneous Kinematics The Inverse Instantaneous Kinematics Model (IIKM) for serial-chain manipulators can be formulated as: given the positions of all members of the chain and the total velocity of the end-effector, find the rates of the motion of all joints. The general case (when m n) gives.
= J + ( ) X
Robotics Lab
K Pj = 3a j 2 j K Dj = 3a j j 3 K Ij = a j j
-
Where: j indicates the index of the corresponding joint, aj = Ajj max indicates the maximal value of the Ajj element of the inertia matrix A of the robot, j > 0 are chosen the biggest possible, however, this pulsation should not be superior to the pulsation of resonance of the mechanical system in order to not destabilize it.
You can get more information via http://wwwlasmea.univ-bpclermont.fr/Control/ssir08/martinet.pdf (p27 to 28) or in the Lab folder DocForAppendix.
Bibliography
Modeling, Identification and Control of Robots, Authors: Khalil W., Dombre E., Editor: Penton, ISBN10: 1-9039-9613-9, 2002 Springer Handbook of Robotics, Siciliano B.; Khatib O., Editor: Springer, ISBN: 978-3-540-23957-4, 2008
Lounis ADOUANE