A simple block that can measure the power factor accurately.You just have to connect the voltage and current from the circuit across the block and it will display the power factor. This block can be used as a utility block and can be used as a subsytem in any of the simulink model.
The P.F calculation is OK, but because of cumulative error phase calculation has error. if you observe signal before "cos" function you can see error.
I have modified it and will try to upload it. precise Single-phase p.f and phase calculation.