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
Stefan Schippers
01/24/2024, 11:08 AM
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.
Linen is a search-engine friendly community platform. We offer integrations with existing Slack/Discord communities and make those conversations Google-searchable.