design and construction of an inverted pendulum