Examples of line models
This package contains demo experiments of the line models.
Extends from Modelica.Icons.ExamplesPackage (Icon for packages containing runnable examples).
| Name | Description |
|---|---|
| Compare lossless lines with different load | |
| Compares oLine and tLine behaviour | |
| Compares oLine and tLine splitting lines into trunks | |
| Lightning on a lossless transmission line | |
| Lightning on a segmented transmission line |
Modelica.Electrical.Analog.Examples.Lines.CompareLosslessLinesCompare lossless lines with different load
This example compares three lossless lines with different loads.
Inductance per meter (l=250 nH/m) and capacitance per meter (c=100 pF/m) are estimated for an average coaxial cable with characteristic impedance z0=√(l/c)=50 Ω.
The speed of the electromagnetic wave is given by c0=1/√(l*c)=2*108 m/s. Using a cable with a length of len=1 m, we obtain a delay td=len/c0=5 ns.
The sources impress a single voltage pulse with height=10 V and length=td/2, starting at td/2.
Due to the inner resistances of the sources ri=z0 the pulse at the input of the line (v1) has a height of 5 V.
Simulate for 20 ns and compare for each of the lines: v1, v2 and i1, i2.
The voltage pulse at the beginning of the line (line1.v1) starts at 2.5 ns and lasts for 2.5 ns. It arrives at 7.5 ns at the end of the line (line1.v2),
and is reflected giving a pulse of 10 V (superposition of arriving and reflected pulse).
At 12.5 ns the reflected pulse arrives at the beginning of the line, with a height of 5 V (voltage divider of z0 and ri).
Bear in mind that the source voltage is zero at that time, i.e. a short.
The current at the end of the line (line1.i2) is zero since the load is implemented as an idle.
The current at the beginning of the line, line1.i1, is 5 V/z0=100 mA at 2.5 mA and 12.5 ns.
The voltage pulse at the beginning of the line (line2.v1) starts at 2.5 ns and lasts for 2.5 ns. It arrives at 7.5 ns at the end of the line (line2.v2).
Due to load resistance=z0 no reflection occurs.
The current at the beginning of the line, line2.i1, is 5 V/z0=100 mA at 2.5 ns.
The current at the end of the line, line2.i2 is -5 V/z0=100 mA at 7.5 ns.
The voltage pulse at the beginning of the line (line3.v1) starts at 2.5 ns and lasts for 2.5 ns.
Since the load is implemented as a short, the voltage at the end of the line (line3.v2) is zero.
This is possible due to a reflection with negative sign, i.e. the superposition of arriving and reflected pulse gives zero.
The reflected voltage pulse arrives at 12.5 ns at the beginning of the line.
The current pulse at the beginning of the line (line3.i1) is 5 V/z0=100 mA at 2.5 ns.
At the end of the line (line3.i2) a reflection occurs at 7.5 ns giving a current pulse of 200 mA (superposition of arriving and reflected pulse).
The reflected pulse (100 mA) arrives at 12.5 ns at the beginning of the line (line3.i1).
Extends from Modelica.Icons.Example (Icon for runnable examples).
| Name | Description |
|---|---|
| l | Inductance per meter [H/m] |
| c | Capacitance per meter [F/m] |
| len | Length of line [m] |
| c0 | Speed of EM wave [m/s] |
| td | Transmission delay [s] |
| z0 | Characteristic impedance [Ohm] |
Modelica.Electrical.Analog.Examples.Lines.SmoothStepCompares oLine and tLine behaviour
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.
Extends from Modelica.Icons.Example (Icon for runnable examples).
| Name | Description |
|---|---|
| Rload | Load resistance [Ohm] |
| r1 | Resistance per meter [Ohm/m] |
| g1 | Conductance per meter [S/m] |
| l1 | Inductance per meter [H/m] |
| c1 | Capacitance per meter [F/m] |
| len | Length of line [m] |
| N1 | Number of lumped segments of oline1 |
| N5 | Number of lumped segments of oline5 |
| N50 | Number of lumped segments of oline50 |
| c | Speed of EM wave [m/s] |
| td | Transmission delay [s] |
| z0 | Characteristic impedance for very high frequency [Ohm] |
Modelica.Electrical.Analog.Examples.Lines.CompareLineTrunksCompares oLine and tLine splitting lines into trunks
This example shows a way to look at the traveling wave moving along a power line.
This wave can be seen looking at intermediate points of the line, looking at both OLine (several segments per line trunk) and TLine models.
OLine in the lossless case is less accurate, since shows oscillations that are not present in a distributed parameter line but, since it allows the addition of resistances and conductances, allows evaluation of losses.
Suggested tests:
Run the model as it is. Since resistances and conductances are very small in OLine, the simulation is substantially lossless.
Show in the same plot ramp.y, oLine1.p2.v, oLine2.p2.v, oLine3.p2.v, oLine4.p2.v.
Show in another plot, simultaneously, ramp.y, tLine1.p2.v, tLine2.p2.v, tLine3.p2.v, tLine4.p2.v. Here oLine shows unreal oscillations, which, however, reduce if the number of segments per trunk increases.
Try increasing this number from 7 to 50 using parameter segsPerTrunk, and look at the same plots as per test 1
Leave segsPerTrunk=50, change r1 to 1e-3 Ω, re-simulate: the effect of losses is visible only on the oLine plot.
Extends from Modelica.Icons.Example (Icon for runnable examples).
| Name | Description |
|---|---|
| Rload | Load resistance [Ohm] |
| r1 | Resistance per meter [Ohm/m] |
| g1 | Conductance per meter [S/m] |
| l1 | Inductance per meter [H/m] |
| c1 | Capacitance per meter [F/m] |
| len | Length of line [m] |
| segsPerTrunk | Segments per trunk |
| c | Speed of EM wave [m/s] |
| td | Transmission delay [s] |
| z0 | Characteristic impedance for very high frequency [Ohm] |
Modelica.Electrical.Analog.Examples.Lines.LightningLosslessTransmissionLineLightning on a lossless transmission line
This example shows what happens when a lightning hits a transmission line. We consider a lossless single-phase equivalent circuit with two parts of the transmission line, each 50 km long. The RMS voltage is 380 kV / √3, the RMS load current is roughly 1090 A. Realistic parameters of the 380 kV transmission line are used. Note that after the source starts, the traveling wave arrives at the load 350 µs later. After 20 ms, a lightning (10/350 µs) with an amplitude of 10 kA hits the transmission line just in the middle. Note that the traveling wave hits source and load approximately 200 µs after the lightning hits the transmission line. Plot voltage and current at the load. Without overvoltage protection, the load would be destroyed. One could compare the results with that obtained by using a transmission line model taking losses into account.
Extends from Modelica.Icons.Example (Icon for runnable examples).
| Name | Description |
|---|---|
| Rload | Load resistance [Ohm] |
| r | Resistance per meter [Ohm/m] |
| g | Conductance per meter [S/m] |
| l | Inductance per meter [H/m] |
| c | Capacitance per meter [F/m] |
| len | Length of line [m] |
| c0 | Speed of EM wave [m/s] |
| td | Transmission delay [s] |
| z0 | Characteristic impedance for very high frequency [Ohm] |
Modelica.Electrical.Analog.Examples.Lines.LightningSegmentedTransmissionLineLightning on a segmented transmission line
This example shows what happens when a lightning hits a transmission line. We consider a segmented single-phase equivalent circuit taking losses into account with two parts of the transmission line, each 50 km long. The RMS voltage is 380 kV / √3, the RMS load current is roughly 1090 A. Realistic parameters of the 380 kV transmission line are used. Note that after the source starts, the traveling wave arrives at the load 350 µs later. After 20 ms, a lightning (10/350 µs) with an amplitude of 10 kA hits the transmission line just in the middle. Note that the traveling wave hits source and load approximately 200 µs after the lightning hits the transmission line. Plot voltage and current at the load. Without overvoltage protection, the load would be destroyed. Note that using a sparse solver saves some simulation time. Using a lossless transmission line model simulates even much quicker.
Extends from Modelica.Icons.Example (Icon for runnable examples).
| Name | Description |
|---|---|
| Rload | Load resistance [Ohm] |
| r | Resistance per meter [Ohm/m] |
| g | Conductance per meter [S/m] |
| l | Inductance per meter [H/m] |
| c | Capacitance per meter [F/m] |
| len | Length of line [m] |
| N | Number of segments |