You are not logged in.
I'm hoping there is a SPICE guru around here somewhere... I'm using ngspice to simulate a circuit I'm designing for my uni project, and I would like to plot things like the frequency response of the circuit against decibels instead of against voltage (which it does just now). Does anyone know how to do this? I know that Gain(decibels) = 20Log(Vout/Vin), so if anyone can tell me how to get plot to do this, it'd be great.
Cheers.
Desktop: AMD Athlon64 3800+ Venice Core, 2GB PC3200, 2x160GB Maxtor DiamondMax 10, 2x320GB WD Caviar RE, Nvidia 6600GT 256MB
Laptop: Intel Pentium M, 512MB PC2700, 60GB IBM TravelStar, Nvidia 5200Go 64MB
Offline
I am not sure if I understand your question correctly. The frequency response is anything like voltage/current/gain (any unit here) vs frequency (which most commonly will be in logarithmic scale). So for your circuit you should use:
.ac dec 10 1 <high>
.plot ac vdb(output node) xlog
(not sure about VDB and xlog, haven't used spice for a while), at input you need to connect some AC voltage, sine would be ok.
Offline
Cheers, I'll look into it. From what I read so far in the spice manual, "vdb" does seem to be what I'm after.
Desktop: AMD Athlon64 3800+ Venice Core, 2GB PC3200, 2x160GB Maxtor DiamondMax 10, 2x320GB WD Caviar RE, Nvidia 6600GT 256MB
Laptop: Intel Pentium M, 512MB PC2700, 60GB IBM TravelStar, Nvidia 5200Go 64MB
Offline