|
From: Aldo R. <ar...@de...> - 2007-01-25 08:16:10
|
Hi all! I'm trying to solve a problem with ngspice..... I'm trying to simulate different voltage pulse in time domain, and I need to change some values of the waveform (i.e. pulse duration, rise time, etc). For example, with this simple netlist: * pulse: transient analysis VIN 1 0 pulse(0 5 400n 100n 100n 500n 2000n) RL 1 2 1k CL 0 2 1u I can perform a transient simulation from the interactive interpreter and plot the results: tran 10n 10000n plot v(1) What I can't figure out is how to change some parameter of the pulse waveform with ALTER: I tried without succeeding: alter vin = pulse(0 1 400n 100n 100n 500n 2000n) alter vin pulse = [ 0 1 400n 100n 100n 500n 2000n ] alter @vin[pulse]=[ 0 1 400n 100n 100n 500n 2000n ] alter @vin[pulse]=( 0 1 400n 100n 100n 500n 2000n ) alter @vin[pulse]=( 0; 1; 400n; 100n; 100n; 500n; 2000n) alter @vin[pulse]=( 0; 1; 400n; 100n; 100n; 500n; 2000n) I tried also: compose v values 0 1 400n 100n 100n 500n 2000n alter @vin[pulse]=v But it seems that the ngspice interpreter doesn't understand the values I've typed in... I've read about some sort of bug in some Spice3 releases concerning some kind of syntax for describing vectors...... I've also read http://groups.google.it/group/sci.electronics.design/browse_thread/thread/39f68e9cd2efac4b/abf61329058f122e?lnk=st&q=spice+alter+pulse&rnum=1&hl=it#abf61329058f122e but unfortunately it doesn't apply.... Any suggestions? Is it a bug, or am I doing something wrong? Thank you in advance for any answer or suggestion! Bye, Aldo |