Eleven
2014-03-17
Good morning!
We would execute a frequency analysis in NGSPICE of an any circuit.
We perform the frequency analysis with the command "AC and we obtain the matrices of circuit with commands "mdump" and "mrdump".
We would create circuit's matrices that they use not only one frequency but more frequencies. In this way, we could obtain more matricies with more frequencies of same circuit.
The problem of our code are results.
The output matrices of commands "mdump" and "medump" are always same.
In the our code, The output matrix of command "mdump" is:
Circuit Matrix
2 real
2 2 1
1 2 -1
2 1 -1
1 1 0
0 0 0.0
The output matrix from command "mrdump" is:
0
0
we don't understand this results.
The code is:
Vin 1 0 AC 1
R1 1 2 1
C1 2 0 1
.control
let freq = 1
let incr = 1
let freqmax = 5
we use "while" because we want obtain more frequencies to pass in AC command
while freq le freqmaxwe use $&freq to obtain the value of the frequency
*in AC freq_stop and freq_start are same because we want obtain the matrices for a single frequency
ac dec 1 $&freq $&freq
set outfile = "M_sx_{$&freq}.txt"
set outfile2 = "Z_dx_{$&freq}.txt"
mdump $outfile
mrdump $outfile2
let freq = freq + incr
end
.endc
.end
Thanks to Help.
Eleven
2014-03-20
Problem Solved.