## 1. Introduction

Different methods can be applied to accomplish the analysis of transmission lines. Many mathematical tools can be used, the main tools used are: circuits analysis with the use of Laplace or Fourier Transform, State Variables and Differential Equations. These tools can be included in a numeric routine in order to obtain voltage and current values in simulation of electromagnetic transients, at any point of the circuit.

The EMTP (ElectroMagnetic Transient Program) [1] is the main kind of this software. The prototype was developed in 60’s by professionals of power system area led by Dr. Hermann Dommel (University of British Columbia, in Vancouver, B.C., Canada), and Dr. Scott Meyer (Bonneville Power Administration in Portland, Oregon, U.S.A.). Currently, EMTP is the basis of electromagnetic transients simulations in power systems.

With EMTP type programs, the following analysis can be done: simulation of switching and lightning surges, transient and temporary overvoltage, electrical machines, resonance phenomena, harmonics, power quality and power electronics applications. The most known programs of EMTP type are:

MicroTran Power Systems Analysis of the University of British Columbia, Vancouver, Canada, founded in 1987 by: Hermann W. Dommel, Jose R. Marti (University of British Columbia), and Luis Marti (University of Western Ontario, Hydro One Networks Inc.).

PSCAD®, also known as PSCAD®/EMTDC™ of Manitoba HVDC Research Centre. Commercially available since 1993, PSCAD® is the result of continuous research and development since 1988.

ATP has been continuously developed through international contributions by Drs. W. Scott Meyer and Tsu-huei Liu, the co-Chairmen of the Canadian/American EMTP User Group. The birth of ATP dates to early in 1984. For the free software, however there are some rules for using it.

This kind of program, in general, doesn’t present an easy interface where data can be included [5]. Thus, many times, undergraduate students may not be interested in initiateing works in this area because the transmission lines studies involve complex models and numeric routines which are truly complex if earth effect and line parameters are considered to be frequently dependent ones.

The objective of this chapter is to introduce concepts about power systems, more especifically, in transmission lines, considering a simplified model of monophasic line in order to analyze electromagnetic transients. [2]-[6].

Considering this purpose, a transmission line can be represented as a monophasic circuit and modeled by circuits (Fig. 1). State variables are used to represent this model. The obtained linear system can be solved by using trapezoidal integration techniques.

Based on these conditions, a simplified numeric routine for a first contact of undergraduate students with the study of travelling waves was obtained. This numeric routine can led to a satisfactory precision and accuracy for the simulation of electromagnetic transients for a monophasic line transmission representation. The numeric routine was developed with the use of MatLab^{TM}.

## 2. Mathematical model

In order to equate the linear system Kirchhoff's Laws should be used. Nodal analysis is used to calculate the algebraic sum of the currents. Given that the current in the capacitor is defined as the time derivative of the voltage multiplied by the capacitance factor, the first state equation is obtained. Mesh analysis is used to calculate the algebraic sum of the voltages, the voltage across the inductor is defined as the time derivative of the current multiplied by the inductance factor, the second state equation is obtained.

A linear system can be described algebraically by using state equations variables as it follows:

where: x – vector of state variables;

u – vector of linear system entries;

A and B – matrices which feed the system.

The solution of this system can be obtained numerically by trapezoidal rule.

On the other hand, to solve the linear system of equations of state variables above, an interactive method can be used, where T is the integration step applied for the system solution. For time domain simulations, the integration step is a time step.

Rearranging equation (2), one can obtain:

Solving this equation by using numeric methods, the equation can be rewritten as:

Verifying the equation (4), there are some constant terms, thus the equation can be simplified to:

A’, A’’ e B’ are constant matrices and can be described by the following equations:

In these equations, I is eye matrix of order

The line transmission model for analysis without frequency influence over longitudinal parameters is based on a cascade of

For the transmission line represented in Fig. 2, the A matrix is described in Eq. 7. In this case, the A matrix has a special format; it’s a sparse matrix, with elements non null in the three diagonals as seen below.

In the main diagonal of the A matrix, there are the negative values of the parameters alternating between

The A matrix is a matrix of order

On the other hand, the modeling of frequency influence over longitudinal parameters can be done when introduced branches in parallel of resistor and inductor associated in series with the main branch in series of an inductor and a resistor, in each

The parameters

From analysis of Kirchhoff’s Laws of the current in the inductor and the voltage in the capacitor, the linear system of state variables is obtained.

where, each

For

The lower matrices contain just one non null element which is in the last column in first line and it’s described by

Each element of x has the following structure:

This state equation describes the transmission line represented by n

## 3. Routine development

The routine used for introducing the proposed model shown in previous items is implemented in MatLab^{TM} software. For this, only basic notions of programming are necessary to make the development of this routine easy for undergraduate students. Initially, the source values, the number of

Where R’, L’, C’, G’ are the line parameters per unit length, d is the length of the line and n is the number of

In the case of frequency influence the user may choose the number of branches and also specify the value for each resistor and inductor. These values can be calculated by using any routine that considers the frequency influence in transmission line parameters. After this step, the simulation time (t), the time step (T) and the sources that are connected at the line are defined. Then, the equation that describes each source should be introduced in the numeric routine by using a specific MatLab™ tool. Simulations of electromagnetic transient of many different input signals can be obtained just by inserting their functions in MatLab^{TM} program routine as seen in Fig. 4. After specifying all the input values, the routine generates the A and B matrices and also the input vector U in discrete time. Then, the equation (6) terms are calculated numerically by using the chosen time step and the simulation time. The chosen current and voltage output results are uploaded in a vector file. Finally, a graph is plotted with the results of the simulation.

In order of results, both routines, with and without frequency influence, will be shown and discussed step by step. The objective of these routines is to show how to use MatLab^{TM} by using simple functions or commands to present the wave propagation of current or voltage to undergraduate students. The functions and commands used into routine will be explained; also the loops and conditions used into it will also be explained below the routine.

The first routine doesn’t consider the frequency influence.

In the beginning of the routine some commands are used like:

- clear all: cleans all the variables existents in MatLab^{TM}.- clc: cleans the command window.- close all: closes all the graphics opened.

The command disp shows a message in the command window for users to know what happens in the routine, that way no one thinks the routine is not working, because sometimes, it does take a lot of time to finish all the procedures, thus, a message is important to enlighten that.

The command input asks the user to insert a value for a variable, instead of defining a constant value inside the routine, this command makes it more interactive, so the user can put any value wanted and analyze the answer for different values inserted.

The loop while is used with the purpose to insert voltage or current sources as many as the user wants. The user will specify if the source is of voltage (1) or current (2), after specifying the kind of source, it shall specify the

Indicate the input kind:

1 – Voltage

2 - Current

0 - Exit

Indicate the pi circuit = 1

Enter the function: ‘1’

For mounting the A matrix a loop for is used because the number of interactions is known, inside the loop the command if is used to construct the mainly, upper and lower diagonals as shown in Eq. 7. The same is done in the B matrix.

Finally, a loop for is used to solve the trapezoidal rule considering the time step and the total time elapsed. The variable *y* retains in the first column the value of steps of time, the second column retains the value of voltage, and the third column retains the value of current in the terminal of the line transmission.

Fig. 4 shows the previous version of the routine, in that routine the command syms was used. This command creates a symbol as a variable to solve this. The command subs must be used, in order to substitute the variable in the function with the value requested. In this case, the function entry of current or voltage source didn’t need to be inserted as a string, but the user always had to insert the function by using the variable specified, what was not always done. The second purpose used the command inline which gets a string and converts it into a function; with this command the user can use any variable, to solve this in the trapezoidal rule. It’s used the command feval, which gets the function and substitutes the values with the time step.

The second routine considers the frequency influence. Almost all the steps used in this routine were the same as shown in the first one. Only the different steps done here will be described.

This routine uses the loop for in the beginning to obtain all the values series branches. The user specifies the amount of series branches and enters the resistance and inductance values for each branch. In the last loop for, a sequence of if is used to obtain the wave propagation in different time instants. This is a very important part of the routine, because it shows how the voltage or current waves propagates into the line. This representation shows to undergraduate students that a signal put in the beginning of line will not appear instantaneously in the end of line. It takes a little time, like milliseconds to arrive at the end, because the length of the line is considered, differently from a bipole, the signal put in a terminal is at the other terminal at the same time. Another observation is that, with the EMTP type programs, the user can only analyze a specific point of the circuit and in this case in a time range. The routine shows how the wave propagates into the line for different line points in the time instant.

## 4. Obtained results

For all simulations the following values were used: the number of π circuits was 100 and the transmission line has 10 kilometers. The resistance value was

Resistors (Ω) | Inductors (mH) | ||

R_{0} | 0,026 | L_{0} | 2,209 |

R_{1} | 1,470 | L_{1} | 0,74 |

R_{2} | 2,354 | L_{2} | 0,12 |

R_{3} | 20,149 | L_{3} | 0,10 |

R_{4} | 111,111 | L_{4} | 0,05 |

A simulation was made for voltage input unitary step signal. It was a step function with a unitary step after

In Figs. 7 and 8, it’s possible to observe the influence of frequency in the current. Without frequency influence the signal is very disturbed. On the other hand, when it is used the routine that considers frequency influence, it is noticed that in the end of the line it should not have any current, supposing an end line opened, but, there are some transients because of the last branch. As in voltage signal, the current signal is damped because of the series branches in circuit. By using the routine of frequency influence, it can also be obtained how the voltage signal goes to the path of line for the time in Fig. 9.

## 5. Conclusions

By using a mono-phase circuit representation of transmission lines associated to the state variables and the trapezoidal rule, ^{TM} software, it is possible to describe the input signal through mathematical functions that are included as an initial datum of the numeric routine. It is not included in the structure of the routine, but during the routine running. By using the mentioned routine, examples of a unitary step were applied as voltage input signal and some electromagnetic transients generated from these signals are shown in this chapter. The numeric routine permits the inclusion of any function describing the voltage or current source that represents the simulated transient. The included function can be located on any point of the represented transmission line.

The shown numeric routine is simple and because of this, it can be used by undergraduate students for their first contact with electromagnetic transient phenomena, by traveling wave propagation, transmission line analyses. For the first contact with wave propagation simulations for undergraduate students, the proposed routine is an excellent tool. It is simple and its use is easy. So, by using basic concepts of traveling wave, linear systems and computing, it is possible to manipulate the numeric routine, observing the wave propagation characteristics, such as time delays, wave reflection and refraction, numeric oscillations (Gibbs’ oscillations), transient oscillations. For undergraduate students, it is possible to compare the results and the modeling of the electromagnetic transients in transmission lines considering or not frequency dependent line parameters. This is possible by accessing the proposed routine numeric code. In courses related to the transmission line area, the manipulation of this code can make the course more interesting for the undergraduate students. These advantages are added to the other ones that are shown in this chapter and related to the application of the MatLab^{TM} software. The use of this software makes the implementation of the mentioned routine extremely easy.