This happened to me in xschem. The ngspice is diff...
# xschem
m
This happened to me in xschem. The ngspice is different to the wave plot from xschem. The neagtive part of the graph is absolute. This might be a bug
s
It's not a bug, but a different way of displaying data. XSchem uses polar representation (magnitude and phase) for AC simulations (while ngspice stores vectors as complex real/imaginary data). For any variable , like
pssrmag
there are two vectors: • `pssrmag`: the magnitude (always >=0) •
ph(pssrmag)
the phase in deg. if you plot the phase of pssrmag
ph(pssrmag)
it will probably go to 180 deg. If you want the same plot in xschem just use this expression in the xschem graph (including double quotes):
"pssrmag; vref db20() -1 *"
this means: • Use
pssrmag
label • take
vref
magnitude • calculate
dB
value • multiply by
-1
Get in touch again if above considerations do not apply in your case.