This paper proposes a study on the linearization of a four wheeled mobile robot with wheel arms, its behavior with a variable structure control for both linearized system and nonlinear system when it transform to two wheeled inverted pendulum state from four wheeled state. It also proposes a control technique to stabilize the system in inverted pendulum mode after the system transforms. Since the system have to reach the target stable state from initial state a nonlinear sliding mode controller is used for transformation mean while taking the velocity of the system into consideration and sub-optimal methods are used to minimize switching-function chattering. To stabilize the system in the inverted pendulum mode, an LQR controller has been implemented. Also the position tracking and behavior of the system using a ramp signal is studied. The transformation and movement of the robot could be achieved by two DC motors on each side of the robot.