Page 314 - Applied Numerical Methods Using MATLAB
P. 314

PROBLEMS   303
                where the values of the mass, the viscous friction coefficient, and the spring
                constant are given as M = 1 kg, B = 0.1Ns/m, and K = 0.1 N/m, respec-
                tively. The input to this system is the movement u(t) of the wheel part
                causing the movement y(t) of the body as the output of the system and is
                approximated to a triangular wave of height 1 m, duration 1 s, and period
                2 s as depicted in Fig. P6.4b. After converting this equation into a state
                equation as


                  x (t)        0       1      x 1 (t)             0

                   1    =                           +

                  x (t)     −K/M    −B/M      x 2 (t)  (B/M)u (t) + (K/M)u(t)

                   2
                                                                        (P6.4.2)

                                           x 1 (0)   0
                                     with        =
                                           x 2 (0)   0
                we can use such routines as ode_Ham(), ode45(), ... to solve this state
                equation and use some graphic functions to draw not only the graphs of
                y(t) and u(t), but also the animated simulation diagram. You can run
                the above MATLAB program “do_MBK.m” to see the results. Does the
                suspension system made of a spring and a damper as depicted in Fig.
                P6.4a absorb effectively the shock caused by the rolling wheel so that the
                amplitude of vehicle body oscillation is less than 1/5 times that of wheel
                oscillation?
                (cf) If one is interested in graphic visualization with MATLAB, he/she can refer to
                    [N-1].
             6.5 A Nonlinear Differential Equation for an Orbit of a Satellite

                Consider the problem of an orbit of a satellite, whose position and velocity
                are obtained as the solution of the following state equation:


                               x (t) = x 3 (t)
                                1

                               x (t) = x 4 (t)
                                2
                                                          2
                                                   2

                               x (t) =−GM E x 1 (t)/(x (t) + x (t)) 3/2  (P6.5.1)
                                3                  1      2
                                                          2
                                                   2
                               x (t) =−GM E x 2 (t)/(x (t) + x (t)) 3/2

                                4                  1      2
                                           2
                where G = 6.672 × 10 −11  Nm /kg 2  is the gravitational constant, and
                M E = 5.97 × 10 24  kg is the mass of the earth. Note that (x 1 ,x 2 )and (x 3 ,x 4 )
                denote the position and velocity, respectively, of the satellite on the plane
                having the earth at its origin. This state equation is defined in the M-file
                ‘df_sat.m’below.
                (a) Supplement the following program “nm6p05.m” which uses the three
                    routines ode_RK4(), ode45(),and ode23() to find the paths of the
                    satellite with the following initial positions/velocities for one day.
   309   310   311   312   313   314   315   316   317   318   319