Question about inductor current in LTspice

Thread Starter

timbaker0365

Joined Aug 11, 2020
50
This isn't really a HW question. I have been working on a section called AC circuits in a course I'm taking and I made a circuit on LTspice, a parallel circuit with a resistor (10ohm), an inductor (5mH), and a capacitor (10uF), powered by 24V 100Hz AC. So when I run the circuit, the graph and correlating numbers show that the inductor never goes to 'negative' current? I'm not sure what I'm missing here. When I calculate the expected current mathematically and take the average of the peak current (IL), from the graph and divide by 2 it comes out as expected. But no matter what I've tried with the circuit, even building one with just the inductor, a basic series circuit, it still shows only positive current on the sine wave. I thought as the current from the source reverses, (goes negative), so would the IL? The capacitor and resistor display as expected. What am I missing? Thanks.

1729944735989.png
 

Bordodynov

Joined May 20, 2015
3,430
LTspice calculated correctly. If you make up a differential equation and solve it, you will get the same result. If there are losses in the circuit, for example, there is an inductance resistance, then a completely different result will be obtained. If you supply the inductance with a current source, you will get an understandable result.
L.png
 

Attachments

  • 781 bytes Views: 2

crutschow

Joined Mar 14, 2008
38,408
correlating numbers show that the inductor never goes to 'negative' current? I'm not sure what I'm missing here.
You are missing that there is an initial transient as the inductor settles to its steady-state value value due to the way the sim is started (which would also occur with a real circuit).
There are two ways to avoid seeing that.

The first is to delay viewing the current for about a half second until the inductor has settled to its steady-state value (top sim).

The second is to start the sim with a 90° phase-shift from the voltage source so it starts when the steady-state inductor current is zero (bottom sim).
(Note that you also need to use the Skip Initial Operating Point (uic) transient option to avoid the large DC inductor current that otherwise would be initially calculated.)

1729952336436.png
------------------------------------------
1729952391245.png
 

Thread Starter

timbaker0365

Joined Aug 11, 2020
50
LTspice calculated correctly. If you make up a differential equation and solve it, you will get the same result. If there are losses in the circuit, for example, there is an inductance resistance, then a completely different result will be obtained. If you supply the inductance with a current source, you will get an understandable result.
View attachment 334427
Thank you.
 
Top