The safety and stability of the control system are influenced by external factors. The object of the study is the electrohydraulic servosystem of the hydraulic excavator. The mathematical and simulation models using AMESIM for the servosystem are constructed. Then the pressure and flow characteristics are analyzed. The design and optimization of the electrohydraulic servosystem and its application in excavator engineering are described. The operation process is graphically presented by a curve, which steeply slopes up (rising period) and then flattens out (stabilization period), those periods are shortened by 38.0 and 40.5%, respectively, the delay tracking period decreased by 52.6%, and anti-interference is reliable.