A method of generating a set of control signals for an inverter of an active filter for compensating harmonics and other modes and apparatus for performing the same