20
1 ME313 Homework #6 State Space Representation Last Updated September 26, 2016. From the homework problems on the following pages, 5.1, 5.2, 5.6, 5.7.

State Space Representation - University of Idahoanderson/me_313/ME313HW6Fall16.… · 1-x 2 versus time, and the force of the seatbelt on the occupant versus time. Include a printout

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: State Space Representation - University of Idahoanderson/me_313/ME313HW6Fall16.… · 1-x 2 versus time, and the force of the seatbelt on the occupant versus time. Include a printout

1

ME313 Homework #6

State Space Representation

Last Updated September 26, 2016.

From the homework problems on the following pages, 5.1, 5.2, 5.6, 5.7.

Page 2: State Space Representation - University of Idahoanderson/me_313/ME313HW6Fall16.… · 1-x 2 versus time, and the force of the seatbelt on the occupant versus time. Include a printout

120

5.6 Chapter 5 Homework Problems

5.6.1 Simulation of Linear and Nonlinear Models (Sections 5.1-5.4)

5.1 Consider an automobile travelling on level and sloped ground shown below. The

automobile starts from rest on a horixontal path at x=0. After travelling some

distance, it enters the slope inclined at the angle . After reaching the top of the

slope, it again travels on a horizontal path. Be aware that the coordinate x(t)

represents the distance along the path.

a. Given that the automobile is driven forward by a force F that is always parallel

to the ground, show that a model for the automobile is

,)(sin xmxcxWF

where the damping coefficient c models the total frictional force on the

automobile. In the model (x)=0 on the horizontal segments, and (x)= is a

constant on the slope.

b. The weight of the automobile is 3000 lb, the damping coefficient c is c=50

lbs/ft, the inclination of the slope segment is =3o, and the force F is F=350

lb. Given that the slope begins at a distance of x=100 ft, and ends at a distance

of x=400 ft, simulate the model over the time range 0t30 sec. You may

assume that the automobile begins the simulation from rest. Plot the distance

x and velocity x versus time. If the weight of the automobile is 3500 lb, and

the damping coefficient is c=20 lbs/ft, you should get the results shown in

the code check shown on the following page.

P 5.1

(x)

x=0

x F

Page 3: State Space Representation - University of Idahoanderson/me_313/ME313HW6Fall16.… · 1-x 2 versus time, and the force of the seatbelt on the occupant versus time. Include a printout

121

0 50 100 150 2000

1000

2000

3000

4000Path Displacement (ft)

Dis

pla

cem

en

t (f

t)

Time (sec)

0 50 100 150 2000

5

10

15Velocity

Velo

cit

y (

Mp

h)

Time (sec)

Code Check for part b of Problem 5.1

Page 4: State Space Representation - University of Idahoanderson/me_313/ME313HW6Fall16.… · 1-x 2 versus time, and the force of the seatbelt on the occupant versus time. Include a printout

122

5.2 Consider again the example rotational system modelled in Section 2.4. The input

is a specified rotational motion (t) of the left end of the flexible shaft of stiffness

kT.

a. Show that a simplified model of the system can be derived as

).(22

tr

kx

r

kkxcx

r

Im TT

b. Given that m=3 kg, I=3kgm2, r=10 cm, kT=5Nm, k=50 N/m and c=100 Ns/m,

simulate the system over the time range 0t50 sec, using initial conditions

of 0)0( x m and 0)0( x m/s. Over this time range, the specified rotational

motion will be (t)=45o (0.785 rad) for 0t5 sec, and (t)=-30o (0.5624 rad)

for t> 5 sec. As a check on your code, you should obtain the plot shown below

when k=20 N/m and c=200 Ns/m.

Page 5: State Space Representation - University of Idahoanderson/me_313/ME313HW6Fall16.… · 1-x 2 versus time, and the force of the seatbelt on the occupant versus time. Include a printout

123

5.3 Consider the translational

mechanical model shown at the

right. The mass m1 is coupled to

ground with the spring k and

damper c1, and is coupled to mass

m2 by the damper c2. A specified

force F(t) is applied to mass m1.

a. Derive the equations of motion for the masses m1 and m2.

b. Place the model in general state space format.

x1 x1=0,+

k

m1

x2 x2=0,+

m2

c2

F(t)c1

P 5.3

0 10 20 30 40 50-0.1

0

0.1

0.2

0.3

Time (sec)

x (

m)

0 10 20 30 40 50-0.2

-0.1

0

0.1

0.2

Time (sec)

xd

(m

/sec)

Code Check for part b of Problem 5.2

Page 6: State Space Representation - University of Idahoanderson/me_313/ME313HW6Fall16.… · 1-x 2 versus time, and the force of the seatbelt on the occupant versus time. Include a printout

124

c. Using k=5 kN/m, c1=50 Ns/m, m1=4 kg, c2=5 Ns/m, m2=2kg, and initial

conditions of x1(0)=0.1 m, x2=0 m, 0)0()0(1 xx m/s, simulate the system

over the time range 0≤t≤2 sec with F(t)=0. After your simulation, plot the

displacements x1(t) and x2(t) of the masses m1 and m2 versus time. As a

code check, with k=10 kN/m, your results will look like the plots shown

below.

d. Using the same parameters as in part c, excepting initial conditions of

x1(0)=x2(0)=0m, 0)0()0( 21 xx , and a specified force of

F(t)=200sin(10t)N for 0≤t≤2/10 sec, F(t)=0N for t>2/10 sec, repeat the

simulation. After your simulation, plot the displacements x1(t) and x2(t) of

the masses m1 and m2 versus time. e. Using the same parameters as in part

c, excepting initial conditions of x1(0)=x2(0)=0m, 0)0()0( 21 xx , and a

specified force of F(t)=200N for 0≤t≤/10 sec, F(t)=-200N for

/10≤t≤2/10 sec. After your simulation, plot the displacements x1(t) and

x2(t) of the masses m1 and m2 versus time.

5.4 Consider the simulation of the circuit modeled in Section 3.2.3. It is shown in

Figure 3.8. A model for the circuit (3.26,3.27) was shown to be

,

1

,

2

2

21

2

21

2

1

2

1

1

dt

dV

RL

VV

L

VV

dt

VdC

L

VV

L

where V(t) was a specified applied voltage, and V1(t), V2(t) were the voltages at

the nodes shown in Figure 3.8.

Code check for part c of Problem 5.3

0 0.5 1 1.5 2-0.1

-0.05

0

0.05

0.1

Time (sec)

x1 (

m)

0 0.5 1 1.5 2-0.1

-0.05

0

Time (sec)

x2 (

m)

Page 7: State Space Representation - University of Idahoanderson/me_313/ME313HW6Fall16.… · 1-x 2 versus time, and the force of the seatbelt on the occupant versus time. Include a printout

125

a. Place the model in general state space format.

b. Using L1=3.5mH, L2=1.3mH, C=53F, RL=8, simulate the circuit with

V(t)=0 and initial conditions of V1(0)=1V, V2(0)=0V, and 0)0(1 V V/s over

the time range 0≤t≤10ms. After your simulation, plot V1(t) and V2(t) versus

time. To check your code, when RL=16, your simulation should look like

the plots shown below.

c. Using the same parameter values as in part b, simulate the circuit using the

initial conditions V1(0)=V2(0)=0V, 0)0(1 V V/s and a specified voltage of

V(t)=1V for t>0.

d. Using the same parameters as in part b, simulate the circuit using the initial

conditions V1(0)=1V, V2(0)=0V, and 0)0(1 V V/s and a specified voltage

of V(t)=1V for 2≤t≤4ms, and V(t)=0 elsewhere. After your simulation, plot

V1(t) and V2(t) versus time.

5.5 Consider the simulation of the electromechanical system modeled in

Section 3.5.1. The system is shown in Figure 3.13. A model for this system

was derived to be

,111

,1

,)(

3

2

3

1

2

1

33

12

2

2

11

3

1

2

1

2

1

1

xIr

mr

rx

rk

rxc

Ir

rIIx

rr

rk

r

riK

Kdt

diLRitV

T

aTt

b

Code check for part b of Problem 5.4

0 2 4 6 8 10-1

-0.5

0

0.5

1

Time (ms)

V1 (

Vo

lts)

0 2 4 6 8 10-1

-0.5

0

0.5

1

Time (ms)

V2 (

Vo

lts)

Page 8: State Space Representation - University of Idahoanderson/me_313/ME313HW6Fall16.… · 1-x 2 versus time, and the force of the seatbelt on the occupant versus time. Include a printout

126

where V(t) was the specified voltage applied to the permanent magnet

electric motor, 1(t) was the angular displacement of the armature, and x(t)

was the displacement of the rack.

a. Place the model in general state space format.

b. Using R=20, Kt=0.5 Nm/A, Kb=0.5 Vs, L=20mH, Ia=0.05kgm2,

I1=0.075kgm2, I2=0.1kgm2, I3=0.75kgm2, m=2kg, r1=0.05m, r2=0.15m,

r3=0.1m, kT=25Nm, c=40Ns/m, and initial conditions of x(0)=0 m, 0)0( x

m/s, 1(0)=0rad, 0)0(1 rad/sec, and i(0)=0A, simulate the system over

the time range 0≤t≤10sec. The voltage supplied to the motor is to be

V(t)=10V for t<2s, and V(t)=0 for t>2s. After the simulation, plot x(t), 1(t),

and i(t) versus time. To check your code, when r1=0.01m, your simulation

should look like the plots shown on the next page.

c. After your simulation from part b, plot the internal force F1(t), and the

angular displacement 2(t) versus time.

Code check for part b of Problem 5.5

0 5 10 15 20 25 300

0.5

Time (sec)x (

m)

0 5 10 15 20 25 300

2000

4000

Time (sec)

1 (

deg

)

0 5 10 15 20 25 30-0.5

0

0.5

Time (sec)

i (A

mp

s)

Page 9: State Space Representation - University of Idahoanderson/me_313/ME313HW6Fall16.… · 1-x 2 versus time, and the force of the seatbelt on the occupant versus time. Include a printout

127

5.6 Consider the simplified model of a

vehicle, bumper, and seat-belted

passenger shown at the right. The

vehicle is modeled by the mass m1,

the bumper is modeled by the spring

k1 and damper c1, the occupant is

modeled by the mass m2, and the

seat belt is modeled by the spring k2

and damper c2. Your objective is

to simulate the collision of the car

with the vertical wall. This is

performed by assuming that the

inertial displacements x1 and x2 are

zero at the instant of impact.

Assume that the speed of the

vehicle is 6 mph to the left at the instant of collision. Note that the simulation

will be valid if the displacement x1 remains such that -1<x1<0 ft. The car and

occupant weigh 3000 lb and 150 lb respectively.

a. Derive the equations of motion for m1 and m2.

b. Place the model in general state space format, and ABCD state space format.

For the ABCD format, identify two {C} matrices, one for an output y(t)

defined as the relative distance between the car and occupant, and the other

for an output y(t) being the force of the seatbelt on the occupant. For this

problem, what is the input u(t) for the system?

c. Specify the proper initial conditions that will simulate the collision of the

car and occupant with the wall.

d. Simulate the collision over a time interval of 0.5 sec. In your simulation,

plot the displacements x1 and x2 versus time, the relative displacement y=x1-

x2 versus time, and the force of the seatbelt on the occupant versus time.

Include a printout of the Matlab code that you used for the simulation. For

your simulation, use the following parameter values: k1=5 klb/ft, c1=500

lbs/ft, k2=3 klb/ft, c2=20 lbs/ft. To check your code, a simulation using

k1=10 klb/ft, c1=500 lbs/ft, k2=5 klb/ft, c2=50 lbs/ft is shown below.

x2 x2=0, +

x1

k2

m2

c2 k1

m1

c1

x1=0, + 1 foot, t=0

P 5.4

Page 10: State Space Representation - University of Idahoanderson/me_313/ME313HW6Fall16.… · 1-x 2 versus time, and the force of the seatbelt on the occupant versus time. Include a printout

128

e. What is the maximum relative displacement between car and occupant, and

the maximum force exerted by the seat belt on the occupant?

5.7 Consider a mass-spring damper, similar to that discussed in Section 2.2.2. Only

now, the spring will be nonlinear. In this case, the model for the spring is

.3xkxFk

This form of a spring is known as a softening spring. Given this model for the

spring, Newton’s 2nd law for the mass-spring-damper becomes

,cos3 tFxkxxcxm

Code check for part d of Problem 5.6

0 0.1 0.2 0.3 0.4 0.5

-10

0

10

Inertial Coordinates of Car and Occupant

Dis

pla

cem

en

t (i

n)

x1

x2

0 0.1 0.2 0.3 0.4 0.5

0

0.5

1

Relative Displacement Between Car and Occupant

Dis

pla

cem

en

t (i

n)

0 0.1 0.2 0.3 0.4 0.5-200

0

200

400

Force of Seat-Belt on Occupant, Max Force On Occupant=505.4997 lb

Fo

rce (

lb)

Time (sec)

Page 11: State Space Representation - University of Idahoanderson/me_313/ME313HW6Fall16.… · 1-x 2 versus time, and the force of the seatbelt on the occupant versus time. Include a printout

129

where m, c, k are the mass, damping coefficient and stiffness, and F, are the amplitude

and frequency of an applied harmonic force. The model for this mass-spring-damper is

known as one version of a Duffing oscillator.

a. Given that m=2 kg, c=2 Ns/m, k=20 N/m, =10 N/m3, and F=0 N, simulate

the system over the time range 0t30 sec using initial conditions 1.1)0( x

m and 0)0( x m/s. After your simulation, plot )(tx and )(tx versus time t.

As a code check, when c=4 Ns/m, you should obtain the result shown below.

b. Repeat part a, only now use initial conditions of 3)0( x m and 8)0( x

m/s, and a time range of 0t0.45 sec. What do you think will happen if the

time range is extended past 0.45 sec?

c. Now simulate the system over the same time range with F= 3N, =5.24

rad/sec when t6 sec and F=0 N for t>6 sec, and initial conditions of 0)0( x

m and 0)0( x m/s.

0 5 10 15 20 25 30-1.5

-1

-0.5

0

0.5

Time (sec)

q1

Code Check: c=4, q1(0)=-1.1, q

2(0)=0

0 5 10 15 20 25 30-1

0

1

2

Time (sec)

q2

Code check for part a of Problem 5.??

Page 12: State Space Representation - University of Idahoanderson/me_313/ME313HW6Fall16.… · 1-x 2 versus time, and the force of the seatbelt on the occupant versus time. Include a printout

130

5.8 Consider the spring-loaded wheel described in Problem 2.31. It was claimed in

the problem statement that a model for the motion of the wheel could be derived

as

,

1sin/2/1cos)(

2

2

IdRdRd

l

R

dkRctT o

T

where T(t) is a specified torque applied to the wheel.

a. Place the system model in general state space format.

b. For R=0.25m d=0.5m, I=1 kgm2, cT=1 Nms, lo=0.4 m, k= 100 N/m, initial

conditions 0)0(,59.37)0( o , and T(t)=5 Nm for t<1sec, and T(t)=0

for t>1 sec, simulate the system over the time range 0t10 sec. After your

simulation, plot the angular position and angular velocity of the wheel

versus time. To check your code, when k=150 N/m, your code should

provide a simulation like that shown below.

c. Repeat the preceding simulation, only now, with and T(t)=10 Nm for

t<1sec, and T(t)=0 for t>1 sec.

Code check for part b of Problem 5.5

0 2 4 6 8 10-100

-50

0

50

Time (sec)

Th

eta

(d

eg

)

T=5 Nm for 1 Sec

0 2 4 6 8 10-100

-50

0

50

100

Time (sec)

Th

eta

Do

t (d

eg

/sec)

Page 13: State Space Representation - University of Idahoanderson/me_313/ME313HW6Fall16.… · 1-x 2 versus time, and the force of the seatbelt on the occupant versus time. Include a printout

131

5.9 A small gantry

crane is used to

move parts. A

diagram of the

crane is shown at

the right. The part

of weight 20 lb and

mass m is

suspended from

the gantry by a

cable of length l=2

ft. The horizontal

displacement of

the gantry is x, and

the angular rotation of the mass m relative to vertical is as shown. It is assumed

that the mass of the gantry is negligible, and the horizontal acceleration xta )(

is specified. Using the methodology discussed in Section 2.5.1 to model the

inverted pendulum, the dynamic model for the angular movement of the mass m

is

,cos)(sin mltamglcI To

where Io=ml2 is the moment of inertia of the mass about the pivot point on the

gantry, and cT=3 lbs models rotational friction of angular motion.

a. An engineer wishes to move the part to the right. To achieve this motion,

the engineer specifies the following acceleration of the gantry, a(t)=5 ft/s2,

t<1 sec, a(t)=0 ft/s2, t>1 sec. Simulate the angular movement of the mass

m using initial conditions of zero angular displacement and velocity .

Plot the angular displacement and angular velocity over the time range

0t10 sec for this maneuver. To check your code, when the part m weighs

10 lb, your simulation should give the results shown ??.

b. At t=1 sec and t=10 sec, how far has the gantry travelled, and what is the

velocity of the gantry? Hint: a simulation is not required, you may use

elementary kinematics to answer this question.

c. Repeat part a, with the acceleration at the start of the time interval, only

now, include a deceleration a(t)=-5 ft/s2 in the interval 8.5<t<9.5 sec. And,

perform your simulation over the time range 0t15 sec.

d. At t=1 sec and t=9.5 sec, how far has the gantry travelled, and what is the

velocity of the gantry? Hint: a simulation is not required, you may use

elementary kinematics to answer this question.

x

P 5.9

Page 14: State Space Representation - University of Idahoanderson/me_313/ME313HW6Fall16.… · 1-x 2 versus time, and the force of the seatbelt on the occupant versus time. Include a printout

132

5.10 Consider the moving-pivot inverted pendulum considered in Section 2.5.2. A

diagram of the moving-pivot inverted pendulum is shown in Figure 2.32. In

Section 2.5.2, a model (2.81, 2.82)

.)(cossin

,cossin

2 xMtFxcllxm

lxmIcmgl OT

was derived. In this model, (t) was the angular displacement of the stick, and

x(t) was the horizontal displacement of the cart. A gneral state-space

representation (4.41-4.44) for the moving-pivot inverted pendulum was derived

in Section 4.2.1 to be

.cos

)(sincossin

,

,cos

)(sinsincos

3

22

23

2

4343

4

43

3

22

23

2

4433

2

,21

qmlImM

tFcqqmlqqmlqcqmglmMq

qq

qmlImM

tFcqqmlqIqcqmglqmlq

qq

o

T

o

oT

where the state assignments were xq 1 , xq 2 , 3q , and 4q . Simulate

the system over a time range of using parameter values of m=2 kg, l=1 m, cT=1.5

Nms, Io=3 kgm2, M=5 kg and c=1 Ns/m. For your simulation, use initial

conditions of 0t20 sec, initial conditions of q1(0)=0 m, q2(0)=0 m/s, q3(0)=0

rad, q4(0)=0 rad/sec, and a force F(t) on the cart as F(t)=0, t<1 sec, F(t)=10 N,

Code check for part a of Problem 5.9

0 2 4 6 8 10-20

0

20 Accel Time=1 sec, Accel Dist=2.5 ft, Vel After Accel=5 ft/sec

Time (sec)

An

g D

isp

(d

eg

)0 2 4 6 8 10

-50

0

50

Time (sec)

An

g V

el (d

eg

/sec)

0 2 4 6 8 100

50

Time (sec)

Gan

try P

os (

m)

Page 15: State Space Representation - University of Idahoanderson/me_313/ME313HW6Fall16.… · 1-x 2 versus time, and the force of the seatbelt on the occupant versus time. Include a printout

133

1t2 sec, and F(t)=0 for t>2 sec. After your simiultion, plot F(t), q1(t), q2(t),

q3(t), and q4(t) versus time. As a code check, if l=2 m and M=7 kg, you should

obtain the results shown below.

0 2 4 6 8 10 12 14 16 18 200

5

10

Time (sec)

F (

N)

0 2 4 6 8 10 12 14 16 18 200

5

10

Time (sec)

q1 (

m)

0 2 4 6 8 10 12 14 16 18 20-4

-2

0

2

4

Time (sec)

q2 (

m/s

ec)

0 2 4 6 8 10 12 14 16 18 20

-200

0

200

Time (sec)

q3 (

deg)

0 2 4 6 8 10 12 14 16 18 20

-500

0

500

Time (sec)

q4 (

deg/s

ec)

Code check for Problem 5.10

Page 16: State Space Representation - University of Idahoanderson/me_313/ME313HW6Fall16.… · 1-x 2 versus time, and the force of the seatbelt on the occupant versus time. Include a printout

134

5.11 Consider the two masses m1

and m2 coupled by the three

springs k1, k2, and k3 as

shown at the right. The

system is viewed from

above, and the movement of

masses m1 and m2 as occurs

on a frictionless horizontal

plan. The specified forces

Fx1(t), Fy1(t) and Fx2(t), Fy2(t)

can act on the masses m1 and

m2 respectively. Part a

shows the system in the

position of static

equilibrium, and part b

shows the system when the

masses have moved

distances x1, y1 and x2, y2 from the position of static equilibrium. The forces

exerted by the springs of stiffness k1, k2, and k3 exert forces on the masses m1 and

m2 along the lines oriented by the angles 1, 2, and 3 respectively, measured

counter-clockwise positive. It is assumed that the springs are neither extended or

compressed when at the length x in the position of static equilibrium.

A model for the system can be derived by writing Newton’s second law for the

translation of each mass in the x- and y-directions. The instantaneous lengths l1,

l2, and l3 of the springs of stiffnesses k1, k2 and k3 are calculated to be

.

,,

2

2

2

23

2

12

2

212

2

1

2

11

yxxl

yyxxxlyxxl

Then, the scalar force Fk1, Fk2, and Fk3 exerted by the springs of stiffnesses k1, k2,

and k3 are

.,, 331222111 xlkFxlkFxlkF kkk

The forces Fk1, Fk2, and Fk3 act in the x and y directions oriented by the angles 1,

2, and 3 respectively. From the geometry of part b of Figure 5.7, the cosine and

sine of angles 1, 2, and 3 are observed to be

.0

sin,cos

,sin,cos

,sin,cos

3

23

3

23

1

122

2

212

1

11

1

21

l

y

l

xx

l

yy

l

xxx

l

y

l

xx

k1 k2 k3

m1 m2

y1

y2

2

x2 x1 1

3

Fy1

Fx1 Fx2

Fy2

P 5.7

Page 17: State Space Representation - University of Idahoanderson/me_313/ME313HW6Fall16.… · 1-x 2 versus time, and the force of the seatbelt on the occupant versus time. Include a printout

135

Newton’s second law for translation of each mass in the x- and y-directions are

.sinsin,coscos

,sinsin,coscos

332223332222

221111221111

kkkk

kkkk

FFymFFxm

FFymFFxm

a. Simulate the system with m1=m2=1kg, k1=k2=k3=20N/m, x=0.5m,

Fx1(t)=Fy1(t)=Fx2(t)=Fy2(t)=0, and initial conditions x1(0)=x2(0)=0m,

0)0()0( 21 xx m/s, y1(0)=0.1m, y2(0)=-0.5m, 0)0()0( 21 yy m/s over

the time range 0≤t≤20 sec. After your simulation, plot x1(t), x2(t), y1(t) and

y2(t) versus time. To check your code, when k1=k2=k3=40N/m, your plots

should look like those shown below.

b. Repeat part a, only now use the initial condition x1(0)=0.1m, and the

remaining initial displacements and velocities zero.

c. Repeat part a, only now use zero initial displacements and velocities,

Fy1(t)=1N for 0≤t≤1sec, Fy1(t)=0 for t>1, and Fx1(t)=Fx2(t)=Fy2(t)=0.

0 10 20-0.01

0

0.01

0.02

Time (s)

x1 (

m)

0 10 20-0.1

-0.05

0

0.05

0.1

Time (s)

y 1 (

m)

0 10 20-0.02

-0.01

0

0.01

Time (s)

x2 (

m)

0 10 20-0.1

-0.05

0

0.05

0.1

Time (s)

y 2 (

m)

Code check for part a of Problem 5.11

Page 18: State Space Representation - University of Idahoanderson/me_313/ME313HW6Fall16.… · 1-x 2 versus time, and the force of the seatbelt on the occupant versus time. Include a printout

136

5.6.2 Presentation of Simulation in Phase Plane (Sections 5.5-5.6)

5.12 Consider again the spring-loaded wheel considered in Problem 5.8, only now the

applied torque T(t)=0. Simulate the system 17 times using the initial conditions

shown below. In the table, the units on angular displacement and angular

velocity are radians and radians/sec respectively. Present the results of the

simulations in the phase plane, i.e., a plot with angular displacement on the

horizontal axis, and angular velocity on the vertical axis. You will find it useful

to perform each simulation over the time range 0≤t≤20 sec. As a code check,

when k=50Nm and I=1.5kgm2, your plot should look like that shown on the next

page.

Simulation

IC 1 2 3 4 5 6 7 8 9

)0( -2 0 2 4 6 8 10 10 10

)0( -10 -10 -10 -10 -10 -10 -10 -8 -6

Simulation

IC 10 11 12 13 14 15 16 17

)0( 0 -2 -4 -6 -8 -10 -10 -10

)0( 10 10 10 10 10 10 8 6

Page 19: State Space Representation - University of Idahoanderson/me_313/ME313HW6Fall16.… · 1-x 2 versus time, and the force of the seatbelt on the occupant versus time. Include a printout

137

5.13 Consider again the mass-spring-damper from Problem 5.7 with the nonlinear

spring with F=0. Using the same parameters m=2 kg, c=2 Ns/m, k=20 N/m, =10

N/m3, simulate the system 28 times using the initial conditions shown below. The

table also contains a recommended end for the time range for each simulation.

Present the simulations in the phase plane with x on the horizontal axis, and x on

the vertical axis. As a code check, when c=4 Ns/m, your results should look like

the plot shown on the next page??.

-20 -15 -10 -5 0 5 10 15-10

-5

0

5

10

q1 (rad)

q2 (

rad/s

ec)

Code check for Problem 5.12

Simulation

IC 1 2 3 4 5 6 7 8 9 10 11 12 13 14

)0(x -0.5 0.0 0.71 1.4 2.1 2.3 2.4 2.5 2.7 2.8 3.5 4.2 5.0 5.7

)0(x -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8

tend 0.5 0.6 0.8 1.2 50 50 50 1.0 0.5 0.35 0.14 0.1 0.05 0.05

Simulation

IC 15 16 17 18 19 20 21 22 23 24 25 26 27 28

)0(x 0.5 0.0 -0.71 -1.4 -2.1 -2.3 -2.4 -2.5 -2.7 -2.8 -3.5 -4.2 -5.0 -5.7

)0(x 8 8 8 8 8 8 8 8 8 8 8 8 8 8

tend 0.5 0.6 0.8 1.2 50 50 50 1.0 0.5 0.35 0.14 0.1 0.05 0.05

Page 20: State Space Representation - University of Idahoanderson/me_313/ME313HW6Fall16.… · 1-x 2 versus time, and the force of the seatbelt on the occupant versus time. Include a printout

138

-6 -4 -2 0 2 4 6-8

-6

-4

-2

0

2

4

6

8

Duffing Oscillator: m=2, c=4, k=20, (n=3.1623, =0.31623), =-10

q1 (deg)

q2 (

deg

/sec)

Code check for Problem 5.13