Modeling , Simulation and Position Control of 3 Degree of Freedom Articulated Manipulator

In this paper, the modeling, simulation and control of 3 degree of freedom articulated robotic manipulator have been studied. First, we extracted kinematics and dynamics equations of the mentioned manipulator by using the Lagrange method. In order to validate the analytical model of the manipulator we compared the model simulated in the simulation environment of Matlab with the model was simulated with the SimMechanics toolbox. A sample path has been designed for analyzing the tracking subject. The system has been linearized with feedback linearization and then a PID controller was applied to track a reference trajectory. Finally, the control results have been compared with a nonlinear PID controller.


Introduction
Industrial robots are widely used in various fields of application now days.So production of them is increasing rapidly.Manipulators are a kind of industrial robots which has been attracted so much attention of engineers, especially control and mechanics engineers.Control engineering concentrate on designing the controllers in order to have the manipulators operated with the best quality and less errors.Designing the controllers for manipulators has several approaches like tracking and force control.The control methods can be classified into tree types: the first type is traditional feedback-control (PID and PD) [1][2][3][4].The second type is adaptive control [5][6][7][8][9][10][11] and the third type is the iterative learning control (ILC) [12][13][14][15][16][17].Some other control methods, including the robust control [18-20], inverse dynamics control [21-23], model based control, switching control, and sliding mode-control, can be in one or another way reviewed either as specialization and/or combination of the three basic types, or are simply different names due to different emphases when the basic types are examined.In this paper, the 3 DOF articulated manipulator has been studied.The direct and inverse kinematics has been obtained by geometrical calculates [21].Then the dynamic model of the system has been extracted by Lagrange method that is very powerful in modeling the sophisticated mechanical systems.In this paper, a PID controller has been designed for 3DOF robotic manipulator which has been linearized by feedback linearization and the results have been compared with a nonlinear PID controller.

System Modeling
The first step of designing controllers for a system is modeling.In other word, we need the physical characteristics or the mathematical equations of the system in order to design a good controller.Modeling contains kinematics and dynamics.Kinematics is the motion science that studies the position, velocity, acceleration and derivatives of them without regarding the force and torque.Manipulator movement characteristics are studied in kinematics science for robots and contain two main parts: forward kinematics and inverse kinematics.In other hand, the relation between these movements and the force and torque is studied in dynamics science.

Direct Kinematics
If we state the end effector coordinates of manipulator based on the angles of the joints, it means the forward kinematics.In other word, in forward kinematics the measures of the joint space are available and we want to determine the measures of coordinate space.In reality, forward kinematics analyzing is a mapping from joint space to the coordinate space.According to Figure 1 the forward kinematics of the 3 DOF articulated manipulator has been determined as below: Figure 1.3DOF articulated manipulator in Spherical coordinates for forward kinematic analysis

Inverse Kinematics
By inversing the forward kinematics definition we have inverse kinematics definition.By these equations we can find the appropriate angles for the desired end effector coordinates.According to the two definitions of kinematics, it is clear that the inverse kinematics is more sophisticated than the inverse kinematics.According to the Figure 2

Velocity Kinematics
In order to design a controller to track a path we need to have the relations between the velocity of the joint and the velocity of the end effector that named velocity kinematics.In this case, by differentiation of equations (1-3) we have: where S denote to (Sin) and C denote to (Cos) and J is the manipulator jacobian matrix and determination of that is a base issue for all manipulators.The determinant of the 3DOF manipulator is: The roots of the above equation are the singular points of the manipulator.Singular points are those in which the manipulator can't move in a certain direction.

Dynamic Modeling
The dynamical analysis of the robot investigates a relation between the joint torques/forces applied by the actuators and the position, velocity and acceleration of the robot arm with respect to the time.Dynamics of the robot manipulators is complex and nonlinear that might make accurate control difficult.The dynamic equations of the robot manipulators are usually represented by the following coupled non-linear differential equations which have been derived from Lagrangians [21]: Where is the inertia matrix, is the coriolis/centripetal matrix, is the gravity vector, and is the control input torque.The joint variable is an n-vector containing the joint angles for revolute joints.The mentioned matrix of the 3 DOF articulated manipulator can be computed by:

SimMechanics Toolbox
SimMechanics is based on simulink, which is the research and analysis environment of the controller and the object system in a cross-cutting / interdisciplinary [24].Multi-body daynamic mechanical systems can be analyze and modeled by SimMechanics and all works such as control would be completed in the simulink envirement.This toolbox provides a plenty number of corresponding real system components, such as: bodies, joints, constraints, coordinate systems, actuators and sensors.Complex mechanical system can be created by these modules in order to analyze the mechanical systems like manipulators.In this paper, the toolbox has been used to analyze the 3DOF articulated manipulator.

Figure.3. Analytical modeling of 3DOF manipulator in matlab simulink
For a validation of modeling of the system, the 3DOF manipulator has been designed in SimMechanics and compared with the analytically modeled system.Figure 3 show the simulink design of the manipulator and Figure 4 shows the SimMechanics modeling of it.For this system and for all links.As it was mentioned before, we used the SimMechanics toolbox for validation of analytical modeling.The results of this study are brought in Figure 5 and Figure 6.According to the Figure 5 the outputs of two simulations are completely similar to each other and Figure 6 shows the error between two simulations that is verified the accuracy of the analytical modeling.

Feedback Linearization and Control
In general condition, a manipulator with links is stated as a nonlinear system with multi input and determining the feedback linearization conditions of them is more complex than the single input systems, but has a similar idea.For a manipulator with degree of freedom we regard the equation (15) and replace with a new variable .So we have: The block diagram of PID controller with feedback linearization named inverse dynamic control has been brought in Figure 7.For studying the operation of the inverse dynamics controller, it has been compared with nonlinear PID controller [25].For this goal, a circular reference path has been regarded and the controllers have been test.The results of these two controllers have been showed in Figure 8 and Figure 9.According to these figures, the inverse dynamics controller is better than the other one.But it is important to mention that if we want to use inverse dynamics controller, we'll need the all the parameter of the manipulator accurately.It is clear that reaching the parameter accurately is not possible practically and always we have some uncertainty in system.

Conclusion
According to the paper the robot manipulator have complex nonlinear dynamic model that makes its control so difficult.Although using the classic controllers are good but uncertainty in manipulators is high.Thus using the fuzzy controllers and intelligent method like neural network is proposed for controlling these kinds of complex systems.

Figure 2 .
Figure 2. 3DOF articulated manipulator in Spherical coordinates for inverse kinematic analysis

Figure 5 .
Figure 5. Comparing graph of analytical model with SimMechanics model