This example shows a comparison of a multi-segment OLine model with the distributed-parameter line model TLine.
If resistances and conductances are negligible, with OLine the results should become closer and closer as the number of segments increases.
Suggested tests:
Use the model as it is (it has
firstOrder.T=1e-9 s) and compare
R1.v, R5.v, R50.v,
Rdistr.v: Rdistr.v is the ideal voltage
of the receiving-end resistor for a lossless line, while the others
are approximations with 1, 5, 50 cascaded segment models.
The step in this case is nearly ideal, and therefore is a very tough test for cascaded segments, and in fact they are not very good in approximating the real line behaviour.
Repeat the simulation using
firstOrder.T=20e-6 s. You will see that the OLine
compliance with the reference result given by TLine is much better,
and 50 segments are probably adequate for several applications; in
comparison with, they add the option of evaluating losses.