You are on page 1of 4

ASSIGNMENT #3

Mathematical Modeling & Simulation


Submitted by :
Sohail Imran
Submitted to:
Dr. Nasir Majeed Mirza
....................................................................................................

Question:1

Patch Diagram:

dy
y t 2 , where y(0) = 1.0
dt
Analytical Solution

dy
y t2
dt
The integrating factor is
I.F= exp(dt)
=exp(-t)
So

et

dy t
e y t 2et
dt

Comparison:
Or

d (et y) t 2et dt

Integrating both sides and using


initial conditiion y(0) = 1.0,
y= -t2 -2t 2+ 3exp(t)

Question:2
d 2 x / dt 2 A
x(0) = 0.0, dx/dt = 1.0 at t=0

Patch Diagram:

x(t)/dt verses t for various A & x(0):


x(t) verses 't'
300

250

A=-5
A=-3
A=0
A=2
A=5

200

150

x(t)

x(t)

100

100

-100

50

-200

-300

x(0)=-25
x(0)=-10
x(0)=0
x(0)=10
x(0)=25

200

5
time ' t '

-50

10

dx(t)/dt verses t for various A & x(0):

5
time (t)

10

10

dx(t/dt verses 't')


60

50

A=5
A=2
A=0
A=-3
A=-5

40

30

dx(t)/dt

dx(t)/dt

20

20

-20

10

-40

-60

x'(0)=-10
x'(0)=-5
x'(0)=0
x'(0)=5
x'(0)=10

40

5
time (t)

10

-10

5
time (t)

Question:3
The gravitational acceleration as a function of altitude is given by
g=G M/( R+y(t) )2
where M=5.9742 1024 kilograms,

R=6.4 106 m,

G=6.67300 10-11 m3 kg-1 s-2

The gravitational force acting on the falling object is


Fg=m.g(y)=m.( G M/( R+y(t) )2)
The drag force acting on the object is
Fd = a * v^2 =( dy/dt)2
The net force with m=1kg

d2y
dy
GM / ( R y ) 2 ( ) 2
2
dt
dt

Patch Diagram:

Velocity verses time:


3.5

Velocity(m/s)

2.5

1.5

0.5

0
0

5
time (s)

10

Question:4
d 2 x / dt 2 A sin t
x(0) = 0.0, dx/dt = 1.0 at t=0

Patch Diagram:

y
To Workspace
d2x/dt2

dx/dt

1
s

1
s

Integrator

Scope
x

A*sin(t)
0

Integrator1

Gain
A*sin(t)

sin(t)

t
sin
Ramp

10

Trigonometric
Function

Gain1

X(t) veres time for various A & time step:

250

200
A=20

X(t)

150

100

A=10
A=5

50

-50

5
time (t)

10

You might also like