Researches for automation of hydraulic excavators have been conducted for laborsaving, improved efficiency of operations and increased worker's safety improvement. Authors' final goal is to develop automatic digging system which can realize the high efficiency. Therefore, it is thought that appropriate digging control algorithm is important for the automation. For this goal, this paper shows a dynamics model of the backhoe excavator and simulations using such models. Detailed dynamic models are needed from the point of view of the control engineering. Authors evaluate effectiveness of automatic digging algorithm by simulation models. In this research, the linkage mechanism which contains the closed loops is modeled based on the Newton-Euler formulation, where motion equation is derived. Moreover, we apply a soil model for simulation, based on the two dimensional distinct element method (DEM), in order to reproduce reaction force from grounds. This paper presents two example of dynamics simulation, integrating the linkage model and the soil model. The inverse dynamic analysis shows that cylinder generative forces, varying depending on digging reaction force, significantly influence the cylinder force during digging operations. By the forward dynamics simulation, a controller for tracking control, which consists of a PID controller and a gravity compensator, is designed and adjusted each PID gain.