A hydraulic drive unit (HDU), applied in each joint of a hydraulic driven legged robot, usually adopts the impedance control outer loop based on the hydraulic position or the force control inner loop during the motion process. When the hydraulic control adopts closed-loop force control, its control performance can directly determine the control performance of the impedance control outer loop. Therefore, it is significant to design a high-accuracy force control method aimed at HDUs. In this paper, aiming at the above research concept, the force control system of the HDU is introduced first, and the lack of the force control performance is studied under different working conditions on the HDU performance test platform. Second, a model-based variable input controller (MVIC) is designed to improve the force control performance. Finally, the control performance of the MVIC is verified on the HDU performance test platform. The experimental results show that the MVIC can greatly improve the force control accuracy under different working conditions and that the controller has good robustness. The above research results can provide important reference and lay the experimental foundation for force-based impedance control. INDEX TERMS Legged robot, hydraulic drive unit (HDU), force control, model-based variable input control (MVIC).