By combining particle bostik roll-cote swarm algorithm (PSO) with conventional PID, the hydraulic and temperature control systems of high-temperature and high-pressure triaxial testing machine was analyzed and studied, the mathematical models of hydraulic system and temperature control system were established.The performance of the control system under conventional PID control, fuzzy PID control, and particle swarm algorithm optimized PID control was compared and analyzed.The Simulink simulation results show that compared with traditional PID control and fuzzy PID control, the particle swarm algorithm optimized PID control can make the controlled object converge to steady state quickly, and the temperature and hydraulic control systems of the testing machine respond quickly, with small steady dea eyewear state error and small overshoot.Therefore, the optimized PID control strategy based on the particle swarm algorithm for testing machine control system has a better effect, and can better meet rock characteristics analysis.