Kinematics, dynamics, and feedback linearization control of a two-link pendulum