Modified function to organize phasor analysis