Hello. I try to ac simulation for AC analysis. I tried like attached file *`ac dec 10 1 10M`* and I...
u
Hello. I try to ac simulation for AC analysis. I tried like attached file
ac dec 10 1 10M
and I want to see simulation result. It said
Transient op finished successfully
. but I can't see the graph of result. It said
no such vector cdac_vd
. I attached the image foe your reference. I thought command db() is problem. so I tried to simulated except many commands. Finally, I tried a simulation to using command like
plot v(cdac_vd)
but, It didn't work. How can I do to plot the AC analysis result? I appreciate for your help.
s
put the save all inside the .control (without the leading '.') , before the ac command.
Copy code
.control
   ...
   save all
   ac ....
   write ...
   ...

.endc
You can use the
display
command at the ngspice prompt to see the available nodes. you can use vdb(node) instead of v(node) to display the value in dB, or ph(node) to get the phase (it is in radians, so you will often use plot ph(node)*180/pi )
u
@Stefan Schippers I tried simulation put the
save all
inside the
.control
but I think It has same error.
s
the
display
command should be given without any arguments at the ngspice prompt. You can use it to get the name of all saved waveforms. You will see if
cdac_vd
exists or not. Do not write into an ac_top.txt file, you should better keep the default extension, ac_top.raw, althouugh this is not an error.
I see also a problem: a zero length current prevented writing the output file. Also remember that in spice 10M means 10-milli, not 10-Mega, so specify 10MEG in the AC line. As a result I think no point is evaluated in ac analysis. Use the following control block:
Copy code
.options savecurrents
.control
  save all
  ac dec 10 1 10MEG
  remzerovec
  write ac_top.raw
  plot vdb(cdac_vd)
.endc
👍 1