SimMechanics and Forward and Inverse Problem of

2 downloads 0 Views 298KB Size Report
The arm is to start from rest at a known position and move to a desired position. The task is to investigate the necessary movement in kinematics pairs which ...
Journal of Automation and Control, 2015, Vol. 3, No. 3, 58-61 Available online at http://pubs.sciepub.com/automation/3/3/3 © Science and Education Publishing DOI:10.12691/automation-3-3-3

SimMechanics and Forward and Inverse Problem of Dynamics Darina Hroncová1,*, Róbert Rákay2, Tomáš Lipták1 1

Department of Mechatronics, Faculty of Mechanical Engineering, Technical University of Košice, Letná 9, 042 00 Košice, Slovak republic 2 Department of Automation, Control and Human Machine Interactions, Faculty of Mechanical Engineering, Technical University of Košice, Letná 9, 042 00 Košice, Slovak republic *Corresponding author: [email protected]

Abstract In the paper we show the possibilities of physical modeling in Matlab/SimMechanics on a simple mechanical model of robot arm with two links. We deal with its direct and inverse dynamics. Direct problem investigates the mechanical movement of the robot under the action of given forces and moments. In inverse problem we identify the forces which cause a prescribed motion of the effector. Both problems are solved using block diagrams in SimMechanics. Results are presented graphically. Keywords: forward dynamics, inverse dynamics, Matlab, Simulink, SimMechanics Cite This Article: Darina Hroncová, Róbert Rákay, and Tomáš Lipták, “SimMechanics and Forward and Inverse Problem of Dynamics.” Journal of Automation and Control, vol. 3, no. 3 (2015): 58-61. doi: 10.12691/automation-3-3-3. We try to find the time diagram of angular rotations ϕ1 and ϕ2 in the form of a fifth degree polynomials [2]:

1. Introduction Computer modeling is an effective tool to accelerate and improve the design of new mechanical systems. Matlab and SimMechanics [1] are appropriate software tools for creating computer models [7]. In dynamic analysis there are two basic tasks - inverse and direct analysis [5]. In inverse problem we identify the forces which cause a prescribed motion of the effector. Direct problem investigates the movement of the mechanical system under the action of given forces.

φ1 ( t ) = a1 t 5 + a2 t 4 + a3 t 3 + a4 t 2 + a5 t + a6 ,

(3)

φ2 ( t ) =b1 t 5 + b2 t 4 + b3 t 3 + b4 t 2 + b5 t + b6

(4)

2. Description of the Model We investigate the model of two link of manipulator which is a quite often analyses dynamic system (Figure 1a). Links are connected by two joints and there is a motor at each joint and joint angles are ϕ1 and ϕ2 . Location of the endpoint L of member 2 in the coordinate system O, x, y is given by [2]:

x1 =l1 cos φ1 + l1 cos (φ1 + φ2 ) ,

(1)

x2 =l1 sin φ1 + l2 sin (φ1 + φ2 )

(2)

The arm is to start from rest at a known position and move to a desired position. The task is to investigate the necessary movement in kinematics pairs which would ensure the relocation of the end point L of member 2 from position L0 (4.5, 0) to position L1 (0, 3) (Figure 1b). At the beginning and end of the movement the velocity and acceleration of point L should be zero.

Figure 1. Model of manipulator: a) links are connected by two joints; b) starting and final position of two link of manipulator

59

Journal of Automation and Control

where

a6 = ϕ1 ( 0 )

and

b6 = ϕ2 ( 0 )

are

the

initial

condition at time t = 0 and coefficient vectors:

Note that there are three equations and three unknowns for each angle and its two derivatives. This is the reason for choosing a fifth-degree polynomial to control the

(

)

a = [ a1 a2 a3 a4 a5

]T ,

(5)

motion. The lower degree three terms t 2 , t1 , t 0

b = [b1 b2 b3 b4 b5

]T

(6)

coefficients with value zero to meet the constraints at t=0.

are to be determined to provide the desired motion. The choice of the degree of the polynomials will be explained as the equations of motion are described. For desired initial coordinates ( x1 , x2 ) at time t=0 and desired final coordinates at time t = tf ,the required values for angles

ϕ1 ( 0 ) , ϕ2 ( 0 ) , ϕ1 ( tf ) , ϕ2 ( tf )

can

be

found

using

trigonometry. For given values of ϕ1 ( 0 ) , ϕ1 ( tf ) and

tf and for given values of ϕ2 ( 0 ) , ϕ2 ( tf ) and tf , matrix equations are to be set up and solved for coefficient vector a and coefficient vector b. These results are to be used to plot the path of the hand. The remaining constraints in the arm motion are that the velocity and acceleration of the links are to be zero at the known starting location and desired final location. This implies that the angular velocity and angular acceleration of the two angles are to be zero at time t = 0 and t = tf . The angular velocity of the first link at time t

is the derivative of the angle ϕ1 ( t ) with respect to time [2]:

φ1 ( t ) = 5a1 t 4 + 4a2 t 3 + 3a3 t 2 + 2a4 t + a5

(

have

)

This leaves the higher degree three terms t 5 , t 4 , t 3 and corresponding three unknown coefficients. Adding additional higher degree terms would require additional constraint equations to be able to compute the values of the corresponding coefficients [2]. Assuming the following initial and final values and link lengths: t f =2 s

ϕ1 ( 0 ) =-36,87°

ϕ2 ( 0 ) = 90°

( ) ϕ2 ( t f ) = 125,3593°

ϕ1 t f = 42,7785°

l1 =0,36 m l2 =0,27 m which correspond to a starting hand location of (4.5, 0) and a destination location of (0,3), and plot the path of the end point L of the member 2 [6].

(7)

The velocity at t = 0 is

φ1 ( 0= ) a=5 0

(8)

and thus, coefficient a5 = 0 . The angular acceleration is the second derivative of the angle ϕ1 ( t ) with respect to time:

φ1 ( t )= 20 a1 t 3 + 12 a2 t 2 + 6 a3 t + 2 a4

(9)

The acceleration at t = 0 is:

φ1 = a4 0 ( 0 ) 2=

(10)

and thus, coefficient a4 = 0 . Writing the three

constraints on ϕ1 ( t ) and its derivatives at time t = t f in

Figure 2. Window Figure 1 from Matlab simulation

Time diagram of the trajectory of the point L is shown in Figure 2 and Figure 3 from Matlab solution [8]:

matrix form:

 t 5f   5t 4  f  20t 3  f

t 4f 4t 3f 12t 2f

( )

t 3f  a φ t − φ1 ( 0 )    1  1 f   3t 2f  .  a2  =  0    a  0  6t f   3   

(11)

Similarly, for ϕ2 ( t ) :

 t 5f   5t 4  f  3  20t f

t 4f 4t 3f 12t 2f

( )

t 3f  b φ t − φ2 ( 0 )    1  2 f  2     3t f . b2  = 0    b  0  6t f   3   

(12)

Figure 3. Calculated path of the point L of the robot hand

Journal of Automation and Control

Time diagram of angular rotation, angular velocity and angular acceleration of the members is shown in Figure 4 [9].

60

The block of the Body1 (Figure 6) in SimMechanics scheme is shown [7]:

Figure 6. Block Parameters: Body1 of the mechanical system in SimMechanics (inverse dynamics) Figure 4. Time diagrams of the mechanical system with kinematical parameters

The block of the Body2 (Figure 7) in SimMechanics scheme:

The constants in the polynomials are determined from the initial and end conditions of the endpoint L. The degree of these polynomials is chosen so that they are able to express all the desired conditions. After substituting the initial and final conditions we obtain the following values of their respective constants: a1 0.2606 b1 0.1157 = =

a2 = −1.3032 b 2 = −0.5786 a 3 1.7377 b3 0.7714 = = a 4 0= b4 0 = a 5 0= b5 0 = a6 = 0.6283 −36.87 * π / 180 =

π / 180 1.5708 b6 90* = = for l1 0.36 and l2 0.27. = =

3. Inverse Problem

Figure 7. Block Parameters: Body2 of the mechanical system in SimMechanics (inverse dynamics)

Time diagrams of torques [9] in the kinematics pairs M1 and M2 obtained by solving the model in the above block diagram are shown in Figure 8.

While solving the inverse problem we determine the moments M1 and M2 required to obtain the prescribed movement of the mechanical system [3]. Inputs are the prescribed movements of its individual members. Member 2 is to be moved from position L0 to the desired position L1 along trajectory determined in the preceding paragraph. Block diagram of the mechanical system for solving the inverse problem [8] is in Figure 5.

Figure 8. Time diagram of actuator forces of the mechanical system Figure 5. Block diagram of the mechanical system in SimMechanics (inverse dynamics)

61

Journal of Automation and Control

M1 [Nm]

Member 1 13.2 13 12.8 12.6 12.4

0

0.5

1 t [sec] Member 2

1.5

2

0

0.5

1 t [sec]

1.5

2

M2 [Nm]

4.1 4 3.9

Figure 9. Time diagram of actuator forces of the mechanical system

4. Direct Problem Direct problem investigates the movement of the mechanical system under the load of the forces obtained in the previous paragraph. Application of the results from the inverse problem on the model in Figure 10 should result in motion as we prescribed it at the beginning of the analysis [4].

Figure 13. Time diagram of SimMechanics simulation

Results obtained from the simulation in Figure 13 correspond with the prescribed motion we determined from the desired location of the endpoint L that are in Figure 4.

5. Conclusion

Figure 10. Block diagram of the mechanical system in SimMechanics (forward dynamics)

The

block

Joint

Initial

Condition

for

ϕ1 ( 0 )

In the work is shown a procedure for solving direct and inverse dynamic problem of the mechanism of double pendulum using modeling in SimMechanics. SimMechanics allows to simulate such mechanical systems which is a common problem in engineering practice. Results are obtained in form of time diagram of the desired variables. Tasks are solved numerically, model is compiled by using block diagrams. Mastering this methodology provides a suitable tool for solving problems of teaching and practice.

in SimMechanics scheme:

Acknowledgement This work was VEGA No. 1/1205/12 No. 1/0937/12.

supported by grant projects and grant projects VEGA

References [1] Figure 11. Block Joint Initial Condition in SimMechanics (forward dynamics)

The

block

Joint

Initial

Condition

for

ϕ2 ( 0 )

in SimMechanics scheme [7]:

[2] [3] [4] [5]

[6] [7] [8] Figure 12. Block Joint Initial Condition in SimMechanics (forward dynamics).

[9]

The MathWorks,Inc. SimMechanics User’s Guide, November 2002. http://www.mathworks.com. http://www.pwsztar.edu.pl/~r_wiatr/matlab/%28eBook%29%20% 20Engineering%20-%20Matlab%20Programming.pdf Gmiterko, A., 2004. Mechatronics, Emilenia, Košice, Slovakia. Gmiterko, A., Šarga, P., Hroncová, D., 2012. Mechatronika I, Technická univerzita Košice, Košice, Slovakia. Hroncová, D., 2012. Studies of compatible software tools for abstract and concrete design of mechatronic systems and linking them for the purpose of logical and physical modeling, Dissertation thesis, Košice, Slovakia. Karban, P., 2006. Výpočty a simulace v programech Matlab a Simulink. Computer Press, Brno, Česko. Schlotter, M., 2003. Multibody System Simulation with SimMechanics. University of Canterbury. Virgala, I., Frankovský, P., Kenderová, M.: Friction Effect Analysis of a DC Motor. In: American Journal of Mechanical Engineering. 2013. Vol. 1, no. 1 (2013), p. 1-5 Vittek, J., 1997. Matlab pre elektrické pohony, Nakladateľstvo Žilinskej univerzity, Žilina, Slovensko, p. 35-36.

Suggest Documents