Instead of a series resistor you could use a current sensor (Hall Sensor) , just feed the cable through the sensor and measure the output voltage of the sensor.
You could also connect the inverter output voltage on the Y-axis and the sensor output voltage to the X-axis of a scope. At a power factor =1 a straight line at 45 degr should appear.
The use of a phase detector is described in Wikipedia, with an example the integrated circuit MAX9382.
A more practical solution is to use a professional handheld terminal of .e.g. Fluke.
You first get the fundamental output of the inverter i.e. vc1 and with the supply voltage vs sinusoidal(most of the times it is assumed the sinusoidal unless in some specific applications). then calculate the active power by the formula P=(vc1*vs/X)*sin(d) and reactive power Q=(vc1*vs/x -vs^2*cos(d) ) where d is the angle between the supply voltage vs and the converter fundamental voltage vc1.
Where, Van,Vbn,Vcn= line to neutral voltage / phase voltage of load connected to the inverter and
Ian,Ibn,Icn= phase current of load connected to the inverter.
If the load is three phase induction motor and it's neutral is not accesible for measurement then line to neutral voltage should be calculated with help of very high value registor. Three high value resistor should be connected in y configuration in output to the inverter and they will create neutral point to measure line to neutral voltage. In matlab/simulink use value of these resistor as 1e6 or 1 mega ohm.
Then find out total volt ampere,
VA= Vanrms*Ianrms+Vbnrms*Ibnrms+ Vcnrms*Icnrms
Where Vxnrms is the rms line to neutral voltage over signal period and Ixnrms is rms current over same signal period.