..Hello,
..It is the mains current waveform into a simulation of a 10W flyback LED driver (mains voltage also shown)
Unfortunately, LTspice doesn't do power factor.
Okay, here's a workaround I think will give you the answer. Since this states that for a switching power supply the "Apparent Power Factor = Real Power / (RMS Voltage x RMS Current)" we can calculate those from the waveforms. One waveform calculation LTspice can do is an RMS or average value Waveform Calculation (hold cursor over the waveform reference on the graph, hold down the CTRL key, and then left click).
So you find the RMS voltage V(in) Waveform Calculation and RMS current I(in) Waveform Calculation separately and multiply them together using a calculator to get the Apparent Power.
Next you do the graphic calculation (plot) of V(in) * I(in) and take the Waveform Calculation average of that to get the Real Power.
Finally use a calculator to divide this Real Power by the Apparent Power to get the Apparent Power Factor.
It's a little convoluted but it should work.
Note that V(in) and I(in) are the plotted source current and voltage,
I see what you mean,
Power factor = real power / apparent power = {average of vin*in over whole period} / {vin(rms) * iin(rms) ..whole period values} https://en.wikipedia.org/wiki/Power_factor
..Hello,
..It is the mains current waveform into a simulation of a 10W flyback LED driver (mains voltage also shown)
Unfortunately, LTspice doesn't do power factor.