added math model for velocity, acceleration and energy of pendulum