LTspice: how to know if we exceed componnent capability - Page 1
Forum section: electronics / beginners

author: asgard20032
author_rank: Regular Contributor
timestamp: January 12, 2017, 11:51:33 am
content: I just recently started using LTspice. But one thing that bother me is how to know if I exceed the component capability and risk to break it. I could open up the datasheet of every componnent, check maximum power rating, maximum Vce (in case of BJT), maximum ....... Then probe the whole circuit at multiple point in time (critical point where there are more V or courrent), but that would be tedious. Isnt there a way to simply have Spice generate an error / warning / report when a component exceed its maximum rating?

author: Dave
author_rank: Super Contributor
timestamp: January 12, 2017, 05:05:08 pm
content: SPICE models don't have maximum ratings specified, so LTspice has no way of calculating for destruction of them. Besides, LTspice is pretty crap when it comes to temperature simulations, so simulating something like cooking a transistor would be impossible. You can always do the checking manually.

author: Zero999
author_rank: Super Contributor
timestamp: January 12, 2017, 11:06:21 pm
content: Most simulators tend to be poor at this. I did use one awhile ago at school which would show components blowing up when their ratings were exceeded but it was totally useless because it didn't take duty cycle into account.It's very difficult to do because the simulator doesn't know about thermal time constant, thermal losses such as convection and radiation.You can use LTSpice to calculated the power dissipated by a device over a known time period. If you know what you're doing, it's not necessary to do this for every component in the circuit. For example, if a BJT has a maximum VCEof 30V, an ICof 1A and you're using it to switch a string of 3 LEDs, with a forward current of 50mA, run off 12V, you know it'll be fine.

author: rs20
author_rank: Super Contributor
timestamp: January 12, 2017, 11:15:51 pm
content: If you Alt-click a component (i.e. hold down Alt and click the component; the mouse cursor will become a little thermometer), then you can see the instantaneous power sunk/sourced in that component. I.e., it constructs the formula for you. Note that capacitors and inductors will give spurious info because it doesn't distinguish between energy being stored vs energy being dissipated as heat.And, as mentioned above, this is only the start of the process -- you have to think about thermal time constants and thermal resistances yourself. After all, LTSpice doesn't even know how big the heatsinks you're using are.

author: asgard20032
author_rank: Regular Contributor
timestamp: January 13, 2017, 06:07:42 am
content: I know that power can be verry hard to calculate, I am more concerned about exceding absolute maximum rating for lets say, voltage. One way I could do that is to have LTspice monitor and log the output in a file, and then have a small script that would scan the file against some value to have some PASS/FAIL for some critical value.

author: rs20
author_rank: Super Contributor
timestamp: January 13, 2017, 06:16:30 am
content: Power is trivially easy to calculate. Temperature is the thing that's difficult.

author: Ian.M
author_rank: Super Contributor
timestamp: January 13, 2017, 06:47:34 am
content: Quote from: rs20 on January 12, 2017, 11:15:51 pmI wouldn't call it spurious - its just the instantaneous power input to the component (or if negative, electrical power output). Assuming you have entered realistic values for the parasitics, and that its losses can be modelled as ohmic heating, if you want the actual dissipation you need to do some averaging between two points where the inductor current or capacitor voltage is the same, usually N whole cycles of repetitive waveforms. If N is large enough the whole cycle constraint can be relaxed with some loss of accuracy.Simply zoom the area of interest in the plot and Ctrl click the trace legend to average over the displayed region of the trace. For power traces, it also integrate to get the energy.You can also do all this stuff programmatically using .measure statements, but they are a PITA to set up and the documentation is moderately cryptic, so its only generally worth doing so if you need to sweep parameters or are changing the circuit and need to re-measure with the same criteria.N.B. LTspice also accepts Ctrl-Alt clicking for power measurement which prevents conflicts with the window manager if you are running under WINE on Linux.

author: Zero999
author_rank: Super Contributor
timestamp: January 13, 2017, 09:05:07 am
content: Quote from: asgard20032 on January 13, 2017, 06:07:42 amThat might work for catching voltage spikes across components but it would be pretty useless at telling you if the power dissipation of a component has been exceeded. For example you have a resistor rated to 250mW, connected to a sinusoidal AC voltage and is dissipating 200mW RMS. Your script will calculate a peak power dissipation of 283mW and flag up an error, even though the RMS power rating of the resistor is not exceeded.To be of any use, you need to integrate the power dissipation over time. You need to know, the maximum temperature rating of the resistor, the ambient temperature and the thermal time constant, which can depend on things such as:how it's mounted, the lead length, how far away it is from other components, the orientation of the board etc.

author: vealmike
author_rank: Regular Contributor
timestamp: January 13, 2017, 11:10:34 am
content: Quote from: Hero999 on January 13, 2017, 09:05:07 amHere's a trick:Power * Time = Energy.Take a behavioural current source and write an equation for it's current such that it generates 1A for 1W in dissipated in the component you're interested in. Then feed the BI current into a 1F capacitor.The voltage across that capacitor will now be 1V for each Joule of energy dissipated in the component. Integration accomplished. Note that the waveform only ever increases (you didn't forget to take the absolute current when calculating power did you? Changing the current direction doesn't make -ve power!)

author: w2aew
author_rank: Super Contributor
timestamp: January 13, 2017, 05:32:55 pm
content: Quote from: asgard20032 on January 12, 2017, 11:51:33 amUnfortunately, there isn't really a way for a simulator to tell you this. Simulators use mathematical models to model a devices behavior, and those models are only designed to operate over "normal" operating conditions. It is up to the designer to select parts that are appropriate to the application. SPICE (any one of them) will have no problem putting 1000 amps through a 1N914A diode - it doesn't know you'll let the smoke out of it. You can use SPICE to check the operating conditions (voltages, currents, power), but it's up to you to pick the right parts. SPICE is just a tool, and like any other tool, it has its uses and its limitations.

author: Zero999
author_rank: Super Contributor
timestamp: January 13, 2017, 06:23:37 pm
content: Quote from: vealmike on January 13, 2017, 11:10:34 amI find it much easier to plot the power dissipated by a component and ask LTSpice to take the average.Unfortunately both that method and mine don't take into account the thermal issues.

author: Ian.M
author_rank: Super Contributor
timestamp: January 13, 2017, 06:31:09 pm
content: Once you have the dissipation as a current, you can model the heat capacity of the die as a capacitance, the die to tab thermal resistance as a resistor, etc. all the way through to a resistor to a voltage source representing ambient temperature, the resistor representing heat dissipated by the heatsink. You can then plot the die temperature.Getting the thermal data can be difficult without doing a destructive physical analysis of the part, but you can estimate the die heat capacity from the sloped region of the fastest pulse SOA curve, calculating the pulse energy, Tj_max should be in the datasheet, and also the thermal resistance, junction to mounting surface.

author: rs20
author_rank: Super Contributor
timestamp: January 13, 2017, 09:20:56 pm
content: Quote from: vealmike on January 13, 2017, 11:10:34 amWhen the current through a resistor reverse, so does the voltage across its terminals. So the signs of both V and I flip in synchrony, so the result is always positive (or always negative if you measure the current the wrong way with respect to your relative voltage). No need for a hack like absolute values.

author: danadak
author_rank: Super Contributor
timestamp: January 14, 2017, 11:47:38 am
content: If you go to TI website, and use Webbench, they have a thermal analysis tool.I think its steady state, not AC aware.http://www.ti.com/adc/docs/midlevel.tsp?contentId=105986&DCMP=PCB_Thermal_Calc&HQS=NotApplicable+IL+thermalhttp://www.ti.com/lsds/ti/analog/webench/thermal-simulation.pageRegards, Dana.

author: Ian.M
author_rank: Super Contributor
timestamp: January 14, 2017, 01:46:44 pm
content: LTspice has thermal models for selected MOSFETs, GoogleSOAthermfor details.You can also use the SOAtherm heatsink and board models for your own thermal modelling - you must model the package's thermal behaviour accurately as far as its mounting tab, then it can be connected to the supplied SOAtherm model.

author: guenthert
author_rank: Frequent Contributor
timestamp: January 14, 2017, 07:02:08 pm
content: This is quite interesting, however isn't this the wrong approach? Naively I would have expected that one wouldn't want to be near those stated maximums in any case, as there will be variations over a production run. Just because a simulation claims a 'pass', i.e. the max. values of all components isn't exceeded, that won't mean that there won't be a failure in one unlucky combination of components at elevated ambient temperature. Guess, the approach depends on whether one designs the next $5 gadget or a Mars lander.

author: Ian.M
author_rank: Super Contributor
timestamp: January 14, 2017, 08:24:29 pm
content: Not at all. You just have to apply an adequate derating factor like you would for any other limit e.g. capacitor voltage. Somewhere around 80% would do for cheap consumer stuff, better quality gets 66% and high reliability would be 50% or even lower.There are also techniques for applying tolerances automatically to LTspice parts and doing Monte-Carlo simulations (built in) or worst case simulations where every possible combination of the tolerance limits for N components is tried. See:http://k6jca.blogspot.co.uk/2012/07/monte-carlo-and-worst-case-circuit.html

author: Zero999
author_rank: Super Contributor
timestamp: January 16, 2017, 07:08:56 pm
content: Hint: to plot the power dissipation. Run transient analysis and hold the left Alt key (I find I need to hold both the left Alt & Ctrl but that's because I'm using LTSpice under WINE and my window manager uses left Alt for moving the window) and click on the component. The power trace will appear. You can then calculating the average power dissipation and the integral by holding the left Alt key and clicking on the trace.

author: bson
author_rank: Unknown
timestamp: January 16, 2017, 09:36:48 pm
content: I like his min-max analysis. He could change his function to return mc(nom,tola) instead of just nom to get an unbanded graph, if desired. One problem with this approach is there are so many min-max combinations; if there are even 30 components in a circuit, each with only 2 min-max bounds (some like transistors will have many), then there are 2^30 combinations. With a gaussian distribution this means 2^30 runs (if I remember my ancient statistics classes right) will on average miss 5% of coverage. And, the pathological combination might just be among the 5%... So either some additional heuristics or problem partitioning is needed. Or try to figure out mentally what the worst case is (which is actually hard for many closed feedback circuits, active filters, etc). But for something like a many-stage filter each stage could be analyzed to determineitsmin-max, then those are stepped globally. It's clearly NP-complete - meaning there is no polynomial-time solution and that verifying the solution is complete, i.e. the worst case has indeed been found, is also NP.

author: Smokey
author_rank: Super Contributor
timestamp: February 23, 2025, 05:03:52 am
content: Ha. I almost started this same topic but figured I'd search first..I always think it's funny when for a quick test I just grab some fet from the LTSpice list with about the right Rdson but has a current rating of like 0.1A and then the simulation puts like 1000A through it without complaining.They should have a little mushroom cloud animation or something for that part.

author: LinuxHata
author_rank: Frequent Contributor
timestamp: February 23, 2025, 07:27:53 am
content: Well, that is sad. I also have run into this several times, and was so careless that I put actual designs into production and fried couple of expensive chips.Ironically, now AI can create amazing quality video and images, but we still don't have good tool for circuit simulation or AI PCB tracer. (Flux is junk, I've tried it)

author: Zero999
author_rank: Super Contributor
timestamp: February 23, 2025, 11:54:35 am
content: Quote from: Ian.M on January 13, 2017, 06:31:09 pmI've done that before. It was for a power LED on a heatsink with a thermoelectric cooler. Fortunately the components had good thermal data so I didn't have to do any reverse engineering.SPICE is just a glorified calculator. If one understands the formulas behind the simulations, then they can be used for other applications, than electronics.

author: Smokey
author_rank: Super Contributor
timestamp: February 24, 2025, 02:51:40 am
content: Some FETs have the equivalent RC thermal model in the data sheets, so if you convert power into the proportional voltage and pass it through the RC network, it will give a decent estimation of the thermals at each junction.That can all be done in spice.