The main task for an industrial robot is to move the tool into specific positions. It is therefore necessary to have an accurate knowledge about the tool position. This report desrcibes a simulation study where an accelerometer attached to the robot tool is used. The acceleration and measured motor angles are used with an Extended Kalman Filter (EKF) to estimate the tool position. The work has been focused on a robot with two degrees of freedom. Simulations have been performed with different kind of errors and on different paths. The EKF uses covariance matrices of the process noise and measurement noise which are unknown. An optimization problem has therefore been proposed and solved to get covariance matrices that give good estimations.