## Abstract

Applying numerical routines based on trapezoidal rule of integration (Heun’s method for numerical integration), simple models of transmission lines are used to analyze and simulate the propagation of communication signals in PLC-type systems (power line communication systems). Such systems are shared by the same systems for the transfer of electrical power and signal transmission. For the mentioned routines, the main objectives are: simulate the propagation of electromagnetic transients in these systems and analyze the interference of such phenomena in the transmitted signal. Such simulations are performed with classical structures that represent infinitesimal units of transmission lines. Modifications in the structure of such units are analyzed to improve the results obtained by the mentioned simulations.

### Keywords

- waveguide
- electromagnetic transient
- eigenvalues and eigenfunctions
- linear systems
- numerical analysis
- simulation
- state space methods
- numerical integration method
- transmission line modeling

## 1. Introduction

Systems of conductors for signal transmission or power transmission, that are, in general, classified as waveguide systems, systems of protection, coordination and control of the main system, the waveguide system, are as important as the conductors that are used. For projecting these accessory systems, analysis of short-circuit levels, overvoltages, as well as the duration of transient phenomena are very important [1, 2, 3, 4, 5, 6, 7, 8, 9]. In several situations, it is not possible to perform tests related to the occurrence of transient electromagnetic phenomena in actual transmission systems [10]. One situation for this is when the systems are in the design phase and have not yet been built or fabricated. Another situation is where the system cannot be shut down for maintenance or testing, for example, in the case of transmission lines responsible for interconnecting great power plants to great consumer centers. Because the theory and equations related to the propagation of electromagnetic fields in systems of conductors can be related to power and signal transmissions, different transmission systems are modeled as transmission lines or waveguides [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]. For example, systems with low voltage, low power and very high frequency for signal transmission and systems with very high voltage, very high power and low frequency can be modeled as transmission lines or waveguides. In analyses of these types of electrical systems affected by electromagnetic transient phenomena, time-domain and frequency-dependent models are considered efficient and accurate for applications in this field [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]. Ways to improve these models have been researched yet, searching for increasing the accuracy of the results and the efficiency of the applied methods. For the analysis of the propagation of transient electromagnetic phenomena in electrical networks using transmission line theory, the waveguides can be decomposed into infinitesimal parts modeled by π circuits or T circuits [3, 4, 5, 6, 7, 8, 9, 10, 11, 17]. Simple numerical routines for this type of analysis can be good tools for undergraduate students to investigate and simulate these types of phenomena [11, 18, 19, 20] and to test improvements in the numerical model applied to the mentioned analyses. On the other hand, for more complex numerical or simpler numerical models, to a greater or lesser degree, respectively, numerical routines are influenced by numerical errors [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23].

Considering the simplified representation of a transmission line by π circuit cascades, the solution of this system is obtained with the application of trapezoidal integration, and the results are affected by numerical oscillations or Gibbs’ oscillations [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27]. It is possible to minimize the influence of numerical oscillations or Gibbs’ oscillations, in the obtained results, by means of structural modifications of these circuits [11, 17]. The proposed modification initially involves adding damping resistors (* R*) in all π circuits [11, 17]. These resistors are introduced in parallel with the elements in a series of the π circuits (elements representing the longitudinal parameters of transmission lines or waveguides) [28]. However, in spite of decreasing the effects of numerical oscillations considerably, the incorporation of damping resistances in each circuit of the cascade increases the computational time to perform the analyses and simulations of electromagnetic phenomena propagation. So, an alternative structure for the π circuit cascade is proposed, which involves the absence of damping resistance in half of all π circuits, all of which circuits are grouped in the center of the cascade. In other cases, the different structures of π circuits, with and without damping resistance, are applied alternately in the composition of the cascade used to represent transmission lines or waveguides for analysis and simulations of transient electromagnetic phenomena propagation [29, 30, 31, 32]. If the damping resistances are not applied in each π circuit of the cascade that represents the waveguides or the transmission lines, the numerical simulation can be numerically unstable [28, 29, 30, 31, 32]. The results of several simulations that will be used to compare and determine which structure is adequate to reduce Gibbs’ oscillations without compromising the computational time will be presented. In this case, it is considered cascades with classical π circuits and cascades with damping resistances applied in each π circuit. The results presented for these comparisons are based on output voltage versus time graphs and three-dimensional graphs that establish the relationship between the first voltage peaks with the number of π circuits and the damping resistance values during the first voltage reflection to the end of the line.

_{D}

## 2. Trapezoidal rule

The trapezoidal rule or Heun’s method is a numerical integration method based on the transformation of differential equations into their algebraic equivalents. The integral of a function is approximated by the first-degree function related to the original function (the area of a trapezoid) where the endpoints are approximated by points of intersection between the original and the first-degree functions. By improving approximation accuracy, a large range of independent variable values can be subdivided into equally small portions, called integration steps (Figure 1).

Applying the trapezoidal rule, the equation below is obtained:

The time step is

Using Eq. (1), Eq. (3) is obtained:

Considering a model of a physical system (or physical phenomenon), x is a vector composed by state variables of the mentioned system. Also, considering that the physical system is described by the first-order differential linear system, Eq. (4) is obtained:

In this case, the * A*matrix represents the system, the

*matrix is related to independent inputs of the system, the*B

*vector is the input vector, and the*u

*vector is the vector of the state variables of the system. For numerical applications, Eq. (5) is considered:*x

From Eqs. (3)–(5), for very small time step, Eq. (6) is obtained:

Simplifying Eq. (6) and considering that * I*is the identity matrix, Eq. (7) is obtained:

In this case, * A*,

_{1}

*, and*A

_{2}

*elements in Eq. (7) are*B

_{1}

Using Eq. (7), it is possible to determine the next state (* x*) of the analyzed system, if the current state (

_{t + 1}

*) is known. This characteristic is very important for numerical applications where the functions that describe the physical system are not known or do not exist.*x

_{t}

## 3. Transmission line equivalent circuit model

Analyzing the propagation of waves in transmission lines or waveguides, these systems can be decomposed into infinitesimal portions that can be represented by π circuits. For representing the whole system, there is a need to use a cascade with a large number of π circuits. The generic unit of π circuits is shown in Figure 2.

Based on the structure of π circuit and Kirchhoff’s laws, the relations of voltages and currents for this generic unit are determined by Eq. (9):

Each π circuit has two state variables: the transversal voltage (* v*) and the longitudinal current (

_{k}

*). For describing the whole transmission line or the waveguide, it is necessary to use an*i

_{k}

*-order linear numerical system. So, the*n

*vector is*x

In this case, the structure of the * A*matrix is based on Eq. (9):

Considering only one voltage source in the initial of the transmission line or the waveguide, the * B*vector is in Eq. (12). If other sources are connected to the system in different points, the

*vector should be adequately changed:*B

If damping resistances are included in π circuits, this is shown in Figure 3. The relations of voltages and currents for the generic unit of π circuits are in Eq. (13):

Based on Figure 3 and Eq. (12), the structure of the * B*vector is in Eq. (14). In this case, only one voltage source at the initial of the waveguide is considered:

Also, based on Figure 3 and Eq. (12), the structure of the * A*matrix is in Eq. (15). In this case, new non-null elements are included because of the application of damping resistances:

The damping resistance is determined by

The * R*,

*,*L

*, and*G

*values are calculated by Eq. (17) where d is the line length and*C

*is the number of π circuits:*n

## 4. Numerical computation

In Figure 4, the flowchart applied to obtain the results of electromagnetic transient phenomena simulations without the introduction of damping resistances is shown.

In case of Figure 4, the flowchart is based on Eq. (6) to Eq. (12). The simulations are carried out considering that the analyzed waveguide or the transmission line is connected to an independent step voltage source of 1 pu. The end line is opened, and, because of this, the value of the propagated voltage wave is doubled compared to the voltage value at the initial line. Using the flowchart of Figure 4, the parameter values applied to the obtained results are * R’* = 0.03 Ω/km,

*= 1.2 mH/km,*L’

*= 0.5 μS/km,*G’

*= 10 nF/km,*C′

*= 50 ns, and*Δt

*= 5 km.*d

In Figure 5, the flowchart related to the inclusion of damping resistances in the π circuits for representing the analyzed waveguide or the transmission line is shown. The values of * R’*,

*,*L’

*,*G’

*,*C′

*, and*Δt

*are the same that were used to simulations without damping resistances. The analyzed system is also connected to the 1 pu step voltage, and the end line is also opened.*n

## 5. Effects of the simulation accuracy without damping resistance

Applying the flowchart of Figure 4, the main obtained results are shown in Figure 6. For these results, the time step (* Δt*) is 50 ns, and the number of π circuits is changed from 50 to 500 with step variation of 1 unit. In general, when the voltage waves are reflected the first time at the end line, the voltage values reach 2.5 pu, initially. This initial value is due to the influence of numerical oscillations or Gibbs’ oscillations. These oscillations cause numerical errors of 25% because, in this case, the exact values should be 2 pu. While the reflected voltage wave is propagated to the line initial, after new reflection at the initial line, Gibbs’ oscillations are being damped. In case of the second voltage wave reflection at the end line, the voltage values should be null ones. In this instant time, there are numerical problems again that are also represented by Gibbs’ oscillations. So, the results obtained from numerical routine based on the flowchart without the application of damping resistances are highly influenced by numerical oscillations during abrupt changes at voltage related to the energization of the transmission line or the waveguide. For the systems modeled by the transmission line theory concepts, the step voltage source represents the main problems that introduce abrupt changes in voltages in the line.

The numerical routine described by the flowchart is simple. Despite this characteristic, the numerical simulations lead to results with errors of 25% independently that the number of π circuits is applied. The increase of the number of π circuits is not related to a correspondent decrease of the numerical errors and numerical oscillations in the obtained results. A proposed alternative is the introduction of damping resistances for decreasing numerical errors and Gibbs’ oscillations in the obtained results. Next, both items show the results obtained with this alternative.

## 6. Improvement of the simulation accuracy with damping resistance

Applying damping resistances and using the k_{D} factor as 2.5, the obtained results are shown in Figure 7. Comparing Figure 7 to Figure 6, if the number of π circuits is increased, numerical oscillations or Gibbs’ oscillations are decreased. So, considering a constant value for the * k*factor, if an adequate number of π circuits is applied, numerical oscillations can be minimized. Similar results can be obtained changing the value of the

_{D}

*factor. In this case, in Figure 8, the results are obtained using 200 π circuits for different values of the*k

_{D}

*factor. Based on these results, the numerical oscillations are decreased if the factor is decreased. Because in this chapter the*k

_{D}

*is the integer, the lower value of*k

_{D}

*is 1, and the best reductions of numerical oscillations are obtained for this value. Based on Figures 7 and 8, there are two parameters that can minimize numerical oscillations: the number of π circuits and the value of the*k

_{D}

*factor.*k

_{D}

## 7. Effects of k_{D} factor variation

_{D}

Applying damping resistances, from Figures 9–15, the number of π circuits is changed from 50 to 500 for different values of the k_{D} factor. In Figure 9, the results are related to * k* = 1. For this value of the

_{D}

*factor, the numerical oscillations are highly minimized. Low numerical oscillations are observed for the number of π circuits about 50. In Figure 10, with*k

_{D}

*= 2.5, the numerical oscillations reach higher values than the results shown in Figure 9, and they are related to a range from 50 to about 100 that is bigger than the range observed in Figure 9. In Figure 10, the second overvoltage peak that is lower than the first overvoltage peak is also observed. Both overvoltage peaks are caused by numerical oscillations. Compared to Figure 9, in Figure 10, for the same time interval, the number of overvoltage peaks is increased showing that the damping of numerical oscillations is not effective as well as when the*k

_{D}

*factor is equal to 1. Based on Eq. (16), the*k

_{D}

*factor is related to the time step (*k

_{D}

*), and the value of this factor is also related to the frequency of the oscillations that are significantly reduced by the application of damping resistances. So, increasing the value of the*Δt

*factor, not all numerical oscillations are damped. Because of this, the overvoltage peaks are increased, and other lower overvoltage peaks arise.*k

_{D}

Increasing the value of the * k*factor, the influence of damping resistances is decreased. So, the voltage peaks caused by Gibbs’ oscillations are increased, if the

_{D}

*factor is increased. This effect is observed in Figures 11–15. The highest voltage peak for each value of the*k

_{D}

*factor is about 2.5 pu. Another consequence is that the second voltage peak is increased, while the*k

_{D}

*factor is decreased. The influence of damping resistances for minimizing the numerical oscillations in proposed transmission line model is more effective for small values for the*k

_{D}

*factor, considering the lower limit as 1.*k

_{D}

Analyzing the results from Figures 9–15, the highest voltage peak for each value of the * k*factor is related to the lowest number of π circuits. Increasing the number of π circuits for the same

_{D}

*factor value, the voltage peak values can be decreased. Changing adequately the*k

_{D}

*factor and the number of π circuits, Gibbs’ oscillations can be minimized. The sets of*k

_{D}

*values and the numbers of π circuits that minimize the numerical oscillations can be determined by analyzing the first voltage peaks of a great number of simulations.*k

_{D}

## 8. Number of π circuit variation

Setting the number of π circuits, the results are analyzed considering the * k*changing from 1 to 10. Applying 50 units of π circuits, the voltage peaks are not damped significantly if the

_{D}

*is changed. It is observed in Figure 16. For 100 units of π circuits, the voltage peaks are damped for values of the*k

_{D}

*factor from 1 to about 3 (Figure 17).*k

_{D}

Considering 150 units of π circuits, the range of the * k*factor that the voltage peaks are damped is bigger than the previous results. It is shown in Figure 18. In this case, this

_{D}

*factor range is from 1 to about 4. For 200 units of π circuits, the higher limit of the mentioned range is increased to about 5 (Figure 19). If 250 units of π circuits are applied, the range is further increased and the higher limit is about 6 (Figure 20). Similar relations are observed in Figures 21–23. If the quantity of π circuits is increased, the range of the*k

_{D}

*factor that is related to the minimization of Gibbs’ oscillations is increased. In this case, the increase of this quantity is directly related to the increase of the simulation time.*k

_{D}

Still analyzing Figures 21–23, it is observed that the relation between the number of the π circuits and the influence of the * k*factor in minimizing the voltage peaks is not linear. There is a saturation point where the increase of the number of π circuits can no longer minimize significant Gibbs’ oscillations and, consequently, the voltage peaks in obtained simulations. Because of this, another type of analysis is shown in Figure 24. In this case, the voltage peaks are related to the correspondent values of the

_{D}

*factor and the number of π circuits. In case of Figure 24, the results are obtained to a time step (*k

_{D}

*) of 50 ns. A region where the numerical oscillations are critically damped and there are no voltage peaks can be observed. In this case, the voltage value is 2 pu and corresponds to the exact values that can be obtained using a numerical routine of Laplace’s transformation. So, a specific type of analysis is related to the application of three-dimensional graphics showing the influence of the*Δt

*factor values and the number of π circuits on the voltage peaks obtained during the numerical simulations. It is shown in the next section.*k

_{D}

## 9. Other analyses

Based on the results shown in the previous sections, it is concluded that the numerical oscillations and, consequently, the voltage peaks obtained by the proposed model are influenced jointly by two factors: the damping resistance value and the number of π circuits applied to the numerical simulations of electromagnetic phenomena in waveguides or transmission lines. Because of this, the analyses of this joint influence must be based on three-dimensional graphics. In Figure 24, the highest voltage peaks during the first wave reflection on the transmission end line or the receiving end terminal of the waveguide are shown. These peaks depend on the k_{D} factor and the number of π circuits considering the time step as 50 ns. In Figures 25 and 26, the time steps are 10 ns and 200 ns, respectively. These graphics are used for completing the analyses carried out in the previous sections.

Based on the last three sets of obtained results of this chapter (Figures 24–26), for a specific time step, there are sets of the number of π circuits and the * k*factor values adequate for minimizing Gibbs’ oscillations and, consequently, the voltage peaks in simulations of electromagnetic transient phenomena in transmission lines using the numerical routine proposed in this chapter. The time step choice or determination is related to the fundamental frequency of the simulated phenomena. This choice or determination can be related to the type of the analyzed circuit. For example, transmission lines for power systems or waveguides for data transmission can be mentioned.

_{D}

## 10. Conclusions

Modifications on the classical structure of π circuits for modeling transmission lines are presented. These modified π circuits are applied to obtain a cascade that represents the analyzed transmission lines. Based on the electromagnetic basic concepts, very long circuits for power transmission and circuits for data transmission can be analyzed using the theoretical bases of the transmission lines. So, a numerical routine for simulating electromagnetic transient phenomena in waveguides (transmission lines for power systems or data transmission) is obtained.

In the proposed numerical routine, damping resistances for minimizing Gibbs’ oscillations or numerical oscillations are included. These oscillations are caused by the numerical integration method applied to the solution of the linear system that describes the waveguide. Applying this proposed numerical routine, several results of simulations varying the number of π circuits, the * k*factor, and the time step are obtained. These results are concentrated on three-dimensional graphics where the joint influence is shown.

_{D}

Based on the obtained results, it is observed that there are ranges of the model parameters adequate for the minimization of numerical oscillations that influence these results. The main model parameters that influence the minimization of numerical oscillations are the number of π circuits and the * k*factor. The

_{D}

*factor is applied to calculate the value of damping resistances included in each π circuit of the mentioned cascade.*k

_{D}

## Acknowledgments

The authors would like to thank the financial support by FAPESP (The São Paulo Research Foundation). The following processes are related to the results shown in this chapter: 2015/21390-7, 2015/20590-2, 2015/20684-7, 2016/02559-3, 2017/05988-5, 2017/05995-1, and 2017/23430-1.