PID controllers are widely used in the Wastewater treatment plants. However the existence of the control disturbance and measurement error may greatly reduce the controller's stabilization, and even lead the control to failure. In order to improve the performance capacity, a new compound control method based on the cerebellar model articulation controller (CMAC) is proposed. We adapt the traditional PID controller to realize the feedback control and CMAC controller to realize the feed forward control. For real-time control, Altera Nios II FPGA (Field Programmable Gate Array) is employed to construct a hardware-in-the-loop system through writing C and VHDL codes on this FPGA. The control results revealed the compound CMAC-PID controller had excellent control performance such as systemic stability, disturbance resistance, fast response rate and small overshoot. It can be concluded that the compound controller is robust, self adaptive and effective.