I have a simulation of a open loop SMPS that I would like to know the transformer losses, but using the following script gives an efficiency of >100%.....which I know is not true.
After digging a bit I came across a example in the files area for AC power, complex_power1_meas-1.asc. But the notes state "Steady State Power Calculation With Pure Sine Voltages And Linear Components".
My question is will this same approach work for a rectangle waveform?
.param mes_start=6m mes_end=9.9m
.meas TRAN Vrms_pri RMS V(vpri1,vpri2) from {mes_start} to {mes_end}
.meas TRAN Irms_pri RMS I(L1) from {mes_start} to {mes_end}
.meas Ppri PARAM Vrms_pri*Irms_pri
.meas TRAN Vrms_can RMS V(vac_can1,vac_can2) from {mes_start} to {mes_end}
.meas TRAN Irms_can RMS I(L2) from {mes_start} to {mes_end}
.meas Pcan PARAM Vrms_can*Irms_can
.meas TRAN Vrms_rs RMS V(vac_rs1,vac_rs2) from {mes_start} to {mes_end}
.meas TRAN Irms_rs RMS I(L3) from {mes_start} to {mes_end}
.meas Prs PARAM Vrms_rs*Irms_rs
.meas eff_tx PARAM (Pcan+Prs)/Ppri