Xinjiang, China's largest cotton-producing region, suffers from a severe shortage of water resources. Cotton is a highly adapted crop to limited water conditions and no significant decreases in cotton yield have been observed under appropriate limited water conditions. Therefore, water and fertilizer integration technology has become the fundamental way out for the development of the cotton industry in Xinjiang. Time-varying, hysteresis and non-linearity in automatic fertilizer application systems for cotton fields. To address this problem, a fuzzy PID controller based on genetic algorithm optimisation is studied and designed in this paper. Optimisation of the control parameters of the PID is achieved through the optimisation of the proportionality factor in the fuzzy control algorithm by means of a genetic algorithm to complete the precise control of the fertilizer pH value. Development of an automatic fertilizer control system based on a real-time fuzzy control system using MATLAB and PLC controllers with OPC technology. The performance of the controller was verified experimentally and the results showed that the controller has good control accuracy and robustness compared with conventional PID controllers and fuzzy PID controllers, achieving the effect of precise fertilizer application.