The exact modeling of robots with flexible links is scarcely useful from simulation and/or control points of view. In fact, reflecting the distributed nature of the link flexibility, the exact model is represented by nonlinear partial differential equations. The paper presents a method to derive approximate dynamic models consisting of a system of ordinary differential equations whose order, for a given robot, is related to the desired order of approximation. Such models are obtained by using the Lagrangian approach and by expanding in a limited number of terms the generalized coordinates describing the exact shape of the beams constituting the robot. We give a procedure that allows, if implemented on a computer, the automatic generation of...