Jnanapurushothama
12/08/2024, 12:08 PMStefan Schippers
12/08/2024, 12:52 PMJnanapurushothama
12/08/2024, 1:08 PMStefan Schippers
12/08/2024, 1:21 PMStefan Schippers
12/08/2024, 1:22 PMStefan Schippers
12/08/2024, 1:22 PMJnanapurushothama
12/08/2024, 1:29 PMStefan Schippers
12/08/2024, 2:46 PMStefan Schippers
12/08/2024, 2:46 PMJnanapurushothama
12/08/2024, 2:47 PMStefan Schippers
12/08/2024, 2:49 PMDiarmuid Collins
12/08/2024, 9:57 PMDiarmuid Collins
12/12/2024, 10:19 PMStefan Schippers
12/15/2024, 11:23 AMxschem raw values
command that extract values from a loaded raw file was rounding each value to 8 significant digits. For noise simulations this is undesirable, so now the command returns the full precision values as they are stored. Following that I have changed your example (attached here) to show the correct distribution and also calculate rms and mean. The plots are around the 0.9V center value for better readablity (better to read '10n instead of 0.90000001)Jnanapurushothama
12/15/2024, 11:29 AMStefan Schippers
12/15/2024, 11:45 AMnoisy=1
parameter on resistors.
There should be a sqrt(4kTRB) (B=bandwidth, R=total resistance) rms noise due to the resistors, according to ngspice manual and physics.Jnanapurushothama
12/15/2024, 11:46 AMStefan Schippers
12/15/2024, 11:57 AMStefan Schippers
12/15/2024, 12:52 PMDiarmuid Collins
12/15/2024, 7:25 PMStefan Schippers
12/15/2024, 7:42 PMDiarmuid Collins
12/16/2024, 9:49 PMStefan Schippers
12/16/2024, 10:45 PMxRvar
). I think this will be fine with your ngspice as well (it is recommended in the manual).
the "Load waves" launcher does the mean/rms calculation as well as building the histogram.
The get_histo
procedure accepts 5 parameters:
node_name, mean_value, min_value, max_value, step_size
.
the step_size
determines the number of categories in the histogram. This value must be reasonable with the data sample. (too many categories with a limited sample size will not produce a gaussian shape).
The xschem raw switch 0
instruction at the beginning of the get_histo
procedure "switches" the current raw file to the first one that was loaded, that is tran.raw
. This is needed so following xschem raw values
instructions will pick data from the right simulation (there is a tran.raw loaded in memory and a noise_density.raw).
The procedure creates a new raw file in memory called "distrib" with sim type "distrib" (the names are arbitrary, a single raw file usually is a container for multiple sim types). the sweep variable for this "distrib" plot are the vout3-mean values, while the y- values are the frequencies (how many samples fall within the quantized category).
The graph is shown rotated, that is sweep variable on y axis and values on x axis, so the y values for "tran" and "distrib" are aligned. since it is rotated the graph "`Mode`" is HistoH
.Stefan Schippers
12/16/2024, 10:45 PMStefan Schippers
12/16/2024, 10:50 PMDiarmuid Collins
12/17/2024, 9:48 PMDiarmuid Collins
12/17/2024, 9:49 PMJnanapurushothama
12/26/2024, 2:26 PMDiarmuid Collins
12/28/2024, 8:20 AMJnanapurushothama
12/28/2024, 9:07 AMDiarmuid Collins
01/01/2025, 9:42 AMDiarmuid Collins
01/02/2025, 8:38 AMDiarmuid Collins
01/03/2025, 7:35 AM