chapter 1ggn.dronacharya.info/.../questionbank/ivsem/kom/section-b/ppt2.pdf · multibody kinematics...
TRANSCRIPT
1.1 INTRODUCTION
Determine appropriate movement of the wipers
View range
Tandem or opposite
Wipe angle
Location of pivots
Timing of wipers
Wiping velocity
The force acting on the wipers
PART 2
Multibody Kinematics and Dynamics
Chapter 1
1
Kinematics
• Kinematics
– Deal with the way things move
• Kinematic analysis
– Determine
• Position, displacement, rotation, speed, velocity, acceleration
– Provide
• Geometry dimensions of the mechanism
• Operation range
• Dynamic analysis
– Power capacity, stability, member load
• Planar mechanism – motion in 2D space
2
1.4 MECHANISM TERMINOLOGY Mechanism
Design synthesis is the process of developing mechanism to satisfy a set of
performance requirements for the machine.
Analysis ensures that the mechanism will exhibit motion to accomplish the
requirements. Linkage
Frame
Links– rigid body
Joint
Primary joint (full joint)
Revolute joint (pin or hinge joint)–
pure rotation
Sliding joint (piston or prism joint)–
linear sliding
3
Higher-order joint (half joint)
Allow rotation and sliding
Cam joint
Gear connection
Simple link
A rigid body contains only two joints
Crank
Rocker
Complex link
A rigid body contains more than two joints
Rocker arm
Bellcrank
Point of interest
Actuator
A power source link 4
Mechanism Joint
1.5 Kinematic Diagram
Simple Link
Simple Link
(with point of
interest)
Complex Link
Pin Joint
Revolute Joint
5
Kinematic Diagram
Slider Joint
Cam Joint
Gear Joint
Translation Joint
6
1.7 MOBILITY
7
Constrained mechanism : one degree of freedom
Locked mechanism : zero degree of freedom
Unconstrained mechanism : more than one degree of freedom
8
1.7 Actuators and Drivers
• Electric motors (AC/DC)
• Engines
• Servomotors
• Air or hydraulic motors
• Hydraulic or pneumatic cylinders
• Screw actuators
• Manual
9
10
1.9 SPECLAL CASES OF THE MOBILITY EQUATION
Coincident Joints
• One degree of freedom actually if pivoted links are the same size
11
12
1.10 THE FOUR-BAR MECHANISM
13
14
Crank and Rocker
1.10.1 Design of Crank and Rocker
s : short link
l : long link
p , q : intermediate link
15
1.11 SLIDER-CRANK MECHANISM
16
1.12 SPECIAL PURPOSE MECHANISMS
1.12.1 Straight-Line Mechanisms
17
1.12.2 Parallelogram Mechanisms
1.12.3 Quick-Return Mechanisms
18
1.12.4 Scotch Yoke Mechanism
Locate the positions of all
links as driver link is
displaced
Configuration
Positions of all the links
One degree of freedom
Moving one link will
precisely position all
other links
Chapter 4 Displacement Analysis
4.4 DISPLACEMENT ANALYSIS
19
20
r1
r2
r4
r3 r3 r5
r4
Y
X
X1
Y1
1 2 3 4
3 31 1 2 2
1 1 2 2 3 3
1 1 2 3
3 4 5
3 3 4 4 1
3 3 4 4
1
0
5.30
3.2
3, 30, 4.9, 3.3
0
00.8
10.1
r r r r
r cr s r c
rc r s r s
r r r
r r r
r c r c x
r s r s
r
2 equations for 2 unknows
2 equations for 2 unknows
(1)
(2) 2 3,
4 1and x
4.1 Vector Analysis of Displacement
21
1 2 3
1 2
1 2
1 2 1 max
1 2 1 min
0
0.5 1.75 10
0.5 1.75
,
,
r r r
c c
s s y
for solve for and y
for solve for and y
r1
r3 r2
X
Y
22
4.7 Limiting Positions and Stroke
23
6.2 LINEAR AND ANGULAR VELOCITY
6.2.2 Linear Velocity of a General Point
Chapter 6 Velocity Analysis
24
1 2 3 4
2 2 3 3 4 4
3 4
0
0
r r r r
r r r
eqs for unknowns and
r2 r1
r3
r4
X
Y
25
6.6 GRAPHICAL VELOCITY ANALYSIS:RELATIVE VELOCITY METHOD
6.6.1 Points on Links Limited to Pure Rotation or Rectilinear Translation
6.6.2 General Points on a Floating Link
26
1 2 3
1 1 2 2
1 2
1 4
1 1 2 4
0
00
5
r r r
r r
eqs for and
r r r
r r r
r1
r2
r3
r4
X
Y
27
1 2 3
1 1 2 2 2
2
1 2
2
2
0
0
5 min ,
r r r
solve for and
r r r
vcrad r
vs
eqs for unknowns and v
Y
X
r3
r2
r1
28
1 2 3
2 2 3
1 1
1 1 2 2 2
2
2
2
1 2
0
16, 340
3
0
8
8
r r r
r r
eqs for unknowns r and
r r r
cr
s
eqs for unknowns and
r1
r3
r2
Y
X
29
1 2 3 4
1 1 2 2 3 3
1 2 3
0
0
r r r r
r r r
given find and
r1 r2
r3
r4
X
Y
30
7.2 LINEAR ACCELERATION
7.2.1 Linear Acceleration of Rectilinear Points
Chapter 7 Acceleration Analysis
31
1 2 3 4
1 1 2 2 3 3
1 2 3
1 1 1 2 2 2 2 2 3 3 3 3 3
2 3
0
0
0
r r r r
r r r
given find and
r r r r r
solve for and
r2 r1
r3
Y
r4
X
32
pr
r5
1 2 3 5
1 1 2 2 3 3 5
1 1 1 2 2 2 2 2 3 3 5 3 3 3 5
p
p
p
r r r r r
r r r r r
r r r r r r r r
33
1 2 3
1 1 2 2
2
1 1 1 1 1 2 2 2 2 2
2
0
00
00
r r r
r rv
solve for and v
r r r ra
solve for and a
r2 r3
r1 X
Y
34
7.12 EQUIVALENT LINKAGES
35
Computation of Multibody Kinematics And Dynamics
1.1 Multibody Mechanical Systems
2D Planar Mechanism
36
3D Spatial Mechanism
Computer-Aided Design (CAD)
• Mechanics: Statics and dynamics.
• Dynamics : kinematics and kinetics.
• Kinematics is the study of motion, i.e., the study of displacement, velocity, and acceleration, regardless of the forces that produce the motion.
• Kinetics or Dynamics is the study of motion and its relationship with the forces that produce that motion.
37
1.2 Coordinate Systems
2 2 2 2
1 1( ) 2 cos 2 cos 2 cos( ) 0r l s d rl ls rs
2 2 2 2
2( ) 2 cos 2 cos 0r l s d rl ds
1 2 3 2 0
1 2 3[ ]T q
A four-bar mechanism with generalized coordinates.
degrees of freedom 4 – 3 = 1
4 Coordinate
4
3 Constraints
38
1
2
3
q
1 2 3
1 2 3
cos cos cos 0
sin sin sin 0
r d s l
r d s
Generalized Coordinates
dof 3 2 1
2 constraints
39
1 1 1 2 2 2 3 3 3
Tx y x y x y q
1 1
1 1
1 1 2 2
1 1 2 2
2 2 3 3
2 2 3 3
3 3
3 3
cos 02
sin 02
cos cos 02 2
sin sin 02 2
cos cos 02 2
sin sin 02 2
cos 02
sin 02
rx
ry
r dx x
r dy y
d sx x
d sy y
sx l
sy
Cartesian Coordinates
dof 9 8 1
12 coordinates and 11 kinematic constraints
40
1.3 Computation Kinematics • A mechanism that is formed from a collection of links or bodies kinematically connected to one
another.
• An open-loop mechanism may contain links with single joint.
• A closed-loop mechanism is formed from a closed chain, wherein each link is connected to at
least two other links of the mechanism.
Figure (a) Open-loop mechanism-double pendulum
and (b) closed-loop mechanism-four-bar linkage.
41 Figure (a) Single-loop mechanism and (b) multi-loop mechanism.
Single and Multi-Loop Mechanism
Figure Example of kinematic pairs: (a) revolute joint, (b) translational joint,
(c) gear set, (d) cam follower, (e) screw joint, and (f) spherical ball joint.
High and Low Pair of Kinematic Joint
42
2 algebraic constraint equations,
1 1 2 2 3 3 1
1 1 2 2 3 3 2
cos cos cos 0
sin sin sin 0
l l l d
l l l d
Figure four-bar mechanism.
Generalized Coordinates
3 generalized coordinates,
43
1 2 3, , , , ,T
i ix y z i q is the vector of coordinates for body
in three - dimensional space.
44
2.1 Planar Kinematics in Cartesian Coordinates
P P
i i i i r r A s
cos sin
sin cosi
i
A
Inertial system Χ − Y
Body−fixed system ξ − η
Coordinate transformation matrix
The column vector is the vector of coordinates
for body in a plane.
[ , , ]T
i ix y qi
• A constraint equation describing a condition on the vector of coordinates of
a system can be expressed as follows:
• In some constraint and driving function, the variable time may appear
explicitly:
• Constraint Jacobian Matrix by differentiating the constraint equations
•
0 q
, 0t q
Constraint Equation
45
0
0 often denoted as 0
also denoted as 0
0
q
q q q
q q q
( )
,
( )
( )
q
q qq
qq + q
q q
q q q
q = q q
• Kinematically equivalent.
Figure (a) A double parallel-crank mechanism and (b) its kinematically equivalent.
Redundant Constraint
46 Figure Quick-return mechanism: (a) schematic presentation and
(b) its equivalent representation without showing the actual outlines.
Kinematics of Mechanism Mainly composed of revolute joint and translation joint
0P P
i i j j r s r s
( ,2) 0r P P
i i j j
i jr A s r A s
( ,2)cos sin cos sin 0
sin cos sin cos 0
P P P P
i i i i i j j j j jr
P P P P
i i i i i j j j j j
x x
y y
Figure Revolute joint connecting bodies and .
P i j
2.2 Revolute Joint
+ −
47
1 cos sin cos sin 0P P P P
i i i i i j j j j jx x
2 sin cos sin cos 0P P P P
i i i i i j j j j jy y
Time Derivative of Revolute Joint Constraint
yi+ (x
i
P cosfi-h
i
P sinfi)fi- y
j- (x
j
P cosfj-h
j
P sinfj)f
j= 0
xi- (x
i
P sinfi+h
i
P cosfi)fi- x
j+ (x
j
P sinfj+h
j
P cosfj)f
j= 0
48
1 cos sin cos sin 0P P P P
i i i i i j j j j jx x
Time Derivative of Revolute Constraint
2 sin cos sin cos 0P P P P
i i i i i j j j j jy y
2
2
( sin cos ) ( cos sin )
( sin cos ) ( cos sin ) 0
P P P P
i i i i i i i i i i i j
P P P P
j j j j j j j j j j
x x
2
2
( cos sin ) ( sin cos )
( cos sin ) ( sin cos ) 0
P P P P
i i i i i i i i i i i j
P P P P
j j j j j j j j j j
y y
xi- (x
i
P sinfi+h
i
P cosfi)fi- x
j+ (x
j
P sinfj+h
j
P cosfj)f
j= 0
yi+ (x
i
P cosfi-h
i
P sinfi)fi- y
j- (x
j
P cosfj-h
j
P sinfj)f
j= 0
or
2 2p p
i i j js s
49
2.3 Translational Joint
Figure Different representations of a translational joint.
50
Figure A translational joint between bodies and .
i j
0T
i n d
0
P P
i jP R P R
i i i i P P
i j
x xx x y y
y y
0 0
( )( ) ( )( ) 0
( ) 0
P P P Q P P P Q
i j i i i j i j
i j i j
x x y y y y x x
Translational Joint
0 0
( )( ) ( )( ) 0
( ) 0
P Q P P P Q P P
i i j i i i j i
i j i j
x x y y y y x x
Time Derivative of Translational Joint Constraint
g = -2[(xi
P - xi
Q )(xi- x
j)+ (y
i
P - yi
Q )(yi- y
j)f† -[(x
i
P - xi
Q )(yi- y
j)- (y
i
P - yi
Q )(xi- x
j)fi
2
51
Driving Link
Figure (a) The motion of the slider is controlled in the direction
and (b) the motion of point is controlled in the direction.
( ) 0ix d t
( ) 0P
iy d t
P
x y
52
Kinematics of a four-bar linkage
mm180
mm180
mm260
mm80
OC
BC
AB
OA
1 1
1 1
1 1 2 2
1 1 2 2
2 2 3 3
2 2 3 3
3 3
3 3
1
8 Constraint equations:
40 0
40 0
40 130 0
40 130 0
130 90 0
130 90 0
90 180 0
90 0
driving link
2 2 0
x
y
x x
y y
x x
y y
x
y
t
cos
sin
cos cos
sin sin
cos cos
sin sin
cos
sinA
B
C O
y
x
1
1
1
2
2
3
3
3
2
333222111
,,,,,,,, unknown 9for equations 9 thesolve To yxyxyxT q53
A Matlab Program for
Jacobian matrix and velocity equations
1
2
3 2
4 2
5 2 3
6 2 3
7 3
8 3
9
1 0 40sin 0 0 0 0 0 0
0 1 40cos 0 0 0 0 0 0
1 0 40sin 1 0 130sin 0 0 0
0 1 40cos 0 1 130cos 0 0 0
0 0 0 1 0 130sin 1 0 90sin
0 0 0 0 1 130cos 0 1 90cos
0 0 0 0 0 0 1 0 90sin
0 0 0 0 0 0 0 1 90cos
0 0 1 0 0 0 0 0 0
J
2
0
0
0
0
0
0
0
0
qβq velocity for the solve To J
54
Acceleration equations
0
sin90
cos90
sin90sin130
cos90cos130
sin130sin50
cos130cos50
sin40
cos40
2
33
2
33
2
33
2
22
2
33
2
22
2
22
2
2
22
2
2
2
γ
qγq onaccelerati for the solve To J
55
The procedure of m-file
0at start and Initialize t
tq solve toposition initial hsolver witnonlinear Call
solve to with andmatrix Jacobian Determine tt qqβ
solve to with Determine tt qqγ
iterationnext of position initialnew theasit set and
motion intended with Assume Δtt q
ttt qqq and , of response timePlot the
themanimate and bars theof positions theDetermine
56
The code of m.file (1) 1. % Set up the time interval and the initial positions of the nine coordinates
2. T_Int=0:0.01:2;
3. X0=[0 50 pi/2 125.86 132.55 0.2531 215.86 82.55 4.3026];
4. global T
5. Xinit=X0;
6.
7. % Do the loop for each time interval
8. for Iter=1:length(T_Int);
9. T=T_Int(Iter);
10. % Determine the displacement at the current time 11. [Xtemp,fval] = fsolve(@constrEq4bar,Xinit);
12.
13. % Determine the velocity at the current time
14. phi1=Xtemp(3); phi2=Xtemp(6); phi3=Xtemp(9);
15. JacoMatrix=Jaco4bar(phi1,phi2,phi3);
16. Beta=[0 0 0 0 0 0 0 0 2*pi]';
17. Vtemp=JacoMatrix\Beta;
18.
19. % Determine the acceleration at the current time
20. dphi1=Vtemp(3); dphi2=Vtemp(6); dphi3=Vtemp(9);
21. Gamma=Gamma4bar(phi1,phi2,phi3,dphi1,dphi2,dphi3);
22. Atemp=JacoMatrix\Gamma;
23.
24. % Record the results of each iteration
25. X(:,Iter)=Xtemp; V(:,Iter)=Vtemp; A(:,Iter)=Atemp;
26.
27. % Determine the new initial position to solve the equation of the next
28. % iteration and assume that the kinematic motion is with inertia
29. if Iter==1
30. Xinit=X(:,Iter);
31. else
32. Xinit=X(:,Iter)+(X(:,Iter)-X(:,Iter-1));
33. end
34.
35.end 57
The code of m.file (2)
36.% T vs displacement plot for the nine coordinates
37.figure
38.for i=1:9;
39. subplot(9,1,i)
40. plot (T_Int,X(i,:))
41. set(gca,'xtick',[], 'FontSize', 5)
42.end
43.% Reset the bottom subplot to have xticks
44.set(gca,'xtickMode', 'auto')
45.
46.% T vs velocity plot for the nine coordinates
47.figure
48.for i=1:9;
49. subplot(9,1,i)
50. plot (T_Int,V(i,:))
51. set(gca,'xtick',[], 'FontSize', 5)
52.end
53.set(gca,'xtickMode', 'auto')
54.
55.% T vs acceleration plot for the nine coordinates
56.figure
57.for i=1:9;
58. subplot(9,1,i)
59. plot (T_Int,A(i,:))
60. AxeSup=max(A(i,:));
61. AxeInf=min(A(i,:));
62. if AxeSup-AxeInf<0.01
63. axis([-inf,inf,(AxeSup+AxeSup)/2-0.1 (AxeSup+AxeSup)/2+0.1]);
64. end
65. set(gca,'xtick',[], 'FontSize', 5)
66.end
67.set(gca,'xtickMode', 'auto') 58
The code of m.file (3)
68.% Determine the positions of the four revolute joints at each iteration
69.Ox=zeros(1,length(T_Int));
70.Oy=zeros(1,length(T_Int));
71.Ax=80*cos(X(3,:));
72.Ay=80*sin(X(3,:));
73.Bx=Ax+260*cos(X(6,:));
74.By=Ay+260*sin(X(6,:));
75.Cx=180*ones(1,length(T_Int));
76.Cy=zeros(1,length(T_Int));
77.
78.% Animation
79.figure
80.for t=1:length(T_Int);
81. bar1x=[Ox(t) Ax(t)];
82. bar1y=[Oy(t) Ay(t)];
83. bar2x=[Ax(t) Bx(t)];
84. bar2y=[Ay(t) By(t)];
85. bar3x=[Bx(t) Cx(t)];
86. bar3y=[By(t) Cy(t)];
87.
88. plot (bar1x,bar1y,bar2x,bar2y,bar3x,bar3y);
89. axis([-120,400,-120,200]);
90. axis normal
91.
92. M(:,t)=getframe;
93.end
59
Initialization 1. % Set up the time interval and the initial positions of the nine coordinates
2. T_Int=0:0.01:2;
3. X0=[0 50 pi/2 125.86 132.55 0.2531 215.86 82.55 4.3026];
4. global T
5. Xinit=X0;
1. The sentence is notation that is behind symbol “%”.
2. Simulation time is set from 0 to 2 with Δt = 0.01.
3. Set the appropriate initial positions of the 9 coordinates which are used to solve nonlinear solver.
4. Declare a global variable T which is used to represent the current time t and determine the
driving constraint for angular velocity.
60
Determine the displacement
10. [Xtemp,fval] = fsolve(@constrEq4bar,Xinit);
a. function F=constrEq4bar(X)
b.
c. global T
d.
e. x1=X(1); y1=X(2); phi1=X(3);
f. x2=X(4); y2=X(5); phi2=X(6);
g. x3=X(7); y3=X(8); phi3=X(9);
h.
i. F=[ -x1+40*cos(phi1);
j. -y1+40*sin(phi1);
k. x1+40*cos(phi1)-x2+130*cos(phi2);
l. y1+40*sin(phi1)-y2+130*sin(phi2);
m. x2+130*cos(phi2)-x3+90*cos(phi3);
n. y2+130*sin(phi2)-y3+90*sin(phi3);
o. x3+90*cos(phi3)-180;
p. y3+90*sin(phi3);
q. phi1-2*pi*T-pi/2];
10. Call the nonlinear solver fsolve in which the constraint equations and initial values are necessary. The
initial values is mentioned in above script. The constraint equations is written as a function (which can
be treated a kind of subroutine in Matlab) as following and named as constrEq4bar. The fsolve finds a
root of a system of nonlinear equations and adopts the trust-region dogleg algorithm by default.
The equation of driving constraint
is depended on current time T 61
Determine the velocity 14. phi1=Xtemp(3); phi2=Xtemp(6); phi3=Xtemp(9);
15. JacoMatrix=Jaco4bar(phi1,phi2,phi3);
16. Beta=[0 0 0 0 0 0 0 0 2*pi]';
17. Vtemp=JacoMatrix\Beta;
15. Call the function Jaco4bar to obtain the Jacobian Matrix depended on current values of
displacement.
16. Declare the right-side of the velocity equations.
17. Solve linear equation by left matrix division “\” roughly the same as J-1β. The algorithm adopts
several methods such as LAPACK, CHOLMOD, and LU. Please find the detail in Matlab Help.
a. function JacoMatrix=Jaco4bar(phi1,phi2,phi3)
b.
c. JacoMatrix=[ -1 0 -40*sin(phi1) 0 0 0 0 0 0;
d. 0 -1 40*cos(phi1) 0 0 0 0 0 0;
e. 1 0 -40*sin(phi1) -1 0 -130*sin(phi2) 0 0 0;
f. 0 1 40*cos(phi1) 0 -1 130*cos(phi2) 0 0 0;
g. 0 0 0 1 0 -130*sin(phi2) -1 0 -90*sin(phi3);
h. 0 0 0 0 1 130*cos(phi2) 0 -1 90*cos(phi3);
i. 0 0 0 0 0 0 1 0 -90*sin(phi3);
j. 0 0 0 0 0 0 0 1 90*cos(phi3);
k. 0 0 1 0 0 0 0 0 0];
62
Determine the acceleration 20. dphi1=Vtemp(3); dphi2=Vtemp(6); dphi3=Vtemp(9);
21. Gamma=Gamma4bar(phi1,phi2,phi3,dphi1,dphi2,dphi3);
22. Atemp=JacoMatrix\Gamma;
21. Call the function Gamma4bar to obtain the right-side of the velocity equations depended on
current values of velocity.
22. Solve linear equation to obtain the current acceleration.
a. function Gamma=Gamma4bar(phi1,phi2,phi3,dphi1,dphi2,dphi3)
b.
c. Gamma=[ 40*cos(phi1)*dphi1^2;
d. 40*sin(phi1)*dphi1^2;
e. 40*cos(phi1)*dphi1^2+130*cos(phi2)*dphi2^2;
f. 40*sin(phi1)*dphi1^2+130*sin(phi2)*dphi2^2;
g. 130*cos(phi2)*dphi2^2+90*cos(phi3)*dphi3^2;
h. 130*sin(phi2)*dphi2^2+90*sin(phi3)*dphi3^2;
i. 90*cos(phi3)*dphi3^2;
j. 90*sin(phi3)*dphi3^2;
k. 0];
63
Determine next initial positions 29. if Iter==1
30. Xinit=X(:,Iter);
31. else
32. Xinit=X(:,Iter)+(X(:,Iter)-X(:,Iter-1));
33. end
29.~33. Predict the next initial positions with assumption of inertia except the first time of the loop.
64
Plot time response 37.figure
38.for i=1:9;
39. subplot(9,1,i)
40. plot (T_Int,X(i,:))
41. set(gca,'xtick',[], 'FontSize', 5)
42.end
43.% Reset the bottom subplot to have xticks
44.set(gca,'xtickMode', 'auto')
45.
46.% T vs velocity plot for the nine coordinates
47.figure
48.for i=1:9;
37.…
37. Create a blank figure .
39. Locate the position of subplot in the figure.
40. Plot the nine subplots for the time responses of nine coordinates.
41. Eliminate x-label for time-axis and set the font size of y-label.
44. Resume x-label at bottom because the nine subplots share the same time-axis.
47.~ It is similar to above.
65
Animation 69.Ox=zeros(1,length(T_Int));
70.Oy=zeros(1,length(T_Int));
71.Ax=80*cos(X(3,:));
72.Ay=80*sin(X(3,:));
73.Bx=Ax+260*cos(X(6,:));
74.…
69. Determine the displacement of revolute joint.
80. Repeat to plot the locations by continue time elapsing.
81. Determine the horizontal location of .
88. Plot .
89. Set an appropriate range of axis.
80.for t=1:length(T_Int);
81. bar1x=[Ox(t) Ax(t)];
82. bar1y=[Oy(t) Ay(t)];
83. bar2x=[Ax(t) Bx(t)];
84. bar2y=[Ay(t) By(t)];
85. bar3x=[Bx(t) Cx(t)];
86. bar3y=[By(t) Cy(t)];
87.
88. plot (bar1x,bar1y,bar2x,bar2y,bar3x,bar3y);
89. axis([-120,400,-120,200]);
90. axis normal
91.
92. M(:,t)=getframe;
93.end
OA
OCBCABOA and , , ,
66
Time response of displacement
1x
1
1y
2x
2
2y
3x
3
3y
t67
Time response of velocity
1x
1
1y
2x
2
2y
3x
3
3y
t68
Time response of acceleration
1x
1
1y
2x
2
2y
3x
3
3y
t69
Example of a slider-crank mechanism
mm200
mm300
mm200
BO
GB
AG
1
1
1
4 3 3
4 3 3
3 3 2 2
3 3 2 2
2 2 1
2 2 1
4 1 4 4 4 1 4 4
4
11 Constraint equations:
0
0
0
200 0
200 0
300 100 0
300 100 0
100 0
100 0
100 100 100 100 0
x
y
x x
y y
x x
y y
x x
y y
y y x x
cos
sin
cos cos
sin sin
cos
cos
cos sin sin cos
1
2
0
driving link
5 76 1 2 0t
. .
1 1 1 2 2 2 3 3 3 4 4 4To solve the 12 equations for 12 unknown T x y x y x y x y ,
q , , , , , , , , , ,
A
B
C
O
y
x 4
4
2
23
3
3
2
1
1G
70
Jacobian matrix
0000003600000
35000000003400
33323100000002928
000000272600240
000000230220020
0001918017160000
0001501413012000
0100980000000
006504000000
000000000300
000000000020
000000000001
12
11
10
9
8
7
6
5
4
3
2
1
J
2.1
0
0
0
0
0
0
0
0
0
0
0
2
3
2
3
3
cos10027 ,17
sin30015
sin10023 ,13
cos2009
sin2005
135 ,24 ,20 ,16 ,12 ,8 ,4
136 ,34 ,26 ,22 ,18 ,14 ,10 ,6 ,3 ,2 ,1
144144
4
4
3
sincos10033
2932
2831
cos10029
sin10028
cos30019
yyxx
71
The right-side
of the acceleration equations
0
0
10
sin100
cos100
sin100sin300
cos100cos300
sin200
cos200
0
0
0
2
22
2
22
2
22
2
33
2
22
2
33
2
33
2
33
γ
γ
414414
2
444144414cos100sin100sin200cos20010 where yyxxyyxx
72
Time response of displacement
2x
2
2y
3x
3
3y
4x
4
4y
t73
Time response of velocity
2x
2
2y
3x
3
3y
4x
4
4y
t74
Time response of acceleration
2x
2
2y
3x
3
3y
t
4x
4
4y
75
Kinematic Modeling
Figure Kinematic modeling of a slider-crank mechanism.
1 1 10.0, 0.0, 0.0x y
4 4 3 3
3 3 2 2
0 0 0 0
2 2 1 1
0.0, 0.0, 200.0, 0.0
300.0, 0.0, 100.0, 0.0
100.0, 0.0, 0.0, 0.0
A A A A
B B B B
4 4 1 1
0 0
4 4 1 1
0.0, 0.0, 100.0, 0.0,
100.0, 0.0, 0.0, 0.0
A A B B
C C
2 5.76 1.2 0.0t
driving link
Ground
Revolute joint
translational joint
76
1 1 1 1 1
1 1 1 1 1
4 4 4
4 4 4
1 1 4
4 4
1 1 4
100100
0 100
1000
100 100
100100 100
100
T
x c s x cB
y s c y s
c s sn
s c c
x c xn d s c
y s y
41
41
4 1 4 11
1 1 4 4 1 1 4 44
100
100
100 100 100
100 100 100 100 0
sx
cy
c c s s
y s y s x c x c
4 1 1 4 1 1 4 4100 100 100 100c y s y x c x s
Translation Joint 1y
1Bd
c
n
1 1 4
1 1 4
100
100
x c xd
y s y
77
1 1
2 1
3 1
0.0
0.0
0.0
x
y
Figure Kinematic modeling of a slider-crank mechanism.
Ground
revolute joints 4 4 3 3
5 4 3 3
6 3 3 2 2
7 3 3 2 2
8 2 2 1
9 2 2 1
200cos 0
200sin 0
300cos 100cos 0
300sin 100sin 0
100cos 0
100sin 0
x x
y y
x x
y y
x x
y y
translational joint
10 4 1 1 4
1 1 4 4
11 4 1
( 100cos )( 100sin )
( 100cos )( 100sin ) 0
0
y y
x x
driving constraint
12 2 5.76 1.2 0t
Kinematic Modeling
78
Figure The Jacobian matrix.
Jacobian Matrix
79
Cont’d
30 80
( )
( ) 0
( , ) 0d t
q
q
kinematic constraints
driving link
3.2 Solution Technique
velocity equations
( )( ) ( )
0 or 0
0 or 0
q
dd d
q tt
q = qq
q + = qq
( ) ( )
0d d
q
q t
q =
acceleration
( ) ( ) ( ) ( )
0 or ( ) 0
( ) 2 0
q q q
d d d d
q q q qt tt
qq + q = q q q
q q
q q q q
81
Solution Technique
At any given instant t
(1) Solve
n equations for n unknowns
(2) Solve
n equations for n unknowns
(3) Solve
n equations for n unknowns
( )
( , )
q
d
q t
q q = 0
q q = (the right hand side)
( )tq
( )
( , )
q
d
q t
q q = 0
q q = (the right hand side)
( )tq
( )
( )
q
d
q
q q =
q q =
(the right hand side)
( )tq
82
4.1 Planar Rigid Body Dynamics
i i xi
i i yi
i i i
m x f
m y f
n
Miqi= g
i
0 0
0 0
0 0
x
y
i
m x f
m y f
n
83
Constraint Force
1
1
( )
( )
( , ) 0,
0 or 0,
,
n
m n
q q
m
T
q
c
c T
q
T
q
t
q
q qq
Mq g g
g
Mq g
There exists Lagrange Multiplier
such that is that constraint force.
The equations of motion can be written as
84
Illustration of Constraint Force
0
4 eqs. for 5 unknowns , , , ,
0constraint equation
0
2 2 1, 0, , ,
3 3 3
c
mgs f mx
mgc N my
mgc N
f R I
x y f N
x R
y R
gx gs y s N mgc f mgs
R
Pure rolling of a disk down a slope
x
y
f
N
mg
85
2
Generalized coordinate ,
Constraint eq. 0 0
0
0 0
0 0 1 0
0 0 0 1
10 0 0
2
1 0 0 0
0 1 0 0 0
T
x
x R y R
x R
M mgsq q
mgc
q
m
m
mR R
R
1
2
0
0
0
2 2 13 eqs. for 3 unknowns , 0, ,
3 3 3
1
1 0 3
The constraint force 0 1
0 1
3
T
x mgs
y mgc
gx gs y s mgs
R
mgs
mgcq
RmgRs
3 1
is the friction force for pure rolling.
86
mixi= f
(x)i- l
1
miyi= f
( y)i- l
2
mifi= n
i- (y
i
P - yi)l
1+ (x
i
P - xi)l
2
4.2 Constraint Force in Revolute Joint
1
2
0 0 1 0
0 0 0 1
0 0 ( ) ( )
x
y
P P
i i i ii i
m x f
m y f
y y x x n
87
Constraint Force in Translational Joint
88
1( )P Q
i i xi i im x f y y
1( )P Q
i i yi i im y f x x
For a translational joint between i and j,
the equation of motion for body i can be written as
1 2[( )( ) ( )( )]P P Q P P Q
i i i j i i i j i i in x x x x y y y y
T
q Mq g
linear algebraic equations in unknowns
for and . q n m n m
4.3 Formulation of Multi-body Dynamic Systems
89
Dynamics of a four-bar linkage
m18.0
m18.0
m26.0
m08.0
OC
BC
AB
OA
A
B
C O
mN1.0 T
24
23
25
mkg1086.4
mkg1046.1
mkg1027.4
BO
AB
OA
I
I
I
kg18.0
kg26.0
kg08.0
BC
AB
OA
M
M
M
2sm9.8g
90
A Matlab Program for
Mass matrix and external force vector
4
3
5
1086.400000000
00.180000000
000.18000000
0001046.100000
00000.260000
000000.26000
0000001027.400
000000008.00
0000000008.0
M
2sm9.8g
kg18.0
kg26.0
kg08.0
BC
AB
OA
M
M
M
24
23
25
mkg1086.4
mkg1046.1
mkg1027.4
BO
AB
OA
I
I
I
mN1.0 T
0
8.918.0
0
0
8.926.0
0
1.0
8.908.0
0
g
91
0
sin09.0
cos09.0
sin09.0sin13.0
cos09.0cos13.0
sin13.0sin05.0
cos13.0cos05.0
sin04.0
cos04.0
2
33
2
33
2
33
2
22
2
33
2
22
2
22
2
2
22
2
2
2
γ
Jacobian matrix and γ
000000100
cos09.010000000
sin09.001000000
cos09.010cos13.010000
sin09.001sin13.001000
000cos13.010cos04.010
000sin13.001sin04.001
000000cos04.010
000000sin04.001
3
3
32
32
2
2
99
J
m18.0
m18.0
m26.0
m08.0
OC
BC
AB
OA
92
Computation
.0 velocity and 0 position initial with0 and 0for
solve tois stepfirst thecomputing, numerial In
1819
8889
89
qqλq
γ
g
λ
q
OJ
JMT
.for equation aldifferenti thesolve tois objective The8889
8999t
T
qγ
g
λ
q
OJ
JM
. and for step above repeat the to
and theuse and , 0
0 Integrate
ΔtΔt
ΔtΔtΔt
ΔtΔt
λq
qqq
q
q
q
.condition terminaluntil Repeat Δtt
93
A convenient way with Matlab solver
Solve initial value problems for ordinary differential equations with
ode45(commended), ode23, ode113…
The equations are described in the form of z‘=f(t,z)
q
qz
q
qz
,Let
3
1
1
3
1
1
y
x
y
x
94
The syntax for calling solver in Matlab
[T,Z] = ode45(@Func4Bar,[0:0.005:2],Z0);
column vector of
time points
Solution array
A vector specifying the interval
of integration
A vector of initial
conditions
A function that evaluates the right side of the
differential equations
function dz=Func4Bar(t,z)
global L1 L2 L3 L4 torque gravity
phi1=z(3); phi2=z(6); phi3=z(9);
dphi1=z(12); dphi2=z(15); dphi3=z(18);
M=diag([L1 L1 L1^3/12 L2 L2 L2^3/12 L3 L3 L3^3/12]);
J=[ -1 0 -0.5*L1*sin(phi1) 0 0 0 0 0 0;
0 -1 0.5*L1*cos(phi1) 0 0 0 0 0 0;
1 0 -0.5*L1*sin(phi1) -1 0 -0.5*L2*sin(phi2) 0 0 0;
0 1 0.5*L1*cos(phi1) 0 -1 0.5*L2*cos(phi2) 0 0 0;
0 0 0 1 0 -0.5*L2*sin(phi2) -1 0 -0.5*L3*sin(phi3);
0 0 0 0 1 0.5*L2*cos(phi2) 0 -1 0.5*L3*cos(phi3);
0 0 0 0 0 0 1 0 -0.5*L3*sin(phi3);
0 0 0 0 0 0 0 1 0.5*L3*cos(phi3)];
95
The syntax for calling solver in Matlab
J=[ -1 0 -0.5*L1*sin(phi1) 0 0 0 0 0 0;
0 -1 0.5*L1*cos(phi1) 0 0 0 0 0 0;
1 0 -0.5*L1*sin(phi1) -1 0 -0.5*L2*sin(phi2) 0 0 0;
0 1 0.5*L1*cos(phi1) 0 -1 0.5*L2*cos(phi2) 0 0 0;
0 0 0 1 0 -0.5*L2*sin(phi2) -1 0 -0.5*L3*sin(phi3);
0 0 0 0 1 0.5*L2*cos(phi2) 0 -1 0.5*L3*cos(phi3);
0 0 0 0 0 0 1 0 -0.5*L3*sin(phi3);
0 0 0 0 0 0 0 1 0.5*L3*cos(phi3)];
gamma=[ 0.5*L1*cos(phi1)*dphi1^2;
0.5*L1*sin(phi1)*dphi1^2;
0.5*L1*cos(phi1)*dphi1^2+0.5*L2*cos(phi2)*dphi2^2;
0.5*L1*sin(phi1)*dphi1^2+0.5*L2*sin(phi2)*dphi2^2;
0.5*L2*cos(phi2)*dphi2^2+0.5*L3*cos(phi3)*dphi3^2;
0.5*L2*sin(phi2)*dphi2^2+0.5*L3*sin(phi3)*dphi3^2;
0.5*L3*cos(phi3)*dphi3^2;
0.5*L3*sin(phi3)*dphi3^2];
g=[0 gravity*L1 torque 0 gravity*L2 0 0 gravity*L3 0]';
Matrix=[M J';
J zeros(size(J,1),size(J,1))];
d2q=Matrix\[g;gamma];
dz=[z(10:18,:); d2q(1:9,:)]; 96
Time response of displacement
1x
1
1y
2x
2
2y
3x
3
3y
t97
Time response of velocity
1x
1
1y
2x
2
2y
3x
3
3y
t98
Time response of acceleration
1x
1
1y
2x
2
2y
3x
3
3y
t
310
99
Time response of λ
1
t
310
2
3
4
5
6
7
8
100
A slider-crank mechanism
m2.0
m3.0
m2.0
m1.0
BO
GB
AG
AC
A
B
C
O
G
24
22
24
mkg1067.6
mkg1004.1
mkg1067.6
BO
AB
slider
I
I
I
kg2.0
kg5.0
kg1.0
BO
AB
AC
M
M
M
mN1.0 T
2sm9.8g
101
Time response of displacement
2x
2
2y
3x
3
3y
4x
4
4y
t102
Time response of velocity
2x
2
2y
3x
3
3y
4x
4
4y
t103
Time response of acceleration
2x
2
2y
3x
3
3y
t
4x
4
4y
310
104
Time response of λ
1
t
310
2
3
4
5
6
7
8
9
10
11
105
0 1 0 0 0
0 0 0
0 0 1 0 0 0 1
c s c s
s c c s s c
s c
D C BA DCB
5.1 Euler Angles
106
(5.1)
c c s c s c s s c c s s
s c c c s s s c c c c s
s s s c c
A =
Time Derivatives of Euler Angles
wx( )
= y sinq sinf +q cosf
wh( )
= y sinq cosf -q sinf
wz( )
= y cosq +f
sin sin cos 0
sin cos sin 0
cos 0 1
107
A DCB
2 2 3 3
1 1 3 3
1 1 2 2
1 0 0 0 0
0 0 1 0 0
0 0 0 0 1
c s c s
c s s c
s c s c
D C B
Bryant Angles
108
2 3 2 3 2
1 3 1 2 3 1 3 1 2 3 1 2
1 3 1 2 3 1 3 1 2 3 1 2
c c c s s
c s s s c c c s s s s c
s s c s c s c c s s c c
A =
Time Derivative of Bryant Angles
1 3 3 1
2 3 3 2
2 3
cos cos sin 0
cos sin cos 0
sin 0 1
109