案例Math之Differential equation Use Matlab code Pragr
当前位置:以往案例 > >案例Math之Differential equation Use Matlab code Pragr
2018-06-28

1 Hamiltonian systems and Modeling of Mechanical sys- tems
This project is taken from [NSS14, chapter 5, D Project]. The problems in this project explore the Hamiltonian formulation of the laws of motion of a system and its phase plane implications. This formulation replaces Newton’s second law F = ma = my” and is based on three mathematical manipulations:


• It is presumed that the force F (t, y, yj) depends only on y and image.png , where V(y)

is called the potential.

• The velocity variable y’ is replaced throughout by the momentum yj = p/m.

• The Hamiltonian of a system (conservative or not) is defined as

image.png

i.e. the sum of the kinetic and potential energy.


With these in mind we express the equationimage.pngas the following system called Hamilton’s equations:


image.png



These equations imply by chain rule that

image.png




Therefore, the Hamiltonian remains constant along solution curves γ(t) = (y(t), p(t)) of the above system. This is the equivalent formulation of the conservation of energy when the forces are conservative (i.e. do not change in time such as gravity).

Hamilton’s formulation for mechanical systems and the conservation of energy principle imply that the phase plane trajectories of conservative systems lie on the curves where the Hamiltonian H1y, p2 is constant, and plotting these curves may be considerably easier than solving for the trajectories directly (which, in turn, is easier than solving the original system!).

A general system




has a Hamiltonian function H if

image.png

Because then if we define H by

image.png

then we have conservation of energy:


image.png


Project "Hamiltonian systems and Modeling of Mechan- ical systems" Problems
1. (30 points) For the mass–spring oscillator the spring force is given by F (y) = k y(where k is the spring constant).

(a) (5 points) For a general Hamiltonian system


image.png



compute its linearization and plug in the Hamiltonian equations to conclude that a Hamiltonian system cannot have spiral sinks or sources critical point\-s.

(b) (5 points) Show that the above system with spring force F (y) = k y is Hamiltonian and then find the Hamiltonian and express Hamilton’s equations.

(c) (10 points)As done for autonomous systems, take the ratio of the equations and show that the phase plane trajectories H(y, p) = constant for this system are the ellipses given by p2/2m + ky2/2 = constant.

(d) (10 points)Bonus: Plot the direction field and some of the ODE solutions using an ODE solver.

(e) (10 points) Linearize the system on the critical point\-s and deduce the stability behaviour. Does that agree with part 1? Does it agree with the direction field (if you did the matlab part)?

2. (70 points) Stability and damping.

The damping force -by’ considered is not conservative, of course. Physically speaking, we know that damping drains the energy from a system until it grinds to a halt at an equilibrium point. In the phase plane, we can qualitatively describe the trajectory as continuously migrating to successively lower constant-energy orbits; stable centers become asymptotically stable spiral points when damping is taken into consideration. The second Hamiltonian equation, which effectively states pj = myjj = F , has to be changed to

image.png

when damping is present.

Periodic force: For a pendulum system with a periodic force given by

image.png

在线提交订单