In order to solve the safety issues such as broken hooks and derailment caused by the longitudinal impact of long trains, this paper proposes a functional variable universe fuzzy (FVUF) PID (FVUF-PID) controller incorporated with a genetic algorithm (GA) for the segmented electro-pneumatic (SEP) braking system of heavy-haul trains. To study the performance of the SEP braking system with the controller, the simulation model of the SEP braking system with a high fidelity to the static standard bench of 150-marshalling freight train is established based on the principle of Model-120 distribution valve, and extensive simulations for the SEP braking performance with the controller are carried out. The controller can realize an online adaptive tuning for the PID parameters by applying the GA to optimize the scaling factors and control rules of variable universe fuzzy inference, resulting in a great enhancement of control performance. The simulation and experiment results show that, compared with traditional pneumatic braking and SEP braking with FVUF-PID controller optimized by Particle Swarm Optimization (PSO), the time difference of starting rise of the braking cylinder between the first and last car of a 150-marshalling freight train can be reduced by 78% and 15.3%, respectively. Also, the braking time and distance of the SEP braking system with the proposed controller are shorter by 20.9% and 23.03%, and 3.13% and 5.63%, respectively, compared with those of the traditional pneumatic braking system and SEP braking with FVUF-PID controller optimized by PSO at a pressure reduction of 140kPa. Furthermore, the maximum compressional forces of the coupler during traditional pneumatic braking are reduced by 18.11-62.83% under different decompression pressures, demonstrating a significant improvement on the SEP braking performance by using the controller.