Upload
aychiluhimhailu
View
216
Download
0
Embed Size (px)
Citation preview
8/10/2019 mechanism all chaps.pdf
1/109
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
8/10/2019 mechanism all chaps.pdf
2/109
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 mechanismmotion in 2D space
2
8/10/2019 mechanism all chaps.pdf
3/109
1.4 MECHANISM TERMINOLOGYMechanism
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
Linksrigid body
Joint
Primary joint (full joint)
Revolute joint (pin or hinge joint)
pure rotation
Sliding joint (piston or prism joint)
linear sliding
3
8/10/2019 mechanism all chaps.pdf
4/109
Higher-order joint (half joint)
Allow rotation and sliding
Cam joint
Gear connection
Simple link
A rigid body contains only twojoints
Crank
Rocker
Complex link
A rigid body contains more thantwo joints
Rocker arm
Bellcrank
Point of interest
Actuator A power source link
4
Mechanism Joint
8/10/2019 mechanism all chaps.pdf
5/109
1.5 Kinematic Diagram
Simple Link
Simple Link
(with point of
interest)
Complex Link
Pin Joint
Revolute Joint
5
8/10/2019 mechanism all chaps.pdf
6/109
Kinematic Diagram
Slider Joint
Cam Joint
Gear Joint
Translation Joint
6
8/10/2019 mechanism all chaps.pdf
7/109
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/10/2019 mechanism all chaps.pdf
8/109
8
8/10/2019 mechanism all chaps.pdf
9/109
1.7 Actuators and Drivers
Electric motors (AC/DC)
Engines Servomotors
Air or hydraulic motors
Hydraulic or pneumatic cylinders
Screw actuators
Manual
9
8/10/2019 mechanism all chaps.pdf
10/109
10
8/10/2019 mechanism all chaps.pdf
11/109
1.9 SPECLAL CASES OF THE MOBILITY EQUATION
Coincident Joints
One degree of freedom actually if pivoted links are the same size
11
8/10/2019 mechanism all chaps.pdf
12/109
12
8/10/2019 mechanism all chaps.pdf
13/109
1.10 THE FOUR-BAR MECHANISM
13
8/10/2019 mechanism all chaps.pdf
14/109
14
Crank and Rocker
8/10/2019 mechanism all chaps.pdf
15/109
1.10.1 Design of Crank and Rocker
s : short link
l : long link
p, q: intermediate link
15
8/10/2019 mechanism all chaps.pdf
16/109
1 12 SPECIAL PURPOSE MECHANISMS
8/10/2019 mechanism all chaps.pdf
17/109
1.12 SPECIAL PURPOSE MECHANISMS1.12.1 Straight-Line Mechanisms
17
1.12.2 Parallelogram Mechanisms
1 12 3 Q i k R t M h i
8/10/2019 mechanism all chaps.pdf
18/109
1.12.3 Quick-Return Mechanisms
18
1.12.4 Scotch Yoke Mechanism
8/10/2019 mechanism all chaps.pdf
19/109
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 allother links
Chapter 4 Displacement Analysis
4.4 DISPLACEMENT ANALYSIS
19
8/10/2019 mechanism all chaps.pdf
20/109
4 1 V t A l i f Di l t
8/10/2019 mechanism all chaps.pdf
21/109
r1
r2
r4
r3r3r5
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
r c r s r s
r r r
r r r
r c r c x
r s r s
r
2 equationsfor 2 unknows
2 equationsfor 2 unknows
(1)
(2)2 3
,
4 1and x
4.1 Vector Analysis of Displacement
21
8/10/2019 mechanism all chaps.pdf
22/109
1 2 3
1 2
1 2
1 2 1 max
1 2 1 min
0
0.5 1.75 1 00.5 1.75
,
,
r r r
c cs s y
for solve for and y
for solve for and y
r1
r3
r2
X
Y
22
8/10/2019 mechanism all chaps.pdf
23/109
4.7 Limiting Positions and Stroke
23
Ch t 6 V l it A l i
8/10/2019 mechanism all chaps.pdf
24/109
6.2 LINEAR AND ANGULAR VELOCITY
6.2.2 Linear Velocity of a General Point
Chapter 6 Velocity Analysis
24
8/10/2019 mechanism all chaps.pdf
25/109
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
r2r1
r3
r4
X
Y
25
6 6 GRAPHICAL VELOCITY ANALYSIS:RELATIVE VELOCITY METHOD
8/10/2019 mechanism all chaps.pdf
26/109
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
8/10/2019 mechanism all chaps.pdf
27/109
1 2 3
1 1 2 2
1 2
1 4
1 1 2 4
0
0
05
r r r
r r
eqs for and
r r r
r r r
r1
r2
r3
r4
X
Y
27
8/10/2019 mechanism all chaps.pdf
28/109
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
8/10/2019 mechanism all chaps.pdf
29/109
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
8/10/2019 mechanism all chaps.pdf
30/109
1 2 3 4
1 1 2 2 3 3
1 2 3
00
r r r r r r r
given find and
r1r2
r3
r4
X
Y
30
8/10/2019 mechanism all chaps.pdf
31/109
7.2 LINEAR ACCELERATION
7.2.1 Linear Acceleration of Rectilinear Points
Chapter 7 Acceleration Analysis
31
8/10/2019 mechanism all chaps.pdf
32/109
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 rgiven find and
r r r r r
solve for and
r2r1
r3
Y
r4
X
32
8/10/2019 mechanism all chaps.pdf
33/109
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
8/10/2019 mechanism all chaps.pdf
34/109
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 r a
solve for and a
r2 r3
r1 X
Y
34
8/10/2019 mechanism all chaps.pdf
35/109
7.12 EQUIVALENT LINKAGES
35
Computation of Multibody Kinematics And Dynamics
8/10/2019 mechanism all chaps.pdf
36/109
Computation of Multibody Kinematics And Dynamics1.1 Multibody Mechanical Systems
2D Planar Mechanism
36
3D Spatial Mechanism
8/10/2019 mechanism all chaps.pdf
37/109
Computer-Aided Design (CAD)
Mechanics: Statics and dynamics.
Dynamics : kinematics and kinetics.
Kinematics is the study of motion, i.e., the study ofdisplacement, velocity, and acceleration, regardlessof the forces that produce the motion.
Kinetics or Dynamics is the study of motion and itsrelationship with the forces that produce that motion.
37
8/10/2019 mechanism all chaps.pdf
38/109
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
G C
8/10/2019 mechanism all chaps.pdf
39/109
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
Cartesian Coordinates
8/10/2019 mechanism all chaps.pdf
40/109
1 1 1 2 2 2 3 3 3T
x 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
8/10/2019 mechanism all chaps.pdf
41/109
8/10/2019 mechanism all chaps.pdf
42/109
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
8/10/2019 mechanism all chaps.pdf
43/109
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
2.1 Planar Kinematics in Cartesian Coordinates
8/10/2019 mechanism all chaps.pdf
44/109
1 2 3, , , , , T
i ix y z i q is the vector of coordinates for bodyin three-dimensional space.
44
P P
i i i i r r A s
cos sin
sin cosi
i
A
Inertial system Y
Bodyfixed system
Coordinate transformation matrix
The column vector is the vector of coordinates
for body in a plane.[ , , ]
T
i ix y q
i
Constraint Equation
8/10/2019 mechanism all chaps.pdf
45/109
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
q
45
0
0 often denoted as 0
also denoted as 0
0
q
q q q
q q q
( )
,
( )
( )
q
q q
q
qq + q
q q
q q q
q = q q
Redundant Constraint
8/10/2019 mechanism all chaps.pdf
46/109
Kinematically equivalent.
Figure (a) A double parallel-crank mechanism and (b) its kinematically equivalent.
46
Figure Quick-return mechanism: (a) schematic presentation and
(b) its equivalent representation without showing the actual outlines.
Kinematics of MechanismMainly composed of revolute joint and translation joint
8/10/2019 mechanism all chaps.pdf
47/109
0P P
i i j j r s r s
( ,2) 0r P Pi i j j
i j
r 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
Ti D i ti f R l t J i t C t i t
8/10/2019 mechanism all chaps.pdf
48/109
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 0
P P P P
i i i i i j j j j jy y
Time Derivative of Revolute Joint Constraint
yi+(x
i
Pcos
i
i
Psin
i)
i y
j (x
j
Pcos
j
j
Psin
j)
j= 0
xi (x
i
P
sin
i+
i
P
cos
i )
i xj+(x
j
P
sin
j+
j
P
cos
j )
j= 0
48
8/10/2019 mechanism all chaps.pdf
49/109
2.3 Translational Joint
8/10/2019 mechanism all chaps.pdf
50/109
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 Pi j
x x
x 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
8/10/2019 mechanism all chaps.pdf
51/109
0 0
( )( ) ( )( ) 0
( ) 0
P Q P P P Q P Pi 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
= 2[(xi
P x
i
Q )(xi x
j)+ (y
i
P y
i
Q)(yi y
j) [(x
i
P x
i
Q)(yi y
j) (y
i
P y
i
Q )(xi x
j)
i
2
51
8/10/2019 mechanism all chaps.pdf
52/109
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
A Matlab Program for
8/10/2019 mechanism all chaps.pdf
53/109
Kinematics of a four-bar linkage
mm180
mm180
mm260
mm80
OC
BC
AB
OA1 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 link2 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
CO
y
x
1
1
1
2
2
3
3
3
2
333222111
,,,,,,,,unknown9forequations9thesolveTo yxyxyxT q53
A Matlab Program for
8/10/2019 mechanism all chaps.pdf
54/109
Jacobian matrix and velocity equations
1
2
3 2
4 2
5 2 3
6 2 3
7 3
8 3
9
1 0 40 sin 0 0 0 0 0 0
0 1 40 cos 0 0 0 0 0 0
1 0 40 sin 1 0 130 sin 0 0 0
0 1 40 cos 0 1 130 cos 0 0 0
0 0 0 1 0 130 sin 1 0 90 sin
0 0 0 0 1 130 cos 0 1 90 cos
0 0 0 0 0 0 1 0 90 sin
0 0 0 0 0 0 0 1 90 cos
0 0 1 0 0 0 0 0 0
J
2
0
0
0
0
0
0
0
0
qq velocityfor thesolveTo J
54
8/10/2019 mechanism all chaps.pdf
55/109
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
qq onacceleratifor thesolveTo J
55
8/10/2019 mechanism all chaps.pdf
56/109
The procedure of m-file
0atstartandInitialize t
tqsolvetopositioninitialhsolver witnonlinearCall
solvetowithandmatrixJacobianDetermine tt qq
solvetowithDetermine tt qq
iterationnextofpositioninitialnewtheasitsetand
motionintendedwithAssume ttq
ttt qqq and,ofresponsetimePlot the
themanimateandbarstheofpositionstheDetermine
56
8/10/2019 mechanism all chaps.pdf
57/109
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. globalT
5. Xinit=X0;
6.
7. % Do the loop for each time interval
8. forIter=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 time14. 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 iteration25. 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. ifIter==1
30. Xinit=X(:,Iter);
31. else
32. Xinit=X(:,Iter)+(X(:,Iter)-X(:,Iter-1));
33. end
34.35.end 57
8/10/2019 mechanism all chaps.pdf
58/109
The code of m.file (2)
36.% T vs displacement plot for the nine coordinates37.figure
38.fori=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 coordinates47.figure
48.fori=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.fori=1:9;58. subplot(9,1,i)
59. plot (T_Int,A(i,:))
60. AxeSup=max(A(i,:));
61. AxeInf=min(A(i,:));
62. ifAxeSup-AxeInf
8/10/2019 mechanism all chaps.pdf
59/109
The code of m.file (3)
68.% Determine the positions of the four revolute joints at each iteration69.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.% Animation79.figure
80.fort=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
8/10/2019 mechanism all chaps.pdf
60/109
8/10/2019 mechanism all chaps.pdf
61/109
Determine the displacement
10. [Xtemp,fval] = fsolve(@constrEq4bar,Xinit);
a. functionF=constrEq4bar(X)
b.
c. globalT
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 T61
8/10/2019 mechanism all chaps.pdf
62/109
Determine the velocity14. 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
8/10/2019 mechanism all chaps.pdf
63/109
Determine the acceleration20. 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
8/10/2019 mechanism all chaps.pdf
64/109
Determine next initial positions29. ifIter==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
8/10/2019 mechanism all chaps.pdf
65/109
Plot time response37.figure
38.fori=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.fori=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
8/10/2019 mechanism all chaps.pdf
66/109
Animation69.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.fort=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
8/10/2019 mechanism all chaps.pdf
67/109
Time response of displacement
1x
1
1y
2x
2
2y
3x
3
3y
t
67
8/10/2019 mechanism all chaps.pdf
68/109
Time response of velocity
1x
1
1y
2x
2
2y
3x
3
3y
t
68
8/10/2019 mechanism all chaps.pdf
69/109
8/10/2019 mechanism all chaps.pdf
70/109
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 0300 100 0
300 100 0
100 0
100 0
100 100 100 100 0
x
y
x x
y yx 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
x4
4
2
23
3
3
2
1
1G
70
8/10/2019 mechanism all chaps.pdf
71/109
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,4136,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
8/10/2019 mechanism all chaps.pdf
72/109
The right-side
of the acceleration equations
0
010
sin100
cos100
sin100sin300
cos100cos300
sin200
cos200
0
00
2
22
2
22
2
22
2
33
2
22
2
33
2
33
2
33
414414
2
444144414cos100sin100sin200cos20010where yyxxyyxx
72
8/10/2019 mechanism all chaps.pdf
73/109
Time response of displacement
2x
2
2y
3x
3
3y
4x
4
4y
t
73
8/10/2019 mechanism all chaps.pdf
74/109
Time response of velocity
2x
2
2y
3x
3
3y
4x
4
4y
t
74
8/10/2019 mechanism all chaps.pdf
75/109
Time response of acceleration
2x
2
2y
3x
3
3y
t
4x
4
4y
75
Kinematic Modeling
8/10/2019 mechanism all chaps.pdf
76/109
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
Translation Joint
8/10/2019 mechanism all chaps.pdf
77/109
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
4
1
4
1
4 1 4 1
1
1 1 4 4 1 1 4 4
4
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
a s at o Jo t1
y
1
Bd
c
n
1 1 4
1 1 4
100
100
x c xd
y s y
77
Kinematic Modeling
8/10/2019 mechanism all chaps.pdf
78/109
1 1
2 1
3 1
0.0
0.0
0.0
x
y
Figure Kinematic modeling of a slider-crank mechanism.
Ground
revolute joints4 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
200 cos 0
200 sin 0
300 cos 100 cos 0
300 sin 100 sin 0
100 cos 0
100 sin 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
( 100 cos )( 100sin )
( 100 cos )( 100sin ) 0
0
y y
x x
driving constraint
12 2 5.76 1.2 0t
g
78
8/10/2019 mechanism all chaps.pdf
79/109
Figure The Jacobian matrix.
Jacobian Matrix
79
Contd
8/10/2019 mechanism all chaps.pdf
80/109
30 80
3.2 Solution Technique
8/10/2019 mechanism all chaps.pdf
81/109
( )
( ) 0
( , ) 0d t
q
q
kinematic constraints
driving link
q
velocity equations
( )( ) ( )
0 or 0
0 or 0
q
dd d
q tt
q = qq
q + = q q
( ) ( )
0d d
q
q t
q =
acceleration
( ) ( ) ( ) ( )
0 or ( ) 0
( ) 2 0
q q q
d d d d
q q q qt tt
q
q + q = q q q q q
q q q q
81
Solution Technique
At i i t t
8/10/2019 mechanism all chaps.pdf
82/109
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
dq t
qq = 0
q q =(the right hand side)
( )tq
( )
( , )qd
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 Pl Ri id B d D i
8/10/2019 mechanism all chaps.pdf
83/109
4.1 Planar Rigid Body Dynamics
i i xi
i i yi
i i i
m x f
m y f
n
Miq
i =g
i
0 0
0 0
0 0
x
y
i
m x f
m y f
n
83
Constraint Force
8/10/2019 mechanism all chaps.pdf
84/109
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
M q g g
g
M q g
There exists Lagrange Multipliersuch that is that constraint force.
The equations of motion can be written as
84
Illustration of Constraint Force
8/10/2019 mechanism all chaps.pdf
85/109
0
4 eqs. for 5 unknowns , , , ,
0
constraint 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
Generalized coordinate ,
Constraint eq. 0 0
x
x R y R
8/10/2019 mechanism all chaps.pdf
86/109
2
0
0 0
0 0 1 0
0 0 0 1
10 0 0
21 0 0 0
0 1 0 0 0
T
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 3The 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
4.2 Constraint Force in Revolute Joint
8/10/2019 mechanism all chaps.pdf
87/109
mix
i= f
(x)i
1
miyi= f(y)i 2
m
i
i= n
i (y
i
P y
i)
1+ (x
i
P x
i)
2
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
8/10/2019 mechanism all chaps.pdf
88/109
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 iand j,
the equation of motion for body ican 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
8/10/2019 mechanism all chaps.pdf
89/109
A Matlab Program for
8/10/2019 mechanism all chaps.pdf
90/109
Dynamics of a four-bar linkage
m18.0
m18.0
m26.0
m08.0
OC
BC
AB
OA
A
B
CO
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
g
M t i d t l f t
8/10/2019 mechanism all chaps.pdf
91/109
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
2
sm9.8g
kg18.0
kg26.0kg08.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
J bi t i d
8/10/2019 mechanism all chaps.pdf
92/109
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
Comp tation
8/10/2019 mechanism all chaps.pdf
93/109
Computation
.0velocityand0positioninitialwith0and0for
solvetoisstepfirstthecomputing,numerialIn
1819
8889
89
qqq
g
q
OJ
JM T
.forequationaldifferentithesolvetoisobjectiveThe8889
8999t
T
q
g
q
OJ
JM
.andforstepaboverepeat theto
andtheuseand,0
0Integrate
tt
ttt
tt
q
qqq
q
q
q
.conditionterminaluntilRepeat tt
93
A con enient a ith Matlab sol er
8/10/2019 mechanism all chaps.pdf
94/109
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 s nta for calling sol er in Matlab
8/10/2019 mechanism all chaps.pdf
95/109
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
functiondz=Func4Bar(t,z)
globalL1 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
8/10/2019 mechanism all chaps.pdf
96/109
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
8/10/2019 mechanism all chaps.pdf
97/109
Time response of displacement
1x
1
1y
2x
2
2y
3x
3
3y
t
97
Time response of velocity
8/10/2019 mechanism all chaps.pdf
98/109
Time response of velocity
1x
1
1y
2x
2
2y
3x
3
3y
t
98
Time response of acceleration
8/10/2019 mechanism all chaps.pdf
99/109
Time response of acceleration
1x
1
1y
2x
2
2y
3x
3
3y
t
3
10
99
Time response of
8/10/2019 mechanism all chaps.pdf
100/109
Time response of
1
t
3
10
2
3
4
5
6
7
8
100
8/10/2019 mechanism all chaps.pdf
101/109
Time response of displacement
8/10/2019 mechanism all chaps.pdf
102/109
Time response of displacement
2x
2
2y
3x
3
3y
4x
4
4y
t102
Time response of velocity
8/10/2019 mechanism all chaps.pdf
103/109
Time response of velocity
2x
2
2y
3x
3
3y
4x
4
4y
t103
Time response of acceleration
8/10/2019 mechanism all chaps.pdf
104/109
Time response of acceleration
2x
2
2y
3x
3
3y
t
4x
4
4y
3
10
104
Time response of
8/10/2019 mechanism all chaps.pdf
105/109
Time response of
1
t
3
10
2
3
4
5
6
7
8
9
10
11
105
8/10/2019 mechanism all chaps.pdf
106/109
Time Derivatives of Euler Angles
8/10/2019 mechanism all chaps.pdf
107/109
Time Derivatives of Euler Angles
w
x
( )
= y sinq sin +q cos
w
h( )= y sinq cos q sin
w
z( )= y cosq +
sin sin cos 0
sin cos sin 0
cos 0 1
107
Bryant Angles
8/10/2019 mechanism all chaps.pdf
108/109
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
y g
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
8/10/2019 mechanism all chaps.pdf
109/109
y g
1 3 3 1
2 3 3 2
2 3
cos cos sin 0
cos sin cos 0
sin 0 1