Added capability of setting intial theta in pendulum model