Author Topic: LTspice: how to know if we exceed componnent capability  (Read 7880 times)

0 Members and 1 Guest are viewing this topic.

Offline asgard20032Topic starter

  • Regular Contributor
  • *
  • Posts: 184
LTspice: how to know if we exceed componnent capability
« on: January 12, 2017, 11:51:33 am »
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?
 
The following users thanked this post: electronx

Offline Dave

  • Super Contributor
  • ***
  • Posts: 1352
  • Country: si
  • I like to measure things.
Re: LTspice: how to know if we exceed componnent capability
« Reply #1 on: January 12, 2017, 05:05:08 pm »
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. :-//
<fellbuendel> it's arduino, you're not supposed to know anything about what you're doing
<fellbuendel> if you knew, you wouldn't be using it
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19494
  • Country: gb
  • 0999
Re: LTspice: how to know if we exceed componnent capability
« Reply #2 on: January 12, 2017, 11:06:21 pm »
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 VCE of 30V, an IC of 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.
 

Offline rs20

  • Super Contributor
  • ***
  • Posts: 2318
  • Country: au
Re: LTspice: how to know if we exceed componnent capability
« Reply #3 on: January 12, 2017, 11:15:51 pm »
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.
 

Offline asgard20032Topic starter

  • Regular Contributor
  • *
  • Posts: 184
Re: LTspice: how to know if we exceed componnent capability
« Reply #4 on: January 13, 2017, 06:07:42 am »
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.
 

Offline rs20

  • Super Contributor
  • ***
  • Posts: 2318
  • Country: au
Re: LTspice: how to know if we exceed componnent capability
« Reply #5 on: January 13, 2017, 06:16:30 am »
Power is trivially easy to calculate. Temperature is the thing that's difficult.
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12855
Re: LTspice: how to know if we exceed componnent capability
« Reply #6 on: January 13, 2017, 06:47:34 am »
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.
I 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.
« Last Edit: January 13, 2017, 06:51:59 am by Ian.M »
 
The following users thanked this post: rs20

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19494
  • Country: gb
  • 0999
Re: LTspice: how to know if we exceed componnent capability
« Reply #7 on: January 13, 2017, 09:05:07 am »
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.
That 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.
 

Offline vealmike

  • Regular Contributor
  • *
  • Posts: 192
  • Country: gb
Re: LTspice: how to know if we exceed componnent capability
« Reply #8 on: January 13, 2017, 11:10:34 am »
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.

Here'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!)
 

Offline w2aew

  • Super Contributor
  • ***
  • Posts: 1780
  • Country: us
  • I usTa cuDnt speL enjinere, noW I aR wuN
    • My YouTube Channel
Re: LTspice: how to know if we exceed componnent capability
« Reply #9 on: January 13, 2017, 05:32:55 pm »
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?

Unfortunately, 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.
YouTube channel: https://www.youtube.com/w2aew
FAE for Tektronix
Technical Coordinator for the ARRL Northern NJ Section
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19494
  • Country: gb
  • 0999
Re: LTspice: how to know if we exceed componnent capability
« Reply #10 on: January 13, 2017, 06:23:37 pm »
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.

Here'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!)
I 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.
« Last Edit: January 13, 2017, 07:02:22 pm by Hero999 »
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12855
Re: LTspice: how to know if we exceed component capability
« Reply #11 on: January 13, 2017, 06:31:09 pm »
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.
« Last Edit: January 13, 2017, 06:44:58 pm by Ian.M »
 
The following users thanked this post: orolo

Offline rs20

  • Super Contributor
  • ***
  • Posts: 2318
  • Country: au
Re: LTspice: how to know if we exceed componnent capability
« Reply #12 on: January 13, 2017, 09:20:56 pm »
(you didn't forget to take the absolute current when calculating power did you? Changing the current direction doesn't make -ve power!)

When 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.
 

Offline danadak

  • Super Contributor
  • ***
  • Posts: 1875
  • Country: us
  • Reactor Operator SSN-583, Retired EE
Re: LTspice: how to know if we exceed componnent capability
« Reply #13 on: January 14, 2017, 11:47:38 am »
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+thermal

http://www.ti.com/lsds/ti/analog/webench/thermal-simulation.page


Regards, Dana.
Love Cypress PSOC, ATTiny, Bit Slice, OpAmps, Oscilloscopes, and Analog Gurus like Pease, Miller, Widlar, Dobkin, obsessed with being an engineer
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12855
Re: LTspice: how to know if we exceed componnent capability
« Reply #14 on: January 14, 2017, 01:46:44 pm »
LTspice has thermal models for selected MOSFETs, Google SOAtherm for 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.   
 

Offline guenthert

  • Frequent Contributor
  • **
  • Posts: 712
  • Country: de
Re: LTspice: how to know if we exceed componnent capability
« Reply #15 on: January 14, 2017, 07:02:08 pm »
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.
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12855
Re: LTspice: how to know if we exceed componnent capability
« Reply #16 on: January 14, 2017, 08:24:29 pm »
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
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19494
  • Country: gb
  • 0999
Re: LTspice: how to know if we exceed componnent capability
« Reply #17 on: January 16, 2017, 07:08:56 pm »
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.
 

Offline bson

  • Supporter
  • ****
  • Posts: 2269
  • Country: us
Re: LTspice: how to know if we exceed componnent capability
« Reply #18 on: January 16, 2017, 09:36:48 pm »
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 determine its min-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.
« Last Edit: January 16, 2017, 09:39:02 pm by bson »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf