This paper addresses the problem to design a unified control and a fault detection system. The proposed control scheme combines a modified inverse problem technique and the idea of repetitive control. The joint torques are computed in each time instant from the unbiased, minimum variance estimate of the joint coordinates and velocities based on the `exact' robot dynamic model and the previous observations. The estimations are generated by the discrete Kalman filter. The idea of the control system's refinement is to use the optimally estimated trajectory obtained at the previous trial as a better reference trajectory for linearization in each working cycle. The problem of fault detection and isolation is formulated as a problem in Hypothesis Testing by regarding the normal operation of the robot manipulator as the null hypothesis. The error signal is defined as the difference between the actual robot manipulator output and the expected output based on the stochastic system model and the previous output data and generated by the discrete Kalman filter.