Majid Rafei
Junior Member level 2
Dear all,
Hi.
The question is "How can I calculate network parameters in LTSpice so that the results will be readable from the output .log or .saw (ascii type) files?"
In HSPICE, it is very easy to extract network parameters and save the results in a plain text ascii type file. But, in LTSpice the work is not so simple.
I was going to extract Network analysis (I mean .net) circuit simulation results by LTSpice, which infact must return the network parameters like Z, Y, H, and S matrices, as Linear Technology say. So, just like HSPICE, I used .meas command to get, for example, Z11 of a 2-port network:
.meas ac z1111 find z11 at=.5k
But, the output .log file shows " FAIL'ed " for this measurement, while it shows a correct measurement for a common measuring task like:
.meas ac v2222 find v(2) at=.5k
Furthermore, I have used .print command, but no data for network parameters are given in the ascii type outputs, which is prefered for user direct accessing of the output data in a plain text file.
The test netlist used is as follows:
test
.option numdgt=12
.option measdgt=12
.option meascplxfmt=cartesian
vin 1 0 ac=1 Rser=50
r1 1 2 100
rout 2 0 50
*.net [V(out[,ref])|I(Rout)] <Vin|Iin> [Rin=<val>] [Rout=<val>]
.net i(rout) vin
.ac lin 100 1 1k
.print ac v(2)
.meas ac v2222 find v(2) at=.5k
.meas ac z1111 find z11 at=.5k
.end
Any comment will be really appreciated, so, please feel free to declare your advises.
Hi.
The question is "How can I calculate network parameters in LTSpice so that the results will be readable from the output .log or .saw (ascii type) files?"
In HSPICE, it is very easy to extract network parameters and save the results in a plain text ascii type file. But, in LTSpice the work is not so simple.
I was going to extract Network analysis (I mean .net) circuit simulation results by LTSpice, which infact must return the network parameters like Z, Y, H, and S matrices, as Linear Technology say. So, just like HSPICE, I used .meas command to get, for example, Z11 of a 2-port network:
.meas ac z1111 find z11 at=.5k
But, the output .log file shows " FAIL'ed " for this measurement, while it shows a correct measurement for a common measuring task like:
.meas ac v2222 find v(2) at=.5k
Furthermore, I have used .print command, but no data for network parameters are given in the ascii type outputs, which is prefered for user direct accessing of the output data in a plain text file.
The test netlist used is as follows:
test
.option numdgt=12
.option measdgt=12
.option meascplxfmt=cartesian
vin 1 0 ac=1 Rser=50
r1 1 2 100
rout 2 0 50
*.net [V(out[,ref])|I(Rout)] <Vin|Iin> [Rin=<val>] [Rout=<val>]
.net i(rout) vin
.ac lin 100 1 1k
.print ac v(2)
.meas ac v2222 find v(2) at=.5k
.meas ac z1111 find z11 at=.5k
.end
Any comment will be really appreciated, so, please feel free to declare your advises.
Last edited: