Uploaded by gameboy1028

Kinematics Project Final

advertisement
MECH 342
1 of 16
Kinematics Project: A Kinematic Approach to Analyze a Simplified Car Piston
Model
MECH 342 - University of Nebraska
Cody Hora, Kaled Gonzalez, Aleksandar Resnik
5/8/2024
University of Nebraska - Lincoln Department of Mechanical Engineering
MECH 342
2 of 16
Contents
1 Abstract
3
2 Design Background and Assumptions
3
3 Hand-Analysis
4
4 Graphs
9
5 Code
12
University of Nebraska - Lincoln Department of Mechanical Engineering
MECH 342
1
3 of 16
Abstract
The study of kinematics is a critical field of study to analyze and predict motion in machines
to optimize and aid in the design process. This project investigates a simplified car engine piston
including the relative position of the piston head with respect to the origin of the crank, the
linear velocity, the linear acceleration, and the input torque necessary to allow a force from
”inside the engine” to act on the system in consideration with the mass of linkages.
2
Design Background and Assumptions
Car engine pistons are an excellent example of a simple slider crank mechanism which has
one degree of freedom. Grubler’s equation is used in Eq. (2) shows this calculation, using n = 4
(four links, ground, 2, 3, and slider), f1 = 4 (four 1 degree of freedom joints: O2 , A, B angular
and B linear), and f2 = 0.
DOF = 3(n − 1) − 2f1 − f2
(1)
DOF = 3(4 − 1) − 2(4) = 1
(2)
Composed of a crank fixed to a point, a connecting link, and the piston head, the crank drives
motion in the system. A CAD model used for visualization throughout the project is illustrated
in Figure 1. The information of components in the model are detailed in Table 1. Note that
centers of gravity for links were assumed to be halfway along their length as outlined in Figure
2. The simplified schematic in Figure 2 illustrates the model used for analysis purposes using
Component
Link 2
Link 3
Piston Head
m (kg)
1.35
0.52
0.42
L (m)
0.0435
0.136
-
I (kg · m2
0.12
0.000477
-
Table 1: Design Parameters for Analysis
lines for linkages. Note that the angular positions (and thus angles used in all calculations)
are with respect to the rightward horizontal ”X” or real axis. The vertical ”Y” or imaginary
axis is used as well with the origin arbitrarily placed at the fixed point of the crank linkage.
University of Nebraska - Lincoln Department of Mechanical Engineering
MECH 342
4 of 16
Counterclockwise is considered positive for calculations. Right and up are positive along the X
and Y axis respectively.
To simplify analysis, the pressure within the engine is considered constant such that a
constant upwards force of 5N is applied to the bottom of the piston. The crank is assumed
to be rotating at a constant angular velocity of approximately 50 rad/s which is derived from
standard idle rpms measurements for common engines being approximately 500 rpm. The
initial position of the system is such that the crank link is at an angle of 0 degrees from the
rightwards horizontal. Using MATLAB (see appendix for code used), the angular position of
link 3, and the linear position, velocity, and acceleration of the slider, B, with respect to the
angular position of link 2 for a full 360 degree rotation are calculated and plotted in Figures 4,
5, 6, and 7.
3
Hand-Analysis
The analysis for the position where link 2 is at 30 degrees is calculated by hand. Note that
in the following analysis, steps of plugging in values are not shown but implied by writing the
symbolic forms of kinematic components and tracking values that are used in future math.
First, to find the linear position of the slider at point B from the origin (let this be PB )
in Figure 2, the following approach was taken where ”X” is the horizontal distance from the
origin to A.
X = r2 · cos(θ2 )
X
= 106.7654◦
θ3 = 180 − arccos
r3
PB = r2 · sin(θ2 ) + r3 · sin(θ3 ) = 0.1468m
The value calculated matches that of the plot in Figure 5.
Next, the velocity of the slider at this position was calculated as follows. vBx is set equal to
zero as the slider cannot move horizontally due to the ”walls” of the system; thus, the velocity
of B is equal to the y (vertical) component (this same concept is applied to the acceleration
analysis later). Negative angular velocity means it is clockwise as per the aforementioned sign
University of Nebraska - Lincoln Department of Mechanical Engineering
MECH 342
5 of 16
Figure 1: CAD Model
Figure 2: Simplified Schematic
University of Nebraska - Lincoln Department of Mechanical Engineering
MECH 342
6 of 16
convention.
vA = ω2 xr2 = ω2 · r2 cos(θ2 + 90◦ )Iˆ + ω2 · r2 sin(θ2 + 90◦ )Jˆ
vAx = −1.0875m/s
vAy = 1.8836m/s
vBx = vAx + ω3 r3 cos(θ3 + 90◦ ) = 0
ω3 = −8.6966 rad/s
vBy = vAy + ω3 r3 sin(θ3 + 90◦ ) = 2.2112 m/s
Again, this calculated value for the slider velocity matches that for the corresponding point in
Figure 6.
Acceleration was then found. Note that the following work is heavily simplified. For link
2, there is no angular acceleration hence there is no tangential component to the acceleration
of point A but there is a normal component. The generic form for the normal and tangential
ˆ αn · rn cos(θn + 90◦ + ωn2 · rn · cos(θn + 180◦ )
components (converted to rectangular form) are: I:
ˆ n ·rn sin(θn +90◦ )+ω 2 ·rn ·sin(θn +180◦ ). Knowing this and using relative accelerations,
and J:α
n
the following process yields acceleration of point B.
AAx = ω22 · r2 · cos(θ2 + 180◦ ) = −94.1803m/s2
AAy = ω22 · r2 · sin(θ2 + 180◦ ) = −54.3750m/s2
ABx = 0 = AAx + α3 · r3 cos(θ3 + 90◦ ) + ω32 · r3 · cos(θ3 + 180◦ )
α3 = −730.3643 rad/s2
AB = ABy = AAy + α3 · r3 sin(θ3 + 90◦ ) + ω32 · r3 · sin(θ3 + 180◦ )
AB = −36.3182 m/s2
Again, this value matches that in Figure 7.
Finally, for the force analysis, all forces were drawn as shown in Figure 3. The vertical force
of the wall (”link 1”) onto the slider is neglected for matrix purposes.
The force balance equations for the slider are as follows. No force vectors are drawn to scale
and are assumed to be through the center of mass indicated in Figure 3; as such no moments
University of Nebraska - Lincoln Department of Mechanical Engineering
MECH 342
7 of 16
Figure 3: Drawings for Hand Force Analysis
are generated about the center of mass so no equation is written for moment for the slider. The
horizontal forces sum to zero as B has no horizontal acceleration.
X
Fx = F34x + F14x = 0
X
Fy = F34y = mB · AB − FB
Next, the force balance for link 3 are derived as follows. Theta in Figure 3 is simply 180
degrees minus θ3 . The dotted lines indicate the forces exerted by link 3 onto the slider and
link 2 for consistency with matrix math. The acceleration of the link (Ag3 ) is found using the
generic method of acceleration solving, using a length of r3 /2. The symbols, a, b, c, and d are
used to represent the moment arm of the forces exerted and are found in Table 2. For the sake
of brevity, Matlab was used to calculate the effective forces and moments using all of the known
values.
X
Fx = −F32x − F34x = m3 · (α3 · r3 /2 · cos(θ3 + 90◦ ) + ω32 · r3 /2 · cos(θ3 + 180◦ ))
X
Fy = −F32y − F34y = m3 · (α3 · r3 /2 · sin(θ3 + 90◦ ) + ω32 · r3 /2 · sin(θ3 + 180◦ ))
X
M = −F32x · a − F32y · b + F34x · c + F34y · d = I3 α3
a=c
b=d
r3
◦
2 · sin(180 − θ3 )
r3
◦
2 · cos(180 − θ3 )
0.0625 m
0.0188 m
Table 2: Link 3 Values for a, b, c, d
University of Nebraska - Lincoln Department of Mechanical Engineering
MECH 342
8 of 16
The process was then applied to Link 2 according to Figure 3. Note that the acceleration
of the center of gravity is simply half that of point A as the length used for calculation would
simply be half of r2 . The input torque used to counteract the moments on the crank from the
masses of the system is also drawn and is solved for using matrix algebra. Like for link 3, the
symbols, e, f, g, and h are used to represent the moment arm of the forces exerted and are
found in Table 3. The effective moment of the link is zero as the angular acceleration of link 2
is assumed to be zero.
X
Fx = F12x + F32x = m2 · AAx /2
X
Fy = F12y + F32y = m2 · AAy /2
X
M = F12x · e − F12y · f − F32x · g + F32y · h + Tin = 0
e=g
f=h
r2
2 · sin(θ2 )
r2
2 · cos(θ2 )
0.0188 m
0.0109 m
Table 3: Link 2 Values for e, f, g, h
These equations form a system of linear equations. The matrix equation solving for the
forces in left-hand side of the equations above is found below. The acceleration of link 3 is
simplified to be denoted as Ag3 .

0 0

0 0



0 0


0 0



0 0


1 0


0 1


e −f
0
0
1
0
1
0
0
0
1
0
−1
0
−1
0
0
0
−1
0
−1 0
−a −b
c
d
0
1
0
0
0
0
0
1
0
0
0
−g
h
0
0
0

 

0
0 F12x  


 





0 F12y  mB · AB − FB 


 


 





m3 · Ag3x 
0 F32x

 


 





0 F32y   m3 · Ag3y 


=


 

I3 · α3
0 F34x  


 


 

F34y   m2 · AAx /2 
0

 


 


 

0
 F14x   m2 · AAy /2 

 

0
T in
1
(3)
Using Matlab yields an input torque at θ2 of -26.1638 Nm which is clockwise as per the sign
University of Nebraska - Lincoln Department of Mechanical Engineering
MECH 342
9 of 16
convention previously discussed. This, of course, matches the input torque found for the point
in Figure 8.
All hand-derived results, as seen above, are confirmed by the Matlab code using iterations.
4
Graphs
Figure 4: Angular Position
.
University of Nebraska - Lincoln Department of Mechanical Engineering
MECH 342
10 of 16
Figure 5: Linear Position
Figure 6: Linear Velocity
University of Nebraska - Lincoln Department of Mechanical Engineering
MECH 342
11 of 16
Figure 7: Linear Acceleration
Figure 8: Input Torque
University of Nebraska - Lincoln Department of Mechanical Engineering
MECH 342
5
12 of 16
Code
%%% S l i d e r −Crank // Car P i s t o n A n a l y s i s
1
2
3
clc
4
clear
all
5
6
% Symbols
7
syms t 1 t 2 t 3 r 2 r 3 w2 w3 a2 a3 m2 m3 mB f b F12x F12y F32x F32y F34x F34y F14x F14y Tin
I 2 I 3% t 1 i s a n g l e o f s l i d e r motion , t 2 i s crank , t 3 i s c o n n e c t i o n
8
9
% Temp I n p u t s
10
r2 =0.0435;
11
r3 =0.1306;
12
w2=50;
13
a2 =0; %r e m i n d e r t h a t c r a n k i s assumed t o be c o n s t a n t a n g u l a r v e l o c i t y
14
m2= 1 . 3 5 ;
15
m3= 0 . 5 2 ;
16
mB= 0 . 4 2 ;
17
I2 = 0 . 1 2 ;
18
I3 =.000477;
19
fb = 7776;
20
21
22
g = 9 . 8 1 ; %a c c e l e r a t i o n o f g r a v i t y
23
24
t 1 =90;
25
t 2 =0; % s t a r t with t 2 h o r i z o n t a l , f i n d t 3
26
27 %%% Begin o f A n a l y s i s
28
29
f o r i =1:361 % i t e r a t i o n s o f 1 d e g r e e s
30
31
% P o s i t i o n a n a l y s i s ( Theta 3 with r e s p e c t t o Theta 2 )
32
t 3 = 180 − a c o s d ( ( r 2 ∗ c o s d ( t 2 ) ) / r 3 ) ; %i f s t a t e m e n t may be u n n e c e s s a r y
33
34
t h e t a 2 ( i )=t 2 ; % S t o r e t h e a n g l e s i n an a r r a y f o r p l o t t i n g
35
t h e t a 3 ( i )=t 3 ;
36
37
38
% P o s i t i o n A n a l y s i s , P o s i t i o n o f S l i d e r from O r i g i n a s a f u n c t i o n o f Theta 2
pB( i ) = r 2 ∗ s i n d ( t 2 )+r 3 ∗ s i n d ( t 3 ) ;
39
University of Nebraska - Lincoln Department of Mechanical Engineering
MECH 342
40
13 of 16
% V e l o c i t y A n a l y s i s ( A l l with r e s p e c t t o Theta 2 )
41
% Real and I m a g i n a r y (X & Y) o f VA
42
VAx = w2∗ r 2 ∗ c o s d ( t 2 +90) ;
43
VAy = w2∗ r 2 ∗ s i n d ( t 2 +90) ;
44
45
% Real and I m a g i n a r y (X & Y) o f VB
46
VBx = VAx+w3∗ r 3 ∗ c o s d ( t 3 +90) == 0 ; %s l i d e r moves up and down o n l y
47
s o l = s o l v e (VBx, w3 ) ;
48
s o l w 3 = double ( s o l ) ;
49
VBy( i ) = VAy+s o l w 3 ∗ r 3 ∗ s i n d ( t 3 +90) ;
50
51
% A c c e l e r a t i o n A n a l y s i s ( wrt Theta 2 )
52
AAx=w2ˆ2∗ r 2 ∗ c o s d ( t 2 +180) ; % no a2 ∗ r 2 components ( t a n g e n t i a l ) b e c a u s e a2=0
53
AAy=w2ˆ2∗ r 2 ∗ s i n d ( t 2 +180) ;
54
55
% Real and I m a g i n a r y f o r AB
56
% ABx = AAx + ABAnx +ABAtx
57
ABx=AAx + s o l w 3 ˆ2∗ r 3 ∗ c o s d ( t 3 +180)+a3 ∗ r 3 ∗ c o s d ( t 3 +90) == 0 ; %o n l y v e r t i c a l
s l i d e r motion
hence s e t h o r i z o n t a l t o z e r o
58
s o l b = s o l v e (ABx, a3 ) ;
59
s o l a 3 = double ( s o l b ) ;
60
ABy( i ) = AAy + s o l w 3 ˆ2∗ r 3 ∗ s i n d ( t 3 +180)+s o l a 3 ∗ r 3 ∗ s i n d ( t 3 +90) ;
61
62
%A c c e l e r a t i o n f o r ABA
63
ABAx = s o l w 3 ˆ2∗ r 3 ∗ c o s d ( t 3 +180)+a3 ∗ r 3 ∗ c o s d ( t 3 +90) ;
64
ABAy = s o l w 3 ˆ2∗ r 3 ∗ s i n d ( t 3 +180)+s o l a 3 ∗ r 3 ∗ s i n d ( t 3 +90) ;
65
66
% Force A n a l y s i s
67
% Moment arm math
68 %%% Link 3
69
i f t3 <90
70
a = −r 3 /2∗ s i n d ( t 3 ) ;
71
b = r 3 /2∗ c o s d ( t 3 ) ;
72
c = r 3 /2∗ s i n d ( t 3 ) ;
73
d = −r 3 /2∗ c o s d ( t 3 ) ;
74
else
75
a = −r 3 /2∗ s i n d (180 − t 3 ) ;
76
b = −r 3 /2∗ c o s d (180 − t 3 ) ;
77
c = r 3 /2∗ s i n d (180 − t 3 ) ;
78
d = r 3 /2∗ c o s d (180 − t 3 ) ;
79
end
80 %%% Link 2
University of Nebraska - Lincoln Department of Mechanical Engineering
MECH 342
14 of 16
81
i f t2 <90
82
e = r 2 /2∗ s i n d ( t 2 ) ;
83
f = −r 2 /2∗ c o s d ( t 2 ) ;
84
g = −r 2 /2∗ s i n d ( t 2 ) ;
85
h = r 2 /2∗ c o s d ( t 2 ) ;
86
e l s e i f t2 <180
87
e = r 2 /2∗ s i n d (180 − t 2 ) ;
88
f = r 2 /2∗ c o s d (180 − t 2 ) ;
89
g = −e ;
90
h = −f ;
91
e l s e i f t2 <270
92
e = −r 2 /2∗ c o s d (270 − t 2 ) ;
93
f = r 2 /2∗ s i n d (270 − t 2 ) ;
94
g = r 2 /2∗ c o s d (270 − t 2 ) ;
95
h = −r 2 /2∗ s i n d (270 − t 2 ) ;
96
else
97
e = −r 2 /2∗ s i n d (360 − t 2 ) ;
98
f = −r 2 /2∗ c o s d (360 − t 2 ) ;
99
g = r 2 /2∗ s i n d (360 − t 2 ) ;
100
h = r 2 /2∗ c o s d (360 − t 2 ) ;
101
end
102
103
% F o r c e Matrix
104
Fmatrix = [
105
0 0 0 0 1 0 1 0; % Slider x
106
0 0 0 0 0 1 0 0; % Slider y
107
0 0 −1 0 −1 0 0 0 ; % Link 3 x
108
0 0 0 −1 0 −1 0 0 ; % Link 3 y
109
0 0 a b c d 0 0 ; % Link 3 sumM
110
1 0 1 0 0 0 0 0 ; % Link 2 x
111
0 1 0 1 0 0 0 0 ; % Link 2 y
112
e f g h 0 0 0 1 ] ; % Link 2 M
113
% Need t o f i g u r e out why not i n v e r t i b l e
114
FVector = [
115
F12x ;
116
F12y ;
117
F32x ;
118
F32y ;
119
F34x ;
120
F34y ;
121
F14x ;
122
Tin ] ;
University of Nebraska - Lincoln Department of Mechanical Engineering
MECH 342
15 of 16
123
124
SolVector = [
125
0 ; % S l i d e r Fx sum
126
(mB∗ABy( i )−f b ) ; % S l i d e r Fy sum
127
(m3∗ ( s o l w 3 ˆ2∗ r 3 /2∗ c o s d ( t 3 +180)+s o l a 3 ∗ r 3 /2∗ c o s d ( t 3 +90) ) ) ; % Link 3 Fx sum
128
(m3∗ ( s o l w 3 ˆ2∗ r 3 /2∗ s i n d ( t 3 +180)+s o l a 3 ∗ r 3 /2∗ s i n d ( t 3 +90) )+f b ) ; % Link 3 Fy sum
129
I 3 ∗ s o l a 3 ; % Link 3 M sum
130
m2∗ ( w2ˆ2∗ r 2 /2∗ c o s d ( t 2 +180) ) ; % Link 2 Fx sum
131
m2∗ ( w2ˆ2∗ r 2 /2∗ s i n d ( t 2 +180) ) ; % Link 2 Fy sum
132
0 % Link 2 M sum = 0 b e c a u s e a2=0
133
];
134
135
X = Fmatrix \ S o l V e c t o r ;
136
137
Ti ( i )=double (X( end ) ) ;
138
139
140
141
t 2=t 2 +1;
142
end
143
144 %%% P l o t s
145
146
figure (1) % Position %
147
p l o t ( theta2 , theta3 , ’ g ’ )
148
t i t l e ( ’ Angular P o s i t i o n o f Link 3 from t h e H o r i z o n t a l ’ )
149
x l a b e l ( ’ Theta 2 ( d e g r e e s ) ’ )
150
y l a b e l ( ’ Theta 3 ( d e g r e e s ) ’ )
151
x t i c k s ( [ 0 30 60 90 120 150 180 210 240 270 300 330 3 6 0 ] )
152
a x i s ( [ 0 360 0 1 8 0 ] )
153
g r i d on
154
155
figure (2) % Position %
156
p l o t ( t h e t a 2 , pB , ’ g ’ )
157
t i t l e ( ’ L i n e a r P o s i t i o n o f B from t h e O r i g i n ’ )
158
x l a b e l ( ’ Theta 2 ( d e g r e e s ) ’ )
159
y l a b e l ( ’ L i n e a r P o s i t i o n o f B (m) ’ )
160
x t i c k s ( [ 0 30 60 90 120 150 180 210 240 270 300 330 3 6 0 ] )
161
a x i s ( [ 0 360 0 0 . 5 ] )
162
g r i d on
163
164
figure (3) % Velocity %
University of Nebraska - Lincoln Department of Mechanical Engineering
MECH 342
16 of 16
165
p l o t ( t h e t a 2 , VBy, ’ b ’ )
166
t i t l e ( ’ Velocity of B’ )
167
x l a b e l ( ’ Theta 2 ( d e g r e e s ) ’ )
168
y l a b e l ( ’ V B (m/ s ) ’ )
169
x t i c k s ( [ 0 30 60 90 120 150 180 210 240 270 300 330 3 6 0 ] )
170
a x i s ( [ 0 360 −3 3 ] )
171
g r i d on
172
173
figure (4) % Acceleration %
174
p l o t ( t h e t a 2 , ABy, ’ r ’ )
175
t i t l e ( ’ Acceleration of B’ )
176
x l a b e l ( ’ Theta 2 ( d e g r e e s ) ’ )
177
y l a b e l ( ’ A B (m/ s ˆ 2 ) ’ )
178
x t i c k s ( [ 0 30 60 90 120 150 180 210 240 270 300 330 3 6 0 ] )
179
a x i s ( [ 0 360 −150 8 0 ] )
180
g r i d on
181
182
f i g u r e ( 5 ) % Tin %
183
p l o t ( t h e t a 2 , Ti , ’ b ’ )
184
t i t l e ( ’ I n p u t Torque on Link 2 ’ )
185
x l a b e l ( ’ Theta 2 ( d e g r e e s ) ’ )
186
y l a b e l ( ’ Tin (Nm) ’ )
187
x t i c k s ( [ 0 30 60 90 120 150 180 210 240 270 300 330 3 6 0 ] )
188
a x i s ( [ 0 360 −50 5 0 ] )
189
g r i d on
University of Nebraska - Lincoln Department of Mechanical Engineering
Download