Professional Documents
Culture Documents
:= o 0.6315 =
ANS (c)
o ln x1_over_x2 ( )
or
x1_over_x2 exp o ( ) :=
(that is, e
o
)
x1_over_x2 1.88 =
ANS (d)
Spring - mass - damper system
m 17.5 :=
kg
k 70 :=
N / cm
c 0.7 :=
N / cm / s
k k 100 := k 7000 =
N / m
c c 100 := c 70 =
N / m / s or N-s / m
(a) . Damping ratio or factor
c
c
c
:= 0.1 =
Damping ratio or factor
Proceedings of the 2008 ASEE North Midwest Sectional Conference
EXAMPLE 2
Stable Inverted Pendulum: Use of differential equation solver and graphs
1
m
m
2
k
l
For k = 158.46, the response is stable. If you changed k to 55, as an example, you will find
unstable response.
Note : y axis
is radians.
Verify by IC.
0 0.450.91.351.82.252.73.15 3.64.05 4.5
0.4
0.2
0
0.2
0.4
u t ( )
t
t 0 0.001 , 4.5 .. :=
Right Clicked on Odesolve and chose Adaptive rather than
fixed because output otherwise had numerical errors of
slight damping type response decay for some value trials (not
for the ones chosen finally here, so fixed would still be ok)
although there is no damping. Adaptive choice fixed it !
u Odesolve t 4.5 , ( ) :=
u' 0 ( ) 0 u 0 ( ) 0.3
1
3
m
1
m
2
+
|
\
|
|
.
l
2
u'' t ( ) k l
2
m
1
g
l
2
m
2
g l +
|
\
|
|
.
(
(
u t ( ) + 0
Given
t 2.3433 = t
1
f
:=
f 0.4267 = f
e
n
2 t
:= e
n
2.6813 = e
n
k l
2
m
1
g
l
2
m
2
g l +
|
\
|
|
.
1
3
m
1
m
2
+
|
\
|
|
.
l
2
:=
k 158.46 := l 0.5 := m
2
5 := m
1
2 := g 9.81 :=
Inverted Pendulum (Stable)
Proceedings of the 2008 ASEE North Midwest Sectional Conference
Example 3
Single-Plane Balancing
x11 x11 x1 := x11 1.197 =
y11 y11 y1 := y11 5.221 = Alone x11
2
y11
2
+ := Alone 5.356 =
r1
x1 x11 y1 y11 ( )
2
x1 y11 y1 x11 ( )
2
+
x11
2
y11
2
+
:= r1 0.597 =
BWphi1 atan2 x1 x11 y1 y11 x1 y11 y1 x11 , ( ) := BWphi1 1.869 = BWphi1 107.09deg =
BALANCING SOLUTION:
BWphi1 107.09deg = BW_New_phi1 BWphi1 TW1_Angle + := BW_New_phi1 250.09deg =
BWmag1 r1 TW1 := BWmag1 1.494 =
ENTER INITIAL VIBRATION AMP AND PHASE IN THE PLANE BELOW
z1 3.2 := ph1 30 deg :=
x1 z1 cos ph1 ( ) := x1 2.771 =
y1 z1 sin ph1 ( ) := y1 1.6 =
ENTER TRIAL WEIGHT AT THE REFERENCE LINE ON THE PLANE:
TW1 2.5 :=
ENTER TRIAL WEIGHT ANGLE FROM REFERENCE LINE:
TW1_Angle 143 deg :=
ENTER VIBRATION AMP AND PHASE IN THE PLANE DUE TO TW1 BELOW:
z11 7 := ph11 77 deg :=
x11 z11 cos ph11 ( ) := x11 1.575 =
y11 z11 sin ph11 ( ) := y11 6.821 =
Proceedings of the 2008 ASEE North Midwest Sectional Conference
Example 4
Fast Fourier Transform
k 9 :=
k = Total number of samples of the waveform
m 2
k
:=
m 512 =
m = Number of data points in sample
FFT requires an array with 2
k
elements.
t 10
3
:=
t = sampling interval = 0.001
i 0 m 1 .. :=
t
i
i t :=
time (sec)
For example, t
0
= 0, t
1
= 0.001
t
2
= 0.002.
t
m 1
0.511 =
Total sampling time (sec) = t * (m-1) = 0.001 * (512-1) = 0.001*511 = 0.511 sec
v1 100 :=
v2 110 :=
y
i
sin 2 t v1 t
i
( )
cos 2 t v2 t
i
( )
+ :=
Graph of waveform y vs t
0 0.1 0.2 0.3 0.4 0.5 0.6
5
0
5
y
i
t
i
j 0
m
2
.. :=
f
j
j
t
m 1
:=
Frequency , cps
Y FFT y ( ) :=
Fourier Transform of y: Frequency spectrum of waveform graphed as amplitude vs frequency
0 100 200 300 400 500 600
0
0.5
Y
j
f
j