Class BiasingParameters
A configuration for a BiasingSimulation.
Implements
Inherited Members
Namespace: SpiceSharp.Simulations
Assembly: SpiceSharp.dll
Syntax
public class BiasingParameters : ParameterSet, ICloneable<BiasingParameters>, IImportParameterSet<bool>, IExportPropertySet<bool>, IImportParameterSet<int>, IExportPropertySet<int>, IImportParameterSet<double>, IExportPropertySet<double>, IParameterSet
Properties
AbsolutePivotThreshold
Gets or sets the absolute threshold for choosing a pivot.
Declaration
[ParameterName("pivtol")]
[ParameterInfo("The absolute threshold for validating pivots")]
[GreaterThanOrEquals(0)]
public double AbsolutePivotThreshold { get; set; }
Property Value
Type | Description |
---|---|
double | The absolute pivot threshold. |
Exceptions
Type | Condition |
---|---|
ArgumentOutOfRangeException | Thrown if the value is negative. |
AbsoluteTolerance
Gets or sets the absolute tolerance.
Declaration
[ParameterName("abstol")]
[ParameterInfo("The absolute error tolerance.")]
[GreaterThanOrEquals(0)]
public double AbsoluteTolerance { get; set; }
Property Value
Type | Description |
---|---|
double | The absolute tolerance on solved quantities. |
DcMaxIterations
Gets or sets the maximum number of iterations for operating point simulation.
Declaration
[ParameterName("itl1")]
[ParameterName("dciter")]
[ParameterInfo("The DC iteration limit.")]
public int DcMaxIterations { get; set; }
Property Value
Type | Description |
---|---|
int | The maximum number of iterations for DC solutions. |
Gmin
Gets or sets the minimum conductance.
Declaration
[ParameterName("gmin")]
[ParameterInfo("A minimum conductance for helping convergence.")]
[GreaterThanOrEquals(0)]
public double Gmin { get; set; }
Property Value
Type | Description |
---|---|
double | The gmin value. |
Remarks
Convergence is mainly an issue with semiconductor junctions, which often lead to exponential curves. Exponential dependencies are very harsh on convergence. A lower Gmin will cause iterations to converge faster, but to a (slightly) wrong value. By steadily relaxing this value back to 0 it is possible to progressively reach a solution without having non-convergence.
GminSteps
Gets or sets the number of steps to use when using gmin stepping to improve convergence.
Declaration
[ParameterName("gminsteps")]
[ParameterInfo("The number of steps used for gmin stepping.")]
[GreaterThanOrEquals(0)]
public int GminSteps { get; set; }
Property Value
Type | Description |
---|---|
int | The number of steps used for gmin stepping. |
NoOperatingPointIterate
Gets or sets a value indicating whether the simulation should go straight to gmin stepping.
Declaration
[ParameterName("noopiter")]
[ParameterInfo("Skip immediately to gmin stepping.")]
public bool NoOperatingPointIterate { get; set; }
Property Value
Type | Description |
---|---|
bool |
|
NodeComparer
Gets or sets the comparer used for node names.
Declaration
public IEqualityComparer<string> NodeComparer { get; set; }
Property Value
Type | Description |
---|---|
IEqualityComparer<string> | The comparer use for nodes. |
Nodesets
Gets the nodesets.
Declaration
public Dictionary<string, double> Nodesets { get; }
Property Value
Type | Description |
---|---|
Dictionary<string, double> | The nodesets. |
Remarks
Nodesets allow specifying a value for a node that the simulator will use in its first iteration (or it will at least try to approach it). If you know an approximate solution to any voltage node, you can improve convergence by specifying it on this dictionary.
NominalTemperature
Gets or sets the nominal temperature in Kelvin.
Declaration
[GreaterThan(0)]
public double NominalTemperature { get; set; }
Property Value
Type | Description |
---|---|
double | The nominal temperature. |
NominalTemperatureCelsius
Gets or sets the nominal temperature in degrees celsius.
Declaration
[ParameterName("tnom")]
[ParameterName("nominaltemperature")]
[ParameterInfo("The nominal temperature of the circuit in degrees Celsius")]
[GreaterThan(-273.15)]
public double NominalTemperatureCelsius { get; set; }
Property Value
Type | Description |
---|---|
double | The nominal temperature. |
RelativePivotThreshold
Gets or sets the relative threshold for choosing a pivot.
Declaration
[ParameterName("pivrel")]
[ParameterInfo("The relative threshold for validating pivots")]
[GreaterThan(0)]
public double RelativePivotThreshold { get; set; }
Property Value
Type | Description |
---|---|
double | The relative pivot threshold. |
Exceptions
Type | Condition |
---|---|
ArgumentOutOfRangeException | Thrown if the value is not greater than 0. |
RelativeTolerance
Gets or sets the allowed relative tolerance.
Declaration
[ParameterName("reltol")]
[ParameterInfo("The relative error tolerance.")]
[GreaterThan(0)]
public double RelativeTolerance { get; set; }
Property Value
Type | Description |
---|---|
double | The relative tolerance on solved quantities. |
SourceSteps
Gets or sets the number of steps when using source stepping to improve convergence.
Declaration
[ParameterName("sourcesteps")]
[ParameterInfo("The number of steps used for source stepping.")]
[GreaterThanOrEquals(0)]
public int SourceSteps { get; set; }
Property Value
Type | Description |
---|---|
int | The number of steps for source-stepping. |
Remarks
In source stepping, all sources are considered to be at 0 which has typically only one single solution (all nodes and currents are 0V and 0A). By increasing the source factor in small steps, it is possible to progressively reach a solution without having non-convergence.
Temperature
Gets or sets the (initial) temperature in Kelvin of the simulation.
Declaration
[GreaterThan(0)]
public double Temperature { get; set; }
Property Value
Type | Description |
---|---|
double | The temperature. |
TemperatureCelsius
Gets or sets the (initial) temperature in degrees celsius of the simulation.
Declaration
[ParameterName("temp")]
[ParameterName("temperature")]
[ParameterInfo("The temperature of the circuit in degrees Celsius.")]
[GreaterThan(-273.15)]
public double TemperatureCelsius { get; set; }
Property Value
Type | Description |
---|---|
double | The temperature. |
Validate
Gets or sets a value indicating whether the simulation should be validated.
Declaration
[ParameterName("biasing.validate")]
[ParameterInfo("Flag indicating whether the simulation should validate the circuit before executing")]
public bool Validate { get; set; }
Property Value
Type | Description |
---|---|
bool |
|
VoltageTolerance
Gets or sets the absolute tolerance on voltages.
Declaration
[ParameterName("vntol")]
[ParameterInfo("The absolute voltage error tolerance.")]
[GreaterThanOrEquals(0)]
public double VoltageTolerance { get; set; }
Property Value
Type | Description |
---|---|
double | The allowed voltage tolerance. |
Methods
Clone()
Clones the instance.
Declaration
public BiasingParameters Clone()
Returns
Type | Description |
---|---|
BiasingParameters | The cloned instance. |
CreateSolver()
Creates solver used to solve equations.
Declaration
public ISparsePivotingSolver<double> CreateSolver()
Returns
Type | Description |
---|---|
ISparsePivotingSolver<double> | A solver that can be used to solve equations. |