Electronic – Measuring Efficiency at Various Loads in LTSpice

efficiencyltspicespice

If one wishes to know the efficiency of a circuit in LTSpice, it is reasonably simple to set up the simulation to give you an efficiency report:

Select Simulate -> Edit Simulation cmd and select 'Stop simulating if steady state is detected'.
Rerun the simulation.
Select View -> Efficiency Report -> Show on Schematic. The efficiency report appears on the schematic.
(Instructions stolen from this website, other sources are available)

This efficiency report is useful for more than just in/out power, but also where the losses are: diodes, transistors, transformers etc. as shown here:
Screenshot of LTSpice showing efficiency table

However, this only works if, there is one fixed input (a voltage source) and if there is one fixed output (a current source or resistor called RLOAD)

Which is fine if you have a known fixed load, or only a couple of fixed states.

Is there a method to get the full efficiency report out for a bunch of points? For example, I have a DCDC converter and I need to know how it performs when 0.1, 0.2, 0.3 …. 1.9, 2.0, 2.1W is drawn, and where the power goes (U1, U2 etc).

I'm sure there is a way of doing a batch of runs for a set of options, but I cannot find how to do so for the efficiency reports.

Best Answer

You can do a batch of runs by adding a .STEP PARAM card, if you add the "Don't reset T=0 when steady state is detected". So you could adjust your RLOAD using such a parameter value. The problem is that the Efficiency Report will only reflect the last run, I think. LTSpice can't produce more than one of them.

You can get a feel for how LTspice's software handles the Efficiency Report by simply adding a card or a part, like a resistor, below your circuit somewhere. The report will "magically" move itself below all the parts. So there is a bit of software going on that is inside the schematic display code. And I doubt that this display code has access to more than one data structure for the report. One reason is that if such data were an array of such structures, then the display code would have to figure out how to display all those reports, automatically. And I suspect that Mike didn't want to have to go figure out some complex "nice appearing" output for that. Another reason is that the efficiency report is probably "hacked in" because the sales department demanded it for LTspice as a way to make selecting their power converter chips easier and more convenient and competitive with others who also have ways to providing such reports for their own parts. And since the sales department didn't require supporting multiple reports, there was no need to "go there."

I've been able to generate multiple runs, no problem, with the .STEP card and with a .OPTION card to play with SSTOL values. So the Spice engine will do it. And I'm sure the data could easily be placed into an array of structures, with a count, too. I'm pretty sure Mike wouldn't have a problem there. So I think it probably won't happen unless someone gives Mike a convincing and clear algorithm that just "sings beautifully" in his mind and is easy to implement, regarding the display of such results from the engine. He probably has very little motivation to provide several reports. But he might be interested if he can clearly see how to do a reliable job in a way that won't cause any additional support phone calls.

(The sales team, I am sure, already accepted the need for support calls regarding ONE such report. It's needed, competitively. So it's a no-brainer. They have to bite that bullet. But they might not be very happy if Mike goes out and adds something that makes the calls more expensive and more frequent, without first asking their permission. Might be able to sneak it in, if he feels there won't be any such problems.)


Another possible suggestion for Mike would be another option on the .TRAN simulation, where it displays the report on the schematic (like it does already) and then merely prompts after each .STEP PARAM for hitting ENTER or something like that to move on to the next .STEP PARAM value. This wouldn't add any changes to the display code, wouldn't add any changes to the Spice code generating the data, and would only add an arcane (and ignored by most people) option allowing this special bit of code pausing before moving to the next .STEP PARAM value. Mike might buy that idea.

I already know that it works, because I can perform a series of simulations right now with the existing product. And it displays the Efficiency Report of the last simulation. So it just picks up the data from the last run. So it's certain that adding a prompting dialog would be pretty easy to do, very clear to Mike, and may have a chance.


I've written to Mike. I will see what he says about all this.