This paper presents a real-time simulation for coupled system with rigid body system and hydraulic system. The equations of motion for the rigid body are derived by transforming the rigid body motion to the linear element motion.The system equations can be presented as the ordinary differential equations of motion for the coupled system of the rigid body system and the hydraulic system without introducing the constraint conditions, describing the motions of the rigid body system using the linear element motion. Then, this modeling is useful for the real time simulation for the coupled system, as numerical stability is improved by carrying out coupled system simulation in one software package.Firstly, rigid body system driven by the linear element is formulated, coupled analysis theory with the hydraulic system is derived, and electric motor drive system is formulated. Finally, the actual digging simulations of a hydraulic excavator are implemented using the present technique. It is clarified that the real time simulation is successfully conducted.