Docsity

Complex Numbers for Planar Kinematics: Helpful Formulas, Study notes of Computer-Aided Analysis of Machine Dynamics

Toggle sidebar
bg1
Complex Numbers for Planar Kinematics
Standard XY Notation Complex Number Notation
rj
ˆ
bi
ˆ
aR
j
erbjaR
222 bar
sinjcos
j
e
a/btan 1j
Expanding:
sinrjcosr
j
reR
cosra
sinrb
direction
j
e,magnituder
Position:
j
reR
Velocity:
j
erj
j
erR
dt
d
2
2
d
t
d
Extension Tangential
Acceleration:
j
er2j
j
er
j
erj
j
erR 2
Extension Tangential Normal Coriolis
Jerk:
j
ej)rr3r3r(
j
e)r3r3r(R 32
Snap:
j
ej)r4r4r6r6r4r(
j
e)rr3r4r12r6r(R 32422
Note:
1. is always measured CCW from positive real axis. and, are positive CCW.
2.
j
e
j
ej (Try it using
j
erbjaR )
Matrix Solution: [A]{x} = {B} {x}=[A]-1 {B}
21122211
1121
1222
1
2221
1211 aaaa]Adet[
aa
aa
]Adet[
1
]A[
aa
aa
]A[
X
Y
Real (Horizontal)
Imaginary
(Vertical)
b
a
r
b
a
r
docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff

Partial preview of the text

Download Complex Numbers for Planar Kinematics: Helpful Formulas and more Study notes Computer-Aided Analysis of Machine Dynamics in PDF only on Docsity!

Complex Numbers for Planar Kinematics

Standard XY Notation Complex Number Notation

  jr 

i b

R a

j R a jb re

2 2 2 r  a b   

cos jsin

j e

tan  b/a j   1

Expanding:   

 rcos jrsin

j R re a  rcos b rsin

direction

j r magnitude, e 

Position:

j R re

Velocity:

j jr e

j R re

dt

d  

2

2

dt

d 

Extension Tangential

Acceleration:

j j 2 r e

j r e

j jr e

j R re

Extension Tangential Normal Coriolis

Jerk:

j (r 3 r 3 r r )je

j R (r 3 r 3 r )e

Snap:

        

j (r 4 r 6 r 6 r 4 r 4 r )je

j R (r 6 r 12 r 4 r 3 r r )e

Note:

  1. is always measured CCW from positive real axis.   

, and are positive CCW.

 j e

j j e (Try it using

j R a jb re )

Matrix Solution: [A]{x} = {B} {x}=[A]

  • {B}

11 22 12 21 21 11

1 22 12

21 22

11 12 det[A] a a a a a a

a a

det[A]

[A]

a a

a a [A ]   

X

Y

Real (Horizontal)

Imaginary

(Vertical)

b

a

r

b

a

r

Complex Number Analysis of Four Bar

Given: constants r 1 r 2 r 3 r 4  and variable 

Find:  3 and  4

Loop Equation: R 2 R 3 R 4 R 1  0

Position: 0

j re

j re

j re

j r e

1 1

4 4

3 3

2 2 

Real Components: r 2 cos 2 r 3 cos 3 r 4 cos 4 r 1 cos 1  0

Imaginary Components: j r 2 sin 2 jr 3 sin 3 jr 4 sin 4 jr 1 sin 1  0

Use Newton-Raphson iterative solution for position.

Given: Position solution and  2 and r 1 r 2 r 3 r 4  1  0

Find:  3 and  4

Velocity: 0

j jr e

j jr e

j j r e^4 4 4

3 3 3

2 2 2

Real Components:  r 2  2 sin 2 r 3  3 sin 3 r 4  4 sin 4  0

Imaginary Components: j r 2  2 cos 2 jr 3  3 cos 3 jr 4  4 cos 4  0

Matrix Notation:

2 2 2

2 2 2

4

3

3 3 4 4

3 3 4 4

r cos

r sin

r cos r cos

rsin r sin

det  J  r 3 r 4 sin^  3 cos 4 cos 3 sin 4 ^ r 3 r 4 sin^  3  4 ^ r 3 r 4 sin

 3 r 2  2 sin 2  4 /r 3 sin 3  4

 4 r 2  2 sin 2  3 /r 4 sin 3  4

Given: Position and velocity solutions and  2

Find:  3

and  4

Acceleration:

j r e

j jr e

j r e

j jr e

j r e

j j r e

(^24) 4 4

4 4 4

(^23) 3 3

3 3 3

(^22) 2 2

2 2 2 

Real: r sin r cos r sin r cos r sin r cos 4 0

2 3 4 4 4 4 4

2 2 3 3 3 3 3

2  2  2  2  2  2              

Imaginary: j r cos jr sin jr cos jr sin jr cos jr sin 4 0

2 3 4 4 4 4 4

2 2 3 3 3 3 3

2 2 ^2  2  2  2              

Matrix:

4

2 3 4 4

2 2 3 3

2 2 2 2 2 2

4

2 3 4 4

2 2 3 3

2 2 2 2 2 2

4

3

3 3 4 4

3 3 4 4

r cos r sin r sin r sin

r sin r cos r cos r cos

r cos r cos

rsin r sin

2 3 4 4 4

2 2 4 3 3

2  3  r 2  2 sin 2  4 r 2  2 cos  r cos  r /rsin 

2 4 4

2 2 3 33

2  4 r 2  2 sin 2  3 r 2  2 cos  r r cos  /rsin 







r

r

r



R

R

R

R

Matrix Notation:

4

4 4

2 4 4 4 4 4 4

2 4 4

3

4 3

2 3 3 3 3 3 3

2 3 3

2

4 2

2 2 2 2 2 2 2

2 2 2 2

4

4 4

2 4 4 4 4 4 4

2 4 4

3

4 3

2 3 3 3 3 3 3

2 3 3

2

4 2

2 2 2 2 2 2 2

2 2 2 2

4

3

3 3 4 4

3 3 4 4

6 r cos r( 4 3 )sin

6 r cos r( 4 3 )sin

r( 6 )cos r( 4 3 )sin

6 r sin r( 4 3 )cos

6 r sin r( 4 3 )cos

r( 6 )sin r( 4 3 )cos

r cos r cos

rsin r sin

Complex Number Analysis of In-Line and Offset Slider Crank

Given: constants r 2 r 3 r 4  =+90°) and variable 

Find:  3 and r (^1)

Loop Equation: R 2 R 3 R 4 R 1  0

Position: 0

j re

j re

j re

j r e

1 1

4 4

3 3

2 2 

Real Components: r 2 cos 2 r 3 cos 3 r 4 cos 4 r 1 cos 1  0

Imaginary Components: j r 2 sin 2 jr 3 sin 3 jr 4 sin 4 jr 1 sin 1  0

Use Newton-Raphson iterative solution for position.

Given: Position solution and  2

and r 2  r 3 r 4  1  4  0

Find:  3

and r 1

Velocity: 0

j r e

j jr e

j j r 2 2 e^233311 

Real Components:  r 2  2 sin 2 r 3  3 sin 3 r 1 cos 1  0

Imaginary Components: j r 2  2 cos 2 jr 3  3 cos 3 jr 1 sin 1  0

Matrix Notation:

2 2 2

2 2 2

1

3

3 3 1

3 3 1

r cos

r sin

r cos sin r

rsin cos

det  J r 3 sin^  3 sinicos 3 cos 1 ^ r 3 cos^  3  1 

 3 r 2  2 cos 2  1 /r 3 cos 3  1

r 1  r 2  2 sin 2  3 /cos 3  1

Given: Position and velocity solutions and  2

Find:  3

and r 1

Acceleration:

j r e

j r e

j jr e

j r e

j j r e

1 1

(^23) 3 3

3 3 3

(^22) 2 2

2 2 2 

Real: r sin r cos r sin r cos 3 r 1 cos 1 0

2 2 3 3 3 3 3

2  2  2  2  2  2          

Imaginary: j r cos jr sin jr cos jr sin 3 jr 1 sin 1 0

2 2 3 3 3 3 3

2 2  2  2  2  2          

Matrix Notation:

3

2 2 3 3

2 2 2 2 2 2

3

2 2 3 3

2 2 2 2 2 2

1

3

3 3 1

3 3 1

r cos r sin r sin

r sin r cos r cos

r cos sin r

rsin cos

2 2 1 3 3

2  3  r 2  2 cos 2  1 r 2  2 sin  r sin  /r cos 

2 3 2 3 3

2 r 1  r 2  2 sin 3  2 r 2  2 cos  r /cos 





r

r

r

R

R

R

R

Complex Number Analysis of Inverted Slider Crank

Given: constants r 1 r 2 and variable 

Find: r 4 and  4

Loop Equation: R 2 R 4 R 1  0

Position: 0

j re

j re

j r e

1 1

4 4

2 2 

Real Components: r 2 cos 2 r 4 cos 4 r 1 cos 1 ^0

Imaginary Components: j r 2 sin 2 jr 4 sin 4 jr 1 sin 1  0

Use Newton-Raphson iterative solution for position.

Given: Position solution and ^2 and r 1  r 2  1  0

Find: r 4 and  4

Velocity: 0

j jr e

j r e

j j r 2 2 e^244444 

Real Components:  r 2  2 sin 2 r 4 cos 4 r 4  4 sin 4  0

Imaginary Components: j r 2  2 cos 2 jr 4 sin 4 jr 4  4 cos 4  0

Matrix Notation:

2 2 2

2 2 2

4

4

4 4 4

4 4 4

r cos

r r sin

sin r cos

cos r sin

2 4

2 det J r 4 cos  sin  r

r 4  r 2  2 sin  2  4   4 r 2  2 cos 2  4  /r 4

Given: Position and velocity solutions and  2

Find: r 4 and  4

Acceleration:

j j 2 r e

j r e

j jr e

j r e

j r e

j j r e^4 4 4

(^24) 4 4

4 4 4

4 4

(^22) 2 2

2 2 2

Real Components:

r sin r cos r cos r sin r cos 4 2 r 4 4 sin 4 0

2 2 4 4 4 4 4 4 4

2  2  2  2  2  2             

Imaginary Components:

j r cos jr sin jr sin jr cos jr sin 4 j 2 r 4 4 cos 4 0

2 2 4 4 4 4 4 4 4

2 2 ^2  2  2  2             

Matrix Notation:

4 4 4 4

2 2 4 4

2 2 2 2 2 2

4 4 4 4

2 2 4 4

2 2 2 2 2 2

4

4

4 4 4

4 4 4

r cos r sin r sin 2 r cos

r r sin r cos r cos 2 r sin

sin r cos

cos rsin

2 2 4 4 4

2 r 4  r 2  2 sin 2  4 r 2  2 cos  r

2  4 r 2  2 cos 2  4 r 2  2 sin   2 r /r

 

r

r

r

R R

R

Given: Position, velocity and acceleration solutions and  2

Find: r^4 and  4

Jerk:

j 3 r e

j j(r r )e

j j( 3 r 3 r )e

j (r 3 r )e

j 3 r e

j j(r r )e

4 4 4 4

(^34) 4 4 4 4

4 4 4 4 4

(^24) 4 4 4

2 2 2 2

(^32) 2 2 2 2

Real Components:

(r r )sin 3 r cos 0

(r r )sin 3 r cos (r 3 r )cos ( 3 r 3 r )sin

4 4 4 4 4

3 4 4 4 4

4 4 4 4 4 4

2 2 2 2 2 2 4 4 4

3 2 2 2 2

Imaginary Components:

j(r r )cos j 3 r sin 0

j(r r )cos j 3 r sin j(r 3 r )sin j( 3 r 3 r )cos

4 4 4 4 4

3 4 4 4 4

4 4 4 4 4 4

2 2 2 2 2 2 4 4 4

3 2 2 2 2

Matrix Notation:

 

  (^) 

4

2 4 4 4 4 4 4

3 2 2 2 2 2 4 4 4 4 4 4

3 2 2 2 2

4

2 4 4 4 4 4 4

3 2 2 2 2 2 4 4 4 4 4 4

3 2 2 2 2

4

4

4 4 4

4 4 4

(r r )cos 3 r sin ( 3 r 3 r r )cos 3 r 3 r sin

(r r )sin 3 r cos ( 3 r 3 r r )sin 3 r 3 r cos

r

sin rcos

cos rsin

Given: Position, velocity, acceleration and jerk solutions and  2

Find:  3 and  4

Snap:

j jr( 6 )e

j r( 4 3 )e

j j( 4 r 6 r 4 r 4 r )e

j (r 6 r 12 r )e

j jr( 6 )e

j r( 4 3 )e

4 4

2 4 4 4

(^44) 4

2 4 4 4 4

(^34) 4 4 4 4 4 4 4 4

4 4 4 4

2 4 4 4

2 2

2 2 2 2

(^42) 2

2 2 2 2 2

Real Components:

r( 4 3 )cos r( 6 )sin 0

(r 6 r 12 r )cos ( 4 r 6 r 4 r 4 r )sin

r( 4 3 )cos r( 6 )sin

4 4

2 4 4 4 4

4 4

2 4 4 4 4

4

3 4 4 4 4 4 4 4 4 4 4 4 4

2 4 4 4

2 2

2 2 2 2 2

4 2

2 2 2 2 2

Imaginary Components:

jr( 4 3 )sin jr( 6 )cos 0

j(r 6 r 12 r )sin j( 4 r 6 r 4 r 4 r )cos

jr( 4 3 )sin jr( 6 )cos

4 4

2 4 4 4 4

4 4

2 4 4 4 4

4

3 4 4 4 4 4 4 4 4 4 4 4 4

2 4 4 4

2 2

2 2 2 2 2

4 2

2 2 2 2 2

-100 -80 -60 -40 -20 0 20 40 60 80 100

0

20

40

60

80

100

120

140

160

180

Theta 2 [deg]

Angle [deg]

Four bar r1=90, r2=30, r3=60, r4=

link 3

link 4

-100 -80 -60 -40 -20 0 20 40 60 80 100

0

2

4

6

8

Theta 2 [deg]

Angular velocity [rad/sec]

Four bar r1=90, r2=30, r3=60, r4=

link 3 complex numbers

link 4 complex numbers

link 3 geometric

link 4 geometric

-100 -80 -60 -40 -20 0 20 40 60 80 100

0

50

100

150

Theta 2 [deg]

Angular acceleration [rad/sec/sec]

Four bar r1=90, r2=30, r3=60, r4=

link 3 complex numbers

link 4 complex numbers

link 3 geometric

link 4 geometric

-100 -80 -60 -40 -20 0 20 40 60 80 100

0

1000

2000

3000

4000

Theta 2 [deg]

Angular jerk [rad/sec/sec/sec]

Four bar r1=90, r2=30, r3=60, r4=

link 3 complex numbers

link 4 complex numbers

link 3 geometric

link 4 geometric

% fourbar_kin.m - four bar kinematics

% geometric and complex number methods % HJSIII, 04.03.

% general constants d2r = pi / 180;

% link lengths and coupler angle

r1 = 90; r2 = 30;

r3 = 60;

r4 = 45;

% crank w2 = -10; % [rad/sec]

a2 = 2; % [rad/sec/sec]

g2 = -0.5; % [rad/sec/sec/sec]

% theta 2 at toggle positions +/- 109 deg th2max = acos( (r1r1 + r2r2 - (r3+r4)*(r3+r4)) /2 /r1 /r2 );

th2max_deg = fix( th2max / d2r ) - 3; th2min_deg = -th2max_deg;

% reduced motion th2min_deg = -90;

th2max_deg = 90; %th2min_deg = -109;

%th2max_deg = 109;

% allocate empty array to hold values

keep_m = []; keep_g = [];

% crank angle

for th2_deg = th2min_deg : 1 : th2max_deg,

%for th2_deg = 65 : 65, th2 = th2_deg * d2r;

% geometric position equations

e = sqrt( r1r1 + r2r2 - 2r1r2cos(th2) ); alpha = asin( r2 * sin(th2) / e ); gamma = acos( ( r3r3 + r4r4 - ee ) /2 /r3 /r4 ); beta = asin( r3 * sin(gamma) / e ); th4 = pi - alpha - beta; th3 = th4 - gamma;

% matrix velocity equations JAC = [ -r3sin(th3) r4sin(th4) ; r3cos(th3) -r4cos(th4) ];

vrhs = [ r2w2sin(th2) ; -r2w2cos(th2) ];

vsol = inv(JAC) * vrhs; w3 = vsol(1); w4 = vsol(2);

% geometric velocity solutions

th2d = w2; ed = r1r2th2dsin(th2) / e; ad = ( r2th2dcos(th2) - edsin(alpha) ) /e /cos(alpha); gd = eed /r3 /r4 /sin(gamma); bd = ( r3gdcos(gamma) - edsin(beta) ) /e / cos(beta); th4d = -ad - bd; th3d = th4d - gd;

% matrix acceleration equations arhs = [ r2a2sin(th2)+r2w2w2cos(th2)+r3w3w3cos(th3)-r4w4w4cos(th4) ; -r2a2cos(th2)+r2w2w2sin(th2)+r3w3w3sin(th3)-r4w4w4sin(th4) ];

asol = inv(JAC) * arhs; a3 = asol(1); a4 = asol(2);

% geometric acceleration solutions

th2dd = a2; edd = ( r1r2(th2dth2dcos(th2) + th2ddsin(th2)) - eded ) / e;

add = ( -r2th2dth2dsin(th2) +r2th2ddcos(th2) - eddsin(alpha) ... -2edadcos(alpha) + eadadsin(alpha) ) /e /cos(alpha); gdd = ( eded +eedd - r3r4gdgdcos(gamma) ) /r3 /r4 /sin(gamma); bdd = ( -r3gdgdsin(gamma) +r3gddcos(gamma) -eddsin(beta) ... -2edbdcos(beta) +ebdbdsin(beta) ) /e / cos(beta); th4dd = -add - bdd; th3dd = th4dd - gdd;

% matrix jerk equations jrhs1 = (r2g2-r2w2w2w2)sin(th2) +3r2w2a2cos(th2) ... -r3w3w3w3sin(th3) +3r3w3a3cos(th3) ... +r4w4w4w4sin(th4) -3r4w4a4*cos(th4) ;

jrhs2 = -(r2g2-r2w2w2w2)cos(th2) +3r2w2a2sin(th2) ... +r3w3w3w3cos(th3) +3r3w3a3sin(th3) ... -r4w4w4w4cos(th4) -3r4w4a4*sin(th4) ; jrhs = [ jrhs1 ; jrhs2 ];

jsol = inv(JAC) * jrhs; g3 = jsol(1); g4 = jsol(2);

% geometric jerk solutions

th2ddd = g2; eddd = ( r1r2(3th2dth2ddcos(th2) -th2dth2dth2dsin(th2) + th2dddsin(th2)) ... -3ededd ) / e; addd = ( -3r2th2dth2ddsin(th2) -r2th2dth2dth2dcos(th2) +r2th2dddcos(th2) ... +3eadaddsin(alpha) +eadadadcos(alpha) ... -3eddadcos(alpha) -3edaddcos(alpha) +3edadadsin(alpha) ... -edddsin(alpha) ) /e /cos(alpha); gddd = ( 3ededd +eeddd - r3r4(3gdgddcos(gamma) -gdgdgdsin(gamma)) ) ... /r3 /r4 /sin(gamma); bddd = ( -3r3gdgddsin(gamma) -r3gdgdgdcos(gamma) +r3gdddcos(gamma) ... -edddsin(beta) -3bdeddcos(beta) -3edbddcos(beta) ... +3edbdbdsin(beta) +3ebdbddsin(beta) +ebdbdbdcos(beta) ) ... /e / cos(beta); th4ddd = -addd - bddd; th3ddd = th4ddd - gddd;

% save for plotting keep_m = [ keep_m ; th2 th3 th4 w3 w4 a3 a4 g3 g4 ]; keep_g = [ keep_g ; th2 th3 th4 th3d th4d th3dd th4dd th3ddd th4ddd ];

end

% create plotting vectors th2_deg = keep_m(:,1) / d2r;

th3_deg = keep_m(:,2) / d2r; th4_deg = keep_m(:,3) / d2r;

w3 = keep_m(:,4); w4 = keep_m(:,5);

a3 = keep_m(:,6); a4 = keep_m(:,7);

g3 = keep_m(:,8);

g4 = keep_m(:,9);

th3d = keep_g(:,4); th4d = keep_g(:,5);

th3dd = keep_g(:,6); th4dd = keep_g(:,7);

th3ddd = keep_g(:,8);

th4ddd = keep_g(:,9);

figure( 1 ) clf plot( th2_deg,th3_deg,'r', th2_deg,th4_deg,'g' ) xlabel( 'Theta 2 [deg]' ) ylabel( 'Angle [deg]' ) legend( 'link 3', 'link 4' ) title( 'Four bar r1=90, r2=30, r3=60, r4=45' )

figure( 2 )

clf plot( th2_deg,w3,'ro', th2_deg,w4,'go', th2_deg,th3d,'b', th2_deg,th4d,'k' ) xlabel( 'Theta 2 [deg]' ) ylabel( 'Angular velocity [rad/sec]' ) legend( 'link 3 complex numbers', 'link 4 complex numbers', ...