The invention relates to a multifunctional 
harmonic wave optimizing intelligent controller and a control method thereof. According to the controller, an 
electricity collecting unit receives 
voltage and current sampling signals of a pumping unit power 
supply and distribution system, the current sampling signals are output to an 
electricity measuring unit, and then the 
electricity measuring unit inputs measuring data into a diagnosis unit; the diagnosis unit and a 
harmonic wave optimizing unit are in communication connection through a 
communication unit; and the diagnosis unit inputs switching value signals through an input unit, and control signals are output to an external protection executing element through an output unit. According to the method, after a 
system is electrified, multitask threads are started; and each thread is subjected to function 
processing, and the threads comprise an electricity collecting task thread, a displaying task thread, a 
harmonic wave diagnosis thread, a switching value input and output management thread, a communication management thread, a protection 
processing thread and a shunt measuring protection control management thread. The controller and the control method are widely used in related industries, the reliability of power 
supply and distribution protection is effectively improved, 
harmonic interference is removed, power factors are improved, measuring is accurate, and equipment damage is lowered.