I may not understand you perfectly so I'll post a few questions.Let me try to explain myself better.
I am currently using a simulator that does not allow to calculate the RMS, so the only thing I can do is to export the plot of the power of my system to Excel and calculate it myself manually there.
So I did ... I simulated for a time equal to the period of my pwm input signal and exported the plot to Excel (whose screenshot uploaded a few posts ago).
In theory I would have completed my work, but I would like to be sure that the RMS calculated on Excel is right.
So, both out of curiosity and my own interest, I opened in LTSpice another old project of mine (the attached one of EPC2152) in which the RMS was calculated by LTSpcie and did the same procedure of exporting data to Excel.
However, I noticed that the values (RMS_Excell and RMS_LTSpice) are different!
I appreciate your detailed description, actually I hadn't gone into that much detail ... however, after reading your answer, the only thing I can answer you is "so what? what are you trying to tell me? that I miscalculated the RMS? That you cannot compare the calculation of LTSpice with that of Excel?"
..I hope I don't sound rude, but I still don't understand where I am going wrong![]()
I could be wrong but at first glance it looks like you may be calculating the RMS value wrong.View attachment 337862
"SW" is the output on the load (R1)
Ahhh.... Why is the time value not changing in the time column of the spreadsheet? You need to average the squared values over at least one WHOLE period. You should trust LTspice for being correct, even if not identical, since you don't know what collection of timesteps it uses for a period. It would be a mistake to think that it uses equally spaced time steps.Thank you for the clarification.
The fact remains that the calculations performed with excell do not match those performed with LTSpice.
LTSpice calculates an RMS value of 466W while excell (if I used the RMS formula correctly) calculates 357W
I would like to understand where I am going wrong
Could you kindly simulate the .asc file I had uploaded (in my first post) and tell me if it works with duty cycle > 80%?Hi MrC,
This is the LTS format ,for the first line, it may help you follow the commands.
.meas VIN_RMS RMS V(Vin)
.measure = Instruction
VIN_RMS = Output Variable Name
RMS = Calc RMS value
V(Vin) = Input Variable Name
When LTS has the VIN_RMS value it can use that value in any following .meas commands.
E

I think you are right!I could be wrong but at first glance it looks like you may be calculating the RMS value wrong.
If you type RMS V(Vin) * I(Vin) that may not be correct. You may have to type:
RMS V(Vin)* RMS I(Vin)
or
RMS(V(Vin)*I(Vin))
@ericgibbsI could be wrong but at first glance it looks like you may be calculating the RMS value wrong.
If you type RMS V(Vin) * I(Vin) that may not be correct. You may have to type:
RMS V(Vin)* RMS I(Vin)
or
RMS(V(Vin)*I(Vin))

Right!Hi k89,
As there are no reactive components in the circuit, why do you think the n value should be different for different frequencies?
I see that you have set D for 50%
E
I am running your sim, using a Fs Step command, as you know it takes a little while.![]()
Thank you for the answers.Hi,
If you set your .tran period, so that it does not show a full range of signal periods, you will of course see changes in the .meas results for different time periods
But in real life situations the time period will be so long that the differences will be very small
E
Below Rload + Lload yo simulate a motor phase.Hi,
If you set your .tran period, so that it does not show a full range of signal periods, you will of course see changes in the .meas results for different time periods
But in real life situations the time period will be so long that the differences will be very small
E


hi k89,
It helps me, if you post the LTS asc file you are using to create those images, so that we are both working from the same circuit.
E
Do you mean that to ensure proper operation I have to make sure that the load does not draw more than the maximum current specified on the datasheet?