ngspice: enable .dc current, temperature and resistance sweeps

Bug #1821460 reported by Holger Vogt on 2019-03-23
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
KiCad
Wishlist
Unassigned

Bug Description

This is an extension to report https://bugs.launchpad.net/kicad/+bug/1786126

The .dc command in ngspice (in addition to sweeping a voltage) allows sweeping the current of a current source that is in the netlist, the temperature of the simulation or sweeping the value of a resistor that is in the netlist.

The command for sweeping the temperature is
.dc TEMP -15 75 5
During simulation a scale (x axis) vector temp-sweep is generated, which is used for plotting.

Combining the temperature sweep with another sweep is possible, e.g.
.dc V1 0 5 0.1 TEMP -15 75 5
Here for each temperature the voltage V1 is swept. vector temp-sweep is not generated, but vector v-sweep.

.dc TEMP -15 75 0.5 V2 0 5 1
For each voltage V2 the temperature is swept. vector temp-sweep is generated and has to be available for plotting.

The command for a resistance sweep in combination with a voltage sweep is
.dc R2 5 10 1 V1 0 1 100m
The scale vector res-sweep is generated and used as x axis vector for plotting

The command for a current sweep in combination with a resistance sweep is
.dc I1 0 1 100m R2 5 10 1
The scale vector i-sweep is generated and used as x axis vector for plotting

Eeschema --> Tools --> Simulator --> Settings --> DC Transfer
should be modified, e.g. by exclusive radio buttons V, I, T, R, each for primary and secondary selection, next to the enable button. The drop-down files DC Source should then offer only the V, I, R available in the netlist. In case of T being selected, the drop-down should grey out. Some value checking for start or end point might be done (R > 0, T > -273.15 °C).

Holger Vogt (h+vogt) on 2019-03-23
tags: added: eeschema ngspice
Wayne Stambaugh (stambaughw) wrote :

I wouldn't mind seeing this implemented myself.

Changed in kicad:
status: New → Triaged
importance: Undecided → Wishlist
milestone: none → 6.0.0-rc1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers