Abstract In order to avoid the interference of the excavator hydraulic control system by external factors, the output stability of the hydraulic control system has to be improved. The method introduces a nonlinear Proportional integral differentiation (PID) controller with deviation correction parameters through the simulation verification of the control effect and the creation of excavator hydraulic drive diagram. PID, whose full English name is proportional integral derivative, is a mathematical and physical term. The controller is modeled in Matlab/Simulink. Finally, the whole hydraulic system is co-simulated by the interface of AMESim and Matlab. The simulation results show that the system model realizes the co-simulation through the interface combination of the two software, which is more accurate than the traditional PID control, and the pressure and flow fluctuation are smaller, which can suppress the interference of external load mutation, and improve the stability of the hydraulic drive output of the excavator. The validity of the experiment is verified.