Linear Circuit Analysis


LTspice

LTspice is a powerful, fast, and free SPICE (Simulation Program with Integrated Circuit Emphasis) simulator software developed by Analog Devices. It is widely used by engineers for simulating analog circuits, mixed-signal circuits, and power electronics. LTspice provides a user-friendly graphical interface for designing circuits, running simulations, and analyzing results. It supports a wide range of components, including resistors, capacitors, inductors, diodes, transistors, and operational amplifiers. Additionally, LTspice allows users to create custom components and models, making it a versatile tool for circuit design and analysis. Feel free to download and install it on your computer LTspice from here.

Users can export circuit digrams from the CircuitsU website as a netlist file (*.net) that can be opened in LTspice for further analysis and simulation.

Syntax of Netlist Files

LTspice is using a modified nodal analysis technique to compute the voltages and currents in the circuit numerically. To simulate a circuit the user create a netlist file that contains a list of components and their connections. Below is a description of some of the basic components that can be inncluded in a netlist file.

  1. Independent voltage source
    Vname N+ N- [DC value] [AC value] [transient shape]
  2. Independent current source
    Iname N+ N- [DC value] [AC value] [transient shape]

    Both sources can be set can generate waveforms:

    • SIN(offset amplitude freq)
    • PULSE(V1 V2 Tdelay Trise Tfall Ton Tperiod)
    • EXP(...), PWL(...), etc.

  3. Resistor
    Rname N1 N2 value
  4. Capacitor
    Cname N1 N2 value [IC=initial_voltage]
  5. Inductor
    Lame N1 N2 value [IC=initial_current]
  6. Voltage-Controlled Voltage Source
    Ename N+ N- NC+ NC- gain
  7. Voltage-Controlled Current Source
    Gname N+ N- NC+ NC- transconductance
  8. Current-Controlled Voltage Source
    Hname N+ N- Vcontrol gain
  9. Current-Controlled Current Source
    Fname N+ N- Vcontrol gain

The ground node is denoted by 0. Since LTspice uses a modified nodal analysis technique to solve the circuit equations, it is important for the circuit to have a ground node. Otherwise, one can get errors such Node XXX is floating or singular matrix.

The following examples illustrate how to write the netlist file for a few simple circuits.

Example 1
/ec\svg/netlist/net1.svg /ec\svg/netlist/pre1.html
Example 2
/ec\svg/netlist/net2.svg /ec\svg/netlist/pre2.html
Example 3
/ec\svg/netlist/net3.svg /ec\svg/netlist/pre3.html
Example 4
/ec\svg/netlist/net4.svg /ec\svg/netlist/pre4.html
Read more

First SPICE program
LTspice
Analog devices