From: JP C. <JP...@cy...> - 2022-02-10 01:17:46
|
Hi, thanks for the response and apologies, I didn't put in any netlist because my question pertained to the plot function so netlist was irrelevant. But below is an example that will now let you run and see what I'm seeing. I tried putting ac1 within the v() but it didn't change anything. I'm confused why it doesn't keep the frequency x-axis. Regards, JP * start of netlist * ISRC VPWR VG DC 1n AC 100p $ this current source is used to control several F devices (CCCS) VSRC VG 0 $ used to get source current FSRC1 VCOM OUT1 VSRC 1 $ current controlled current source with gain of 1, one of several FSRCs R1 GR1 OUT1 256G VR1 GR1 0 C1 OUT1 VCOM 10f R2 OUT1 0 1G vpower VPWR 0 3.3V VCOM VCOM 0 3.3V *analysis section .dc ISRC 1p 10n 1p .control ac dec 100 1 1MEG $ this acts on ISRC which then acts on all of the FSRCs run plot i(VSRC) xlog xlimit 1p 10n ylog $ this works fine plot v(dc1.OUT1) xlog xlimit 1p 10n ylimit 0 3.5 $ this works fine plot v(ac1.OUT1) xlog xlimit 1 1MEG $ this works fine, x-axis is log frequency from 1Hz to 1e6Hz plot abs(v(ac1.OUT1)) xlog xlimit 1 1MEG $ this is not working, x-axis is "i-sweep" current from 1A to 1e6A plot db(v(ac1.OUT1)) xlog xlimit 1 1MEG $ this is not working, x-axis is "i-sweep" current from 1A to 1e6A .endc .end * end of netlist * what I get from setplot and display commands: *ngspice 1 -> setplot *List of plots available: * *Current dc1 * (DC transfer characteristic) * ac1 * (AC Analysis) * const Constant values (constants) *ngspice 2 -> display *Here are the vectors currently active: * *Title: * *Name: dc1 (DC transfer characteristic) *Date: Wed Feb 9 16:32:24 2022 * * gr1 : voltage, real, 10000 long * i-sweep : current, real, 10000 long [default scale] * out1 : voltage, real, 10000 long * vcom : voltage, real, 10000 long * vcom#branch : current, real, 10000 long * vg : voltage, real, 10000 long * vpower#branch : current, real, 10000 long * vpwr : voltage, real, 10000 long * vr1#branch : current, real, 10000 long * vsrc#branch : current, real, 10000 long *ngspice 3 -> -----Original Message----- From: Holger Vogt <hol...@un...> Sent: Wednesday, February 9, 2022 8:27 AM To: ngs...@li... Subject: Re: [Ngspice-users] confusion on plotting ac analysis Unfortunately you do not provide a working netlist. So my guess on the correcct syntax is this: plot v(dc1.SRC1) xlog xlimit 1p 10n ylimit 0 3.5 plot v(dc1.OUT1) xlog xlimit 1p 10n ylimit 0 3.5 plot v(ac1.OUT1) xlog xlimit 1 1MEG plot abs(v(ac1.OUT1)) xlog xlimit 1 1MEG plot db(v(ac1.OUT1)) xlog xlimit 1 1MEG Use the 'setplot' and 'display' commands to figure out which vectors are available. _______________________________________________ Ngspice-users mailing list Ngs...@li... https://lists.sourceforge.net/lists/listinfo/ngspice-users |