Published: 31 December 2018

# Dynamic modeling and simulation of three-member robot manipulator

Hristijan Mickoski1
Ivan Mickoski2
Marjan Djidrov3
1, 2, 3Faculty of Mechanical Engineering in Skopje, Ss. Cyril and Methodius University in Skopje, 1000 Skopje, Republic of Macedonia
Corresponding Author:
Ivan Mickoski
Views 1401

#### Abstract

Dynamic model analysis of manipulator as mechanical structure is presented for further purpose in actuator selection and process for establishing control strategy. Control problems involves determination of control forces and moments applied in manipulator joints that will ensure movements along a certain defined trajectory. Trajectory design is the basis for the manipulator control process. This problem is quite complex because the manipulator is a connected system in which the movement of a member affects the movement of other. Therefore, in following is presented a method for forces and moments determination in kinematic joints of a three-member manipulator analytically and also by using simulation dynamical model in the Matlab/Simulink program package. The friction forces in the kinematics joints are not taken into account.

## 1. Introduction

In order to study and analyse the mechanical or electrical systems, standard method is through their modelling. By modelling a system, an adequate faithful model of the system is created and there are many definitions of term system model. Modelling is a process of organized knowledge of a given system, which is the most important stage in the research of a single system. The modelling process also involves a process of simulation, which is a method of conducting experiment on the model. The model obtained through modelling includes basic properties of the system which are necessary for solving research problems. One of the reasons for creating a model is to answer control system problems. Mathematical models or computer models are created for studying manipulators. Mathematical models refer to a system of mathematical equations and expressions basis on hypotheses and theories in the field of mechanics, physics, etc. The computer simulated models are the same as mathematical models but are formed in another language other than the normal language of mathematics.

The dynamics of the robot manipulator defines the relationship between the forces, i.e. joint moments brought by the actuators and the equations of motion. Dynamic analysis are the most important task because they are closest for describing actual situation of moving systems. Two types of problems are in dynamics analysis , the first is forward problem which refers to determine the forces that cause movement for a given laws of motion, and second is inverse problem  for computing forces and/or moments based on the kinematics of a body. The robot model developed will not only help in understanding the dynamic behavior but also allow to integrate data acquisition, control, etc. to generate a virtual robot. Such virtual robot in turn may also be used as a training tool if connected with an external device like the robots teach pendant [3, 4].

For analysis of loads of mechanical systems element under the effect of given external and inertial forces from members movements, the kinetostatics method is used. This method is based on the D’Alembert’s principle which states that, the forces acting to a given body and inertial forces from the movement are in a fictitious balance. This method makes it possible to use lows for static reduction and equilibrium in dynamic analysis associated with inertial forces which often determine the strength, longevity, and reliability of modern structures.

The robot manipulator is considered as a system of rigid bodies with defined masses and its own inertial moments, mechanical model of two link manipulator can be found in . The Effect of different sets of initial and boundary conditions on the joints torques is investigated in  and control simulation of two link robot manipulator to get the desired position by using computed torque control method is presented in . The combination of Matlab and Simulink is proposed in , the method allows to manipulate the robotic system and to visualize the robot’s behavior from different perspectives. The D-H method is used in  to establish a connecting rod coordinate system of six-degree-of-freedom moving robot and combined with Solid Works and ADAMS is simulated the moving robot to verify the correctness of the kinematic model.

Equations that define the model dynamics of the robot manipulator are ordinary differential equations where variables are components of position and velocity vectors. These equations are obtained using the Newton-Euler or by Lagrange method which is applied and presented in following. Using the Lagrangian method for any system, a system of n nonlinear second-order equations is obtained in the following form:

1
$\frac{d}{dt}\left[\frac{\partial {E}_{k}}{\partial {\stackrel{˙}{q}}_{i}}\right]-\frac{\partial {E}_{k}}{\partial {q}_{i}}={Q}_{i},\mathrm{}\mathrm{}\mathrm{}i=1,2,\dots ,n.$

The number of system equations $n$ is determined by the number of generalized coordinate ${q}_{i}$ which can describe the movement of the system.

Further, the possible displacements of each of the joints are considered individually, and by using the principle of virtual work, equations for each joint are written in the following form:

2
$\sum \delta {A}_{i}={Q}_{i}{\delta \phi }_{i}.$

By equalizing the two obtained equations for each joint, control moments and forces are obtained. For kinetostatic analysis of the robot manipulator, Lagrange equation and principle of virtual work will be presented. The objective of this paper is to present a method for forces and moments determination in kinematic joints of a three-member manipulator analytically and also by using simulation dynamical model in the Matlab/Simulink program package.

## 2. Manipulator characteristics

For determination of control force and moment, three-member manipulator from Fig. 1 will be used. Equations of motion of the manipulator are:

3
${\phi }_{2}=-0.4{cos}^{2}\left(\frac{\pi t}{2}\right)\left[\mathrm{r}\mathrm{a}\mathrm{d}\right],\mathrm{}\mathrm{}\mathrm{}{S}_{3}=1.2-8{t}^{3}\left[\mathrm{m}\right],\mathrm{}\mathrm{}\mathrm{}t=0.5\mathrm{}\left[\mathrm{s}\right].$

Dimensions of manipulator member are: ${l}_{1}=\mathrm{}$0.9 m, ${l}_{2}=$ 0.5 m, ${l}_{3}=$ 0.7 m. External forces on the manipulator are: ${F}_{x}=$ 2 N, ${F}_{y}=$ –3 N, ${F}_{z}=$ 4 N and cross section area is $A=$ 1 cm2.

## 3. Manipulator kinetostatic analysis by Lagrange’s equation and principle of virtual work

The second-order Lagrange’s equation for the manipulator:

4
$\frac{d}{dt}\left[\frac{\partial {E}_{k}}{\partial {\stackrel{˙}{\phi }}_{2}}\right]-\frac{\partial {E}_{k}}{\partial {\phi }_{2}}={Q}_{1},\mathrm{}\mathrm{}\mathrm{}\frac{d}{dt}\left[\frac{\partial {E}_{k}}{\partial {\stackrel{˙}{S}}_{3}}\right]-\frac{\partial {E}_{k}}{\partial {S}_{3}}={Q}_{2}.$

where ${Q}_{1}$ and ${Q}_{2}$ are generalized motion forces, respectively to generalized coordinates ${q}_{1}$ and ${q}_{2}$. Generalized coordinates are:

5
${q}_{1}={\phi }_{2}=-0.4{\mathrm{c}\mathrm{o}\mathrm{s}}^{2}\left(\frac{\pi t}{2}\right)\mathrm{}\left[\mathrm{r}\mathrm{a}\mathrm{d}\right],\mathrm{}\mathrm{}\mathrm{}{q}_{2}={S}_{3}=1.2-8{t}^{3}\mathrm{}\left[\mathrm{m}\right].$

Fig. 1Three-member manipulator Manipulator kinetic energy which include kinetic energy of all manipulator members, is given by equation:

6
${E}_{k}=\sum {E}_{{K}_{i}}={{E}_{k}}_{1}+{{E}_{k}}_{2}+{{E}_{k}}_{3}.$

where for ${E}_{k1}=$ 0 manipulator kinetic energy is sum of kinetic energy of member 2 and 3. Member 2 makes rotation with angular velocity ${\stackrel{˙}{\phi }}_{2}$, and kinetic energy is:

7
${{E}_{k}}_{2}=\frac{{J}_{x2}{\omega }_{2}^{2}}{2}=\frac{{m}_{2}{{l}_{2}}^{2}{\stackrel{˙}{\phi }}_{2}^{2}}{3\bullet 2},$

where ${J}_{x2}={m}_{2}{{l}_{2}}^{2}/3$ and ${\omega }_{2}={\stackrel{˙}{\phi }}_{2}.$

Member 3 makes translation with velocity ${\stackrel{˙}{S}}_{3}$, and kinetic energy is:

8
${{E}_{k}}_{3}=\frac{{m}_{3}{{V}_{{C}_{3}}}^{2}}{2}=\mathrm{}\frac{{m}_{3}}{2}\left[{\left({l}_{2}{\stackrel{˙}{\phi }}_{2}\right)}^{2}+{\left({\stackrel{˙}{S}}_{3}\right)}^{2}\right],\mathrm{}\mathrm{}$

where:

9
${V}_{{C}_{3}}={\stackrel{˙}{X}}_{{C}_{3}}^{2}+{\stackrel{˙}{Y}}_{{C}_{3}}^{2}+{\stackrel{˙}{Z}}_{{C}_{3}}^{2}={\left(-{\stackrel{˙}{S}}_{3}\right)}^{2}+{\left(-{l}_{2}{\stackrel{˙}{\phi }}_{2}cos{\phi }_{2}\right)}^{2}$
$+{\left(-{l}_{2}{\stackrel{˙}{\phi }}_{2}\mathrm{s}\mathrm{i}\mathrm{n}{\phi }_{2}\right)}^{2}={\left({l}_{2}{\stackrel{˙}{\phi }}_{2}\right)}^{2}+{\left({\stackrel{˙}{S}}_{3}\right)}^{2}.$

The total kinetic energy is:

10
${E}_{k}=\frac{1}{2}\left(a{\stackrel{˙}{\phi }}_{2}^{2}+b{\stackrel{˙}{S}}_{3}^{2}\right),$

where $a={m}_{2}/3+{m}_{3}$ and $b={m}_{3}.$

We compute the partial derivatives of kinetic energy in terms of generalized coordinates:

11
$\frac{\partial {E}_{k}}{\partial {\stackrel{˙}{\phi }}_{2}}=\frac{\partial }{\partial {\stackrel{˙}{\phi }}_{2}}\left[\frac{1}{2}\left(a{{\stackrel{˙}{\phi }}_{2}}^{2}+b{{\stackrel{˙}{S}}_{3}}^{2}\right)\right]=a{\stackrel{˙}{\phi }}_{2},$
$\frac{\partial {E}_{k}}{\partial {\phi }_{2}}=\frac{\partial }{\partial {\phi }_{2}}\left[\frac{1}{2}\left(a{{\stackrel{˙}{\phi }}_{2}}^{2}+b{{\stackrel{˙}{S}}_{3}}^{2}\right)\right]=0,$
$\frac{d}{dt}\left[\frac{\partial {E}_{k}}{\partial {\stackrel{˙}{\phi }}_{2}}\right]=\frac{d}{dt}\left(a{\stackrel{˙}{\phi }}_{2}\right)=a{\stackrel{¨}{\phi }}_{2},$

and velocities:

12
$\frac{\partial {E}_{k}}{\partial {\stackrel{˙}{S}}_{3}}=\frac{\partial }{\partial {\stackrel{˙}{S}}_{3}}\left[\frac{1}{2}\left(a{{\stackrel{˙}{\phi }}_{2}}^{2}+b{{\stackrel{˙}{S}}_{3}}^{2}\right)\right]=b{\stackrel{˙}{S}}_{3},$
$\frac{\partial {E}_{k}}{\partial {S}_{3}}=\frac{\partial }{\partial {S}_{3}}\left[\frac{1}{2}\left(a{{\stackrel{˙}{\phi }}_{2}}^{2}+b{{\stackrel{˙}{S}}_{3}}^{2}\right)\right]=0,$
$\frac{d}{dt}\left[\frac{\partial {E}_{k}}{\partial {S}_{3}}\right]=\frac{d}{dt}\left(b{\stackrel{˙}{S}}_{3}\right)=b{\stackrel{¨}{S}}_{3}.$

To determine the control force of member 3 (Fig. 2), the possible displacement only for generalized coordinate ${q}_{2}$, where:

13
${\delta q}_{1}=0,\mathrm{}\mathrm{}\mathrm{}\mathrm{}{\delta q}_{2}\ne 0,\mathrm{}\mathrm{}\mathrm{}\mathrm{}{\delta \phi }_{2}=0,\mathrm{}\mathrm{}\mathrm{}\mathrm{}{\delta S}_{3}\ne 0.$

The expression for total work of motion forces for this displacement, from which can be determine the generalized force ${Q}_{2}$ is:

14
$\sum \delta {A}_{2}={-Q}_{2}{\delta S}_{3}={F}_{x}{\delta S}_{3}-{F}_{23}{\delta S}_{3},\mathrm{}\mathrm{}\mathrm{}\mathrm{}{-Q}_{2}=\frac{\sum \delta {A}_{2}}{{\delta S}_{3}}={F}_{x}-{F}_{23}.$

Equalizing with the Lagrange’s equation for member 3, the control force is obtained as:

15
$b{\stackrel{¨}{S}}_{3}={-F}_{x}+{F}_{23},\mathrm{}\mathrm{}\mathrm{}{F}_{23}=b{\stackrel{¨}{S}}_{3}+{F}_{x}={m}_{3}\left(-48t\right)+2,$

for:

$t=0.5\mathrm{s},{F}_{23}=0.546\left(–24\right)+2=–11.104\mathrm{N}.$

Fig. 2Determination of force F23 To determine the control moment of member 2, from possible displacement only for the generalized coordinate ${q}_{1}$, where:

16
${\delta q}_{1}\ne 0,\mathrm{}\mathrm{}\mathrm{}\mathrm{}{\delta q}_{2}=0,\mathrm{}\mathrm{}\mathrm{}\mathrm{}{\delta \phi }_{2}\ne 0,\mathrm{}\mathrm{}\mathrm{}{\delta S}_{3}=0.$

The expression for total work of the motion forces for this possible displacement, from which can be determine generalized force ${Q}_{1}$ is:

17
$\sum \delta {A}_{1}={Q}_{1}{\delta \phi }_{2}={\left(G}_{2}\bullet 0.5+{G}_{3}-{F}_{z}\right){l}_{2}\mathrm{s}\mathrm{i}\mathrm{n}{\phi }_{2}{\delta \phi }_{2}-\mathrm{}{F}_{y}{l}_{2}\mathrm{c}\mathrm{o}\mathrm{s}{\phi }_{2}{\delta \phi }_{2}+{M}_{12}{\delta \phi }_{2},$
${Q}_{2}=\frac{\sum \delta {A}_{2}}{{\delta S}_{3}}={\left(G}_{2}\bullet 0.5+{G}_{3}-{F}_{z}\right){l}_{2}\mathrm{s}\mathrm{i}\mathrm{n}{\phi }_{2}-\mathrm{}{F}_{y}{l}_{2}\mathrm{c}\mathrm{o}\mathrm{s}{\phi }_{2}+{M}_{12}.$

By leveling with the Lagrange's equation for member 2, the control moment is obtained as:

18
${\stackrel{¨}{\phi }}_{2}={\left(G}_{2}\bullet 0.5+{G}_{3}-{F}_{z}\right){l}_{2}\mathrm{s}\mathrm{i}\mathrm{n}{\phi }_{2}-{F}_{y}{l}_{2}\mathrm{c}\mathrm{o}\mathrm{s}{\phi }_{2}+{M}_{12},$
${M}_{12}=\left(\frac{{m}_{2}}{3}+{m}_{3}\right){\stackrel{¨}{\phi }}_{2}-{\left(G}_{2}\bullet 0.5+{G}_{3}-{F}_{z}\right){l}_{2}\mathrm{s}\mathrm{i}\mathrm{n}{\phi }_{2}+\mathrm{}{F}_{y}{l}_{2}\mathrm{c}\mathrm{o}\mathrm{s}{\phi }_{2}.$

for:

$t=0.5\mathrm{s},{M}_{12}=0-0.324+1.47=1.146\mathrm{N}\mathrm{m}.$

Fig. 3Determination of moment M12 ## 4. Design of simulation model of three-member manipulator in Matlab-Simulink

Analysis of three-member manipulator is based on a simulation model of the robot manipulator in Simulink and the obtained results will be compared with a mathematical calculation. First, laws of motion of the characteristic points from the geometry of the manipulator are written, and value of time is $t=$ 0.5 s. Manipulator kinematical and kinetostatic analysis requires to configure two joint blocks, Revolute and Prismatic. Through these two blocks the laws of motion are given ${\phi }_{2}$ and ${S}_{3}$.

Fig. 4 shows the configuration of the Joint Blot Revolute, which refers to the kinematic joint A. By increase the number of sensors/actuators to 1, so that can be define the law of motion with Joint Actuator ${\phi }_{2}$. The same procedure is repeat for the Prismatic Joint blocks and Fig. 5 which refers to the kinematic joint B. By increase the number of sensors/actuators to 1 so that can be define the low of motion with the Joint actuator ${S}_{3}$. Using the Simulink blocks, the lows of motion are apply ${\phi }_{2}$ and ${S}_{3}$ which are in function of time t, and by time differentiation angular velocity ${\stackrel{˙}{\phi }}_{2}$ and angular acceleration ${\stackrel{¨}{\phi }}_{2}$, as well as velocity ${\stackrel{˙}{S}}_{3}$ and acceleration ${\stackrel{¨}{S}}_{3}$, are obtained respectively. Fig. 6 shows blocks connections, signal from Clock block is connected with laws of motion ${\phi }_{2}$ and ${S}_{3}$ and outputs are connected to the corresponding Joint Actuators, which are connected accordingly to the actuated Revolute and Prismatic Joint blocks.

Fig. 4Low of motion φ2 Fig. 5Low of motion S3 Fig. 6Block connections Fig. 7Manipulator simulation model To solve the kinetostatics and to determine the control moments and forces in already created kinematic model with given control equations, first through the Body Actuator block the external forces in gripper D are applied. Additionally, in all kinematic pairs, in associated joint blocks another sensor port is added on which is connect sensors to measure the forces and moments in kinematic joints.

Projections of forces and moments in the joints can be obtained by connecting Joint sensor blocks associate already to configured Weld, Revolute and Prismatic blocks, i.e., allowing to measure the motion force and moment. Two outputs of the sensors are connected to displays showing the projections along the coordinate axes of motion force and moment. In addition, two scopes are added on which can be monitored the changes of control moment and force as function on time. This completes all settings for kinetostatic analysis of the manipulator. After simulating the model, the variations of forces and moments projections along the axes in manipulator joints at $t=$ 0.5 s can be displays.

Fig. 7 shows the complete model simulation and moments and forces in kinematic joints can be analyzed. Greater precision in Solver parameters, by select fixed-step time and in sample time can be obtained by enter a value of 0.0001.

In Simulation stop time, by entering value $t=$ 0.5 s and repeat the simulation, from Fig. 8(a) can be read the values for control force ${F}_{23}$, and control moment ${M}_{12}$ from Fig. 8(b) which are determinate that are same as presented analytical calculations.

Fig. 8a) Control force F23, b) control moment M12 a) b)

## 5. Conclusions

Dynamic model analysis of three-member manipulator as mechanical structure is presented. The simulation of the model provides determination of motion moment ${M}_{12}$ in the revolute kinematic joint and motion force ${F}_{23}$ in prismatic kinematic joint. Mathematical analysis was performed at time $t=$ 0.5 s of force and moment by using the Lagrangian second-order equation and the principle of virtual work. The values for moments ${M}_{12}$ and force ${F}_{23}$ obtained by the analytical calculation and the values obtained by the simulation of presented dynamic model are the same. As following, this method can also be used for more complex mechanical structures for which it is difficult to analyse their dynamics, due to the fact that formation of equations of motion and solving them increase, especially if it accounts multiple points.

From presented simulation model, motion forces and moments can be determinate and through the diagrams can be analysed their values in all the kinematic joints taking in account external forces and moments as essential for designing and modelling of kinematic joints and also for control systems design.