Traditional identification methods make it difficult to accurately determine the parameters of the friction model. Based on the LuGre friction model, a hybrid optimization algorithm (HO) is presented to address such aspects. This algorithm combines the genetic algorithm (GA) and particle swarm optimization algorithm (PSO) to obtain the globally optimal solutions. It incorporates three main improvements: introducing selection and crossover operations into the PSO algorithm, utilizing a variable inertia weight coefficient, and applying variable learning coefficients for enhanced performance. Compared to the static optimal solutions of the GA and PSO algorithms, the HO algorithm can improve the optimal solution by 40.68 % and 35.89 % respectively. The HO algorithm can achieve the highest model accuracy: the maximum identified friction error with the HO algorithm is only 1.70 kN, compared to 3.69 kN with the GA method and 8.52 kN with the PSO algorithm. Furthermore, a novel adaptive friction compensation controller (AC) is introduced based on the identification results to improve the stability and accuracy of the electro-hydraulic proportional systems of a 23-ton robotic excavator. Comparisons with existing proportional integral differential (PID) and feedforward compensation controllers (FC) highlight the superiority of the proposed adaptive controller in terms of trajectory accuracy and robustness. In sinusoidal trajectory tracking experiments, the AC method can achieve the highest tracking performance among the three controllers, and the maximum tracking error is only 11.56 mm. Compared to the FC controller, the control accuracy with the AC controller can be improved by 43.38 %. Experiments and simulations have shown that the friction compensation controller can effectively mitigate friction and other disturbances. As a result, the phenomena of crawling and flat peak phenomena can be eliminated.