Simulating Lossy or Custom Transmission Lines, using NG-Spice.

One of the fun things that can be done using the Open-Source circuit-simulator ‘NG-Spice’ is, that transmission lines can be simulated, with the parameters ‘Z0′ and ‘TD’, which stand for the characteristic impedance, and the delay down the length of the transmission line. However, what some people have noticed, and recorded as a bug, elsewhere on the Web, is, that such transmission lines will appear to have ideal behaviour right down to ‘DC frequencies’.

Rather than to think of this as a bug, I’d categorize this as the behaviour, that if the ‘RefDes’ of the transmission line begins with the letter ‘T’, NG-Spice will always simulate a lossless transmission line.

What some people might prefer is, to simulate a lossy transmission line. And When using NG-Spice, this capability is available, but hidden. Basically, NG-Spice uses the same simulation engine, to simulate the Netlists, that other versions of Spice will use. But, the Open-Source version will be lacking in GUI support, as well as in the available libraries of components.

The key to understanding, how to simulate a lossy transmission line, is, that NG-Spice will only process them as being a different type of component, if their reference descriptor begins with the letter ‘O’. This is similar to how NG-Spice will require that the ‘RefDes’ begin with the letter ‘X’, if what is to be simulated, is some sort of sub-circuit. But, because this will stem from a modelcard, the model of the transmission line will actually need to be specified within the Schematic Editor, as the Value of the component, for which there also needs to be a Model entry in the schematic, that points to the file, which will define the model. This Model entry will have a reference descriptor, beginning with the letter ‘A’…

(Updated 6/07/2021, 2h25… )

Continue reading Simulating Lossy or Custom Transmission Lines, using NG-Spice.