Author Topic: Learning Inductor Behavior by Simulating in LTSpice  (Read 2466 times)

0 Members and 1 Guest are viewing this topic.

Offline fatalelieberiTopic starter

  • Contributor
  • Posts: 31
  • Country: id
Learning Inductor Behavior by Simulating in LTSpice
« on: August 23, 2017, 04:41:04 am »
As the title suggest, I'm trying to learn how inductor behaves. I read from my book that it follows this equation V=L*(di/dt). So, to confirm it, I'm setting up a circuit in LTSpice which can be seen below. Basically, I'm giving a time-varying linear current to the inductor from 0A to 1A for 5ms. Then, the current rate changes to 0A from 1A in 2ms. If my calculation is correct, at the rising current, the inductor will have 0.2mV across it until 5ms then it will have 0.5mV at the falling current (5ms to 7ms). However, the simulation graph shows different result. So, basically I want to ask is this, how does this happen? Did I make a mistake?
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12856
Re: Learning Inductor Behavior by Simulating in LTSpice
« Reply #1 on: August 23, 2017, 05:21:45 am »
From the LTspice help file:
Quote
By default, LTspice will supply losses to inductors to aid SMPS transient analysis. For SMPS, these losses are of usually of no consequence, but may be turned off if desired. On the "Tools=> Control Panel=>Hacks!" page, uncheck "Supply a min. inductor damping if no Rpar is given." This setting will be remembered between invocations of the program. There is also a default series resistance of 1 milliohm for inductors that aren't mentioned in a mutual inductance statement. This Rser allows LTspice IV to integrate the inductance as a Norton equivalent circuit instead of Thevenin equivalent in order to reduce the size of the circuit's linearized matrix. If you don't want LTspice to introduce this minimum resistance, you must explicitly set Rser=0 for that inductor. This will require LTspice to use the more cumbersome Thevenin equivalent of the inductor during transient analysis.
To get a 'pure' theoretical inductor without fiddling in the control panel you *MUST* set Rser to 0 and Rpar to effective infinity (I  used 100 TeraOhms).

Also using a behavioural current source for linear ramping is extremely clumsy and in larger sims will increase simulation time.  I strongly recommend an ordinary current source configured with a PWL waveform.
e.g.
Code: [Select]
PWL(0 0 +1m 0 +5m 1 +2m 0)waits 1ms (as starting immediately at time=0 can result in large transients in some circuits) then over the next 5ms ramps up to 1A,then over the next 2ms ramps back down to 0.

LTspice sim attached that matches your theoretical figures.
« Last Edit: August 23, 2017, 05:23:27 am by Ian.M »
 

Offline fatalelieberiTopic starter

  • Contributor
  • Posts: 31
  • Country: id
Re: Learning Inductor Behavior by Simulating in LTSpice
« Reply #2 on: August 23, 2017, 06:37:24 am »
Wow, that explains a lot! Thanks for your help, it's now behaving like the theory says.


Also using a behavioural current source for linear ramping is extremely clumsy and in larger sims will increase simulation time.  I strongly recommend an ordinary current source configured with a PWL waveform.
e.g.
Code: [Select]
PWL(0 0 +1m 0 +5m 1 +2m 0)waits 1ms (as starting immediately at time=0 can result in large transients in some circuits) then over the next 5ms ramps up to 1A,then over the next 2ms ramps back down to 0.

I didn't know that feature in LTSpice. I guess I'll explore it then.
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12856
Re: Learning Inductor Behavior by Simulating in LTSpice
« Reply #3 on: August 23, 2017, 06:43:39 am »
Its using an undocumented feature of PWL() - any time with a + in front is relative to the previous time, which makes it *MUCH* easier to describe waveforms like yours.  See http://ltwiki.org/index.php5?title=Undocumented_LTspice for more stuff that never made it intp the help file.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf