In this paper, the nonlinear optimal control of 3-degrees of freedom (DOF) articulated robot is investigated, both numerically and experimentally. The dynamical equations of the robot are extracted using the Newton-Euler formulation. The control objective is to design a nonlinear controller such that the end-effector tracks time-varying trajectories. For this purpose, an optimal tracking problem is de fined using a discounted cost function and, then, the state-dependent Riccati equation (SDRE) technique is employed to design an effective controller. Despite the actuator's limitations, both the simulations and experiments show that the closed-loop system based on the designed SDRE controller can successfully track varieties of trajectories such as steps and circle paths.