This paper presents the design of a full state feedback controller to an inverted pendulum system. The nonlinear and linearized models of the system are obtained. The main goal of the proposed controller is to maintain the pendulum in the upright position and achieve a desirable tracking for the cart position. To achieve desirable tracking properties an integral term is added. The robustness of the proposed controller is examined when a 20% variation in the parameters of system is considered.