Discrete time observer for a robot having elastic joints