Hi <@U01819B63HP> I'm trying to generate this curv...
# xschem
t
Hi @Stefan Schippers I'm trying to generate this curve using Xschem and ngspice but I couldn't find a way to plot the frequency
also the phase noise versus the offset frequency
a
use .ac analysis
t
@Arman Avetisyan .ac is used to vary the frequency and plot frequency response as far as I know. Is there another usage of it ?
a
You have Fout and Vcont. Is this not what you want? Frequency depending on Vcont? Probably you can sweep Vcont?
s
@Arman Avetisyan I thinks he wants to plot the oscillating frequency of a VCO as simulated in a transient analysis, vs the controlling VCO voltage.
a
Oh okay. Then I do not have an answer to that. If I was trying probably will use the python to collect and analyze the data of multiple simulations done with .control .endc
s
@Arman Avetisyan @Tarek Nasser yes i think the easiest way is to masure the period and print the result using a
.measure
instruction, sweep multiple Vout points and then plot the results using any available tools (gnuplot/excel/python or may be ngspice itself, you can create new ngspice vectors and plot them).
@Tarek Nasser following example does the Frequency vs Vcont plot, i used a simple current controlled ring oscillator, only to test the plot. The ngspice commands can be optimized, i am sure, but you can start from this example. To see the graph in xschem update your xschem installation (
git pull && [sudo] make install
) since ngspice creates a different Plotname when saving custom created vectors.