Skip to content

Commit

Permalink
Change 'dcvar' definition for resistors
Browse files Browse the repository at this point in the history
  • Loading branch information
antonmontagne committed Jan 24, 2024
1 parent 453aef0 commit 1946363
Show file tree
Hide file tree
Showing 69 changed files with 232 additions and 200 deletions.
2 changes: 1 addition & 1 deletion SLiCAP/SLiCAPexecute/SLiCAPexecute.py
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,7 @@ def addDCvarSources(instr, dcSolution):
Vneg = 0
DCcurrent = sp.simplify((Vpos - Vneg)/instr.circuit.elements[el].params['value'])
if DCcurrent != 0:
errorCurrentVariance = instr.circuit.elements[el].params['dcvar']/instr.circuit.elements[el].params['value']**2 * DCcurrent**2
errorCurrentVariance = instr.circuit.elements[el].params['dcvar'] * DCcurrent**2
newCurrentSource = element()
newCurrentSource.refDes = 'I_dcvar_' + refDes
newCurrentSource.params['dcvar'] = errorCurrentVariance
Expand Down
Binary file modified docs/_build/doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/_build/doctrees/syntax/devices.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/userguide/dcvar.doctree
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/_build/html/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: f8da23d78365ebac63520ecfdc0f727e
config: e80b7deb56dfa917b5451b9d11454ada
tags: 645f666f9bcd5a90fca523b33c5a78b7
56 changes: 30 additions & 26 deletions docs/_build/html/_sources/syntax/devices.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1119,19 +1119,21 @@ Model R
Parameters model R
~~~~~~~~~~~~~~~~~~

+-----------+-------------------+---------+---------+
| name | description | default | Laplace |
+===========+===================+=========+=========+
| value | resistance | 1 | FALSE |
+-----------+-------------------+---------+---------+
| dcvar | variance | 0 | FALSE |
+-----------+-------------------+---------+---------+
| noisetemp | noise temperature | 0 | FALSE |
+-----------+-------------------+---------+---------+
| noiseflow | variance | 0 | FALSE |
+-----------+-------------------+---------+---------+
| dcvar | variance | 0 | FALSE |
+-----------+-------------------+---------+---------+
+-----------+-----------------------------+---------+---------+
| name | description | default | Laplace |
+===========+=============================+=========+=========+
| value | resistance | 1 | FALSE |
+-----------+-----------------------------+---------+---------+
| dcvar | variance | 0 | FALSE |
+-----------+-----------------------------+---------+---------+
| dcvarlot | variance of lot | 0 | FALSE |
+-----------+-----------------------------+---------+---------+
| noisetemp | noise temperature | 0 | FALSE |
+-----------+-----------------------------+---------+---------+
| noiseflow | corner frequency 1/f noise | 0 | FALSE |
+-----------+-----------------------------+---------+---------+
| dcvar | variance | 0 | FALSE |
+-----------+-----------------------------+---------+---------+

.. _type r:

Expand All @@ -1147,19 +1149,21 @@ Model r
Parameters model r
~~~~~~~~~~~~~~~~~~

+-----------+-------------------+---------+---------+
| name | description | default | Laplace |
+===========+===================+=========+=========+
| value | resistance | 1 | FALSE |
+-----------+-------------------+---------+---------+
| dcvar | variance | 0 | FALSE |
+-----------+-------------------+---------+---------+
| noisetemp | noise temperature | 0 | FALSE |
+-----------+-------------------+---------+---------+
| noiseflow | variance | 0 | FALSE |
+-----------+-------------------+---------+---------+
| dcvar | variance | 0 | FALSE |
+-----------+-------------------+---------+---------+
+-----------+-----------------------------+---------+---------+
| name | description | default | Laplace |
+===========+=============================+=========+=========+
| value | resistance | 1 | FALSE |
+-----------+-----------------------------+---------+---------+
| dcvar | variance | 0 | FALSE |
+-----------+-----------------------------+---------+---------+
| dcvarlot | variance of lot | 0 | FALSE |
+-----------+-----------------------------+---------+---------+
| noisetemp | noise temperature | 0 | FALSE |
+-----------+-----------------------------+---------+---------+
| noiseflow | corner frequency 1/f noise | 0 | FALSE |
+-----------+-----------------------------+---------+---------+
| dcvar | variance | 0 | FALSE |
+-----------+-----------------------------+---------+---------+

Examples
~~~~~~~~
Expand Down
13 changes: 9 additions & 4 deletions docs/_build/html/_sources/userguide/dcvar.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,19 @@ All of the above can be performed symbolically or numerically.

Tolerances of resistors and independent DC sources can be defined by setting their DC variance attribute *'dcvar'* to a nonzero value or expression.

These variances must be defined in :math:`\left[ \Omega^2\right]` for resistors, in :math:`\left[ V^2\right]` for independent voltage sources, and in :math:`\left[ A^2\right]` for independent current sources.
.. admonition:: Changed from version 1.8
:class: warning

The **variance of resistor values** are defined relative (the square of the relative standard deviation: :math:`\sigma=1\%` corresponds with dcvar = :math:`10^{-4}`).
The variance of voltage and current sources is defined absolute in :math:`[V^2]` or :math:`[A^2]`, respectively.


.. code-block:: text
"DCvar demo circuit"
R1 N1 N2 R value={R} dcvar={(sigma_R*R)^2}
I1 N1 N2 I value={I_DC} dcvar = {(sigma_I*I_DC)^2}
V1 N1 N2 0 value={V_DC} dcvar = {(sigma_V*V_DC)^2}
R1 N1 N2 R value={R} dcvar={(sigma_R)^2}
I1 N1 N2 I value={I_DC} dcvar = {(sigma_I)^2}
V1 N1 N2 0 value={V_DC} dcvar = {(sigma_V)^2}
.param R=1k I_DC=1m V_DC=1 sigma_R=0.01 sigma_I=0.05 sigma_V=0.02
It is not (yet) possible to define the variance of the gain of dependent (controlled) sources.
Expand Down
4 changes: 2 additions & 2 deletions docs/_build/html/development/SLiCAPdevelopment.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0" />

<title>SLiCAP development &mdash; SLiCAP 1.7.0 documentation</title>
<title>SLiCAP development &mdash; SLiCAP 1.8.0 documentation</title>



Expand Down Expand Up @@ -65,7 +65,7 @@


<div class="version">
1.7.0
1.8.0
</div>


Expand Down
4 changes: 2 additions & 2 deletions docs/_build/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0" />

<title>SLiCAP Manual &mdash; SLiCAP 1.7.0 documentation</title>
<title>SLiCAP Manual &mdash; SLiCAP 1.8.0 documentation</title>



Expand Down Expand Up @@ -64,7 +64,7 @@


<div class="version">
1.7.0
1.8.0
</div>


Expand Down
4 changes: 2 additions & 2 deletions docs/_build/html/introduction/SLiCAPandSED.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0" />

<title>SLiCAP and Structured Electronics Design &mdash; SLiCAP 1.7.0 documentation</title>
<title>SLiCAP and Structured Electronics Design &mdash; SLiCAP 1.8.0 documentation</title>



Expand Down Expand Up @@ -65,7 +65,7 @@


<div class="version">
1.7.0
1.8.0
</div>


Expand Down
4 changes: 2 additions & 2 deletions docs/_build/html/introduction/SLiCAPcontribute.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0" />

<title>How to contribute to SLiCAP &mdash; SLiCAP 1.7.0 documentation</title>
<title>How to contribute to SLiCAP &mdash; SLiCAP 1.8.0 documentation</title>



Expand Down Expand Up @@ -65,7 +65,7 @@


<div class="version">
1.7.0
1.8.0
</div>


Expand Down
4 changes: 2 additions & 2 deletions docs/_build/html/introduction/SLiCAPintroduction.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0" />

<title>SLiCAP introduction &mdash; SLiCAP 1.7.0 documentation</title>
<title>SLiCAP introduction &mdash; SLiCAP 1.8.0 documentation</title>



Expand Down Expand Up @@ -65,7 +65,7 @@


<div class="version">
1.7.0
1.8.0
</div>


Expand Down
4 changes: 2 additions & 2 deletions docs/_build/html/introduction/SLiCAPwhatWhyHow.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0" />

<title>What is SLiCAP &mdash; SLiCAP 1.7.0 documentation</title>
<title>What is SLiCAP &mdash; SLiCAP 1.8.0 documentation</title>



Expand Down Expand Up @@ -65,7 +65,7 @@


<div class="version">
1.7.0
1.8.0
</div>


Expand Down
Binary file modified docs/_build/html/objects.inv
Binary file not shown.
4 changes: 2 additions & 2 deletions docs/_build/html/reference/SLiCAP.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0" />

<title>SLiCAP.py &mdash; SLiCAP 1.7.0 documentation</title>
<title>SLiCAP.py &mdash; SLiCAP 1.8.0 documentation</title>



Expand Down Expand Up @@ -65,7 +65,7 @@


<div class="version">
1.7.0
1.8.0
</div>


Expand Down
4 changes: 2 additions & 2 deletions docs/_build/html/reference/SLiCAPconfig.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0" />

<title>SLiCAPconfig.py &mdash; SLiCAP 1.7.0 documentation</title>
<title>SLiCAPconfig.py &mdash; SLiCAP 1.8.0 documentation</title>



Expand Down Expand Up @@ -65,7 +65,7 @@


<div class="version">
1.7.0
1.8.0
</div>


Expand Down
4 changes: 2 additions & 2 deletions docs/_build/html/reference/SLiCAPdesignData.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0" />

<title>SLiCAPdesignData.py &mdash; SLiCAP 1.7.0 documentation</title>
<title>SLiCAPdesignData.py &mdash; SLiCAP 1.8.0 documentation</title>



Expand Down Expand Up @@ -65,7 +65,7 @@


<div class="version">
1.7.0
1.8.0
</div>


Expand Down
4 changes: 2 additions & 2 deletions docs/_build/html/reference/SLiCAPexecute.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0" />

<title>SLiCAPexecute.py &mdash; SLiCAP 1.7.0 documentation</title>
<title>SLiCAPexecute.py &mdash; SLiCAP 1.8.0 documentation</title>



Expand Down Expand Up @@ -65,7 +65,7 @@


<div class="version">
1.7.0
1.8.0
</div>


Expand Down
4 changes: 2 additions & 2 deletions docs/_build/html/reference/SLiCAPhtml.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0" />

<title>SLiCAPhtml.py &mdash; SLiCAP 1.7.0 documentation</title>
<title>SLiCAPhtml.py &mdash; SLiCAP 1.8.0 documentation</title>



Expand Down Expand Up @@ -65,7 +65,7 @@


<div class="version">
1.7.0
1.8.0
</div>


Expand Down
4 changes: 2 additions & 2 deletions docs/_build/html/reference/SLiCAPini.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0" />

<title>SLiCAPini.py &mdash; SLiCAP 1.7.0 documentation</title>
<title>SLiCAPini.py &mdash; SLiCAP 1.8.0 documentation</title>



Expand Down Expand Up @@ -65,7 +65,7 @@


<div class="version">
1.7.0
1.8.0
</div>


Expand Down
4 changes: 2 additions & 2 deletions docs/_build/html/reference/SLiCAPinstruction.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0" />

<title>SLiCAPinstruction.py &mdash; SLiCAP 1.7.0 documentation</title>
<title>SLiCAPinstruction.py &mdash; SLiCAP 1.8.0 documentation</title>



Expand Down Expand Up @@ -65,7 +65,7 @@


<div class="version">
1.7.0
1.8.0
</div>


Expand Down
4 changes: 2 additions & 2 deletions docs/_build/html/reference/SLiCAPlatex.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0" />

<title>SLiCAPlatex.py &mdash; SLiCAP 1.7.0 documentation</title>
<title>SLiCAPlatex.py &mdash; SLiCAP 1.8.0 documentation</title>



Expand Down Expand Up @@ -65,7 +65,7 @@


<div class="version">
1.7.0
1.8.0
</div>


Expand Down
4 changes: 2 additions & 2 deletions docs/_build/html/reference/SLiCAPlex.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0" />

<title>SLiCAPlex.py &mdash; SLiCAP 1.7.0 documentation</title>
<title>SLiCAPlex.py &mdash; SLiCAP 1.8.0 documentation</title>



Expand Down Expand Up @@ -65,7 +65,7 @@


<div class="version">
1.7.0
1.8.0
</div>


Expand Down
4 changes: 2 additions & 2 deletions docs/_build/html/reference/SLiCAPmath.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0" />

<title>SLiCAPmath.py &mdash; SLiCAP 1.7.0 documentation</title>
<title>SLiCAPmath.py &mdash; SLiCAP 1.8.0 documentation</title>



Expand Down Expand Up @@ -65,7 +65,7 @@


<div class="version">
1.7.0
1.8.0
</div>


Expand Down
Loading

0 comments on commit 1946363

Please sign in to comment.