**3. Simulation of electric circuits using PSPICE**

The levels of the analysis of electric circuits performed by PSPICE are, mainly, the following (Radoi, 1994; Vladimirescu, 1999):


446 Numerical Simulation – From Theory to Industry

*n*bC is the number of the capacitive loops

*n*sL is the number of inductive sections.

voltages values are insignificant

constitutive equations.

the circuit equations are of the form

Again anyone of the state variables can be expressed as a function of the others.

consequence the number of state-equations) is equal to *n*LC - *n*bC - *n*sL:

*n*LC is the total number (sum) of inductors and capacitors

The order of an RLC circuit , meaning the number of linearly independent variables (and by

The programs performing the analysis make the detection of capacitive loops and of the inductive sections presents in the electric circuit. Usually, it is recommended to introduce a very small value resistor in series connection with one of the elements of the capacitive loop, or to connect a high value resistor in parallel to one of the elements of the inductive section. By this the circuits differs from the original, but the difference in currents values and

The method of state variables can be naturally extended for nonlinear circuits. In this case

, 0,

with , , *RC L fff* being the characteristics of nonlinear elements and, *q* and Φ, the electric

The procedure for obtaining the state equations is similar as for linear circuits, with the difference that the state variables are *q* and Φ. These variables are present in the dynamic

, *<sup>d</sup>*

In (11) *x* is the column matrix of state variables (state vector), and *F* is a matrix depending on

If for linear circuits, the circuits equations can be always reduced to state equations, for certain

Anyhow, for a modelization not excessively idealized and a reasonable choice of state variable it is possible to obtain always state equations. For nonlinear state equations even

nonlinear circuits it is not possible to allow state equations (Hasler & Neirynck, 1985).

*t*

*dt <sup>x</sup> F x* , (11)

*R RR*

*f ui*

*C CC*

*dq u fuq dt*

*L LL*

*<sup>d</sup> i fi dt*

charge of the capacitor, respectively the magnetic flux trough the inductor.

The variables *u*C and *i*L are obtained as functions of *q* and Φ and afterwards :

the circuits topology and on the nonlinear characteristics.

the problem of existing or not of a solution might occur.

; ( , ) 0,

(10)

; ( , ) 0,

c. Solving a time variable electric circuit.

For solving the electric circuit problems PSPICE uses the branch current method. Each element of the circuit is considered being placed between two nodes. The nodes are numbered from "0", the reference node, to N and the position of an element is given by the numbers of its terminals. A very simple circuit example is given in Fig. 2.

**Figure 2.** Simple circuit for SPICE application

$$\begin{cases} \frac{V\_0 - V\_3}{R\_3} = -I\_\mathcal{g} & \text{for node } 0, \\\\ \frac{V\_1 - V\_2}{R\_1} = I\_\mathcal{g} & \text{for node } 1, \\\\ \frac{V\_1 - V\_2}{R\_1} = \frac{V\_2 - V\_3}{R\_2} & \text{for node } 2, \\\\ \frac{V\_2 - V\_3}{R\_2} = \frac{V\_3 - V\_0}{R} & \text{for node } 3. \end{cases} \tag{12}$$

These equations can be written in matrix form also as (13), where [ *I* ] is the column matrix of the sources for all the nodes, in the same order as the unknown nodes potentials in matrix [ *V* ]. [ *G* ] is the square conductance matrix.

Numerical Methods for Analyzing the Transients in Medium Voltage Networks 449

The presence of inductors and/or capacitors implies replacing them with equivalent

**Figure 3.** Thevenin and Norton generators for a capacitor , when trapeze method is used

Norton generator equivalent to the inductor in a dynamic circuit.

introduced in the program by the option UIC (use initial conditions).

as if a fault phase to ground is produced.

The situation of the modelization of a complex network is shown in the Fig. 5.

For an iterative calculation process the capacitor can be replaced by a Thevenin or a Norton generator. The Norton generator presented in the Fig. 3 has the parameters calculated according to the trapeze method of integration. The method using the Euler's regressive algorithm and the Gear's second order algorithm can be used also, but the equivalences (parameters of the Norton or Thevenin generators) are different from those presented in

**Figure 4.** Norton equivalent generator representation of a inductor, when trapeze method is used

In a similar manner for an inductor can be used a Norton equivalent generator or a Thevenin equivalent generator, with parameters depending on the method used for solving the problem. Taking the nodes potentials as unknown values it is more suitable to use the

The transient regime analysis is the most important analysis that can be performed using

When the transient regime begins with non zero initial conditions this fact can be

The transient regime is triggered by closing the switch, meaning that phase one is grounded,

elements.

Fig. 3.

PSPICE.

The potential of the reference node, "0", is taken with "zero" value so all the other N-1 nodes potentials remain as unknown values in the equation system.

With V0 = 0, system (13) is transformed into a system (14) with N-1 equations.

In this very simple example remain only 3 unknown values of nodes potentials (14).

$$
\begin{bmatrix} -I\_{\mathcal{S}} \\ +I\_{\mathcal{S}} \\ 0 \\ 0 \end{bmatrix} = \begin{bmatrix} 1 & 0 & 0 & -\frac{1}{R\_{3}} \\ 0 & \frac{1}{R\_{1}} & -\frac{1}{R\_{1}} & 0 \\ 0 & -\frac{1}{R\_{1}} & \frac{1}{R\_{1}} + \frac{1}{R\_{2}} & -\frac{1}{R\_{2}} \\ 0 & -\frac{1}{R\_{1}} & \frac{1}{R\_{1}} + \frac{1}{R\_{2}} & -\frac{1}{R\_{2}} \\ -\frac{1}{R\_{3}} & 0 & -\frac{1}{R\_{2}} & \frac{1}{R\_{2}} + \frac{1}{R\_{3}} \end{bmatrix} \cdot \begin{bmatrix} V\_{0} \\ V\_{1} \\ V\_{2} \\ V\_{3} \end{bmatrix} \text{or}\_{\prime} \begin{bmatrix} I \end{bmatrix} = \begin{bmatrix} \mathcal{G} \end{bmatrix} \cdot \begin{bmatrix} \mathcal{U} \end{bmatrix} \text{(13)}
$$

$$
\begin{bmatrix} +I\_{\mathcal{S}} \\ 0 \\ 0 \end{bmatrix} = \begin{bmatrix} 1 & -\frac{1}{R\_1} & 0 \\ -\frac{1}{R\_1} & \frac{1}{R\_1} + \frac{1}{R\_2} & -\frac{1}{R\_2} \\ 0 & -\frac{1}{R\_2} & \frac{1}{R\_2} + \frac{1}{R\_3} \end{bmatrix} \cdot \begin{bmatrix} V\_1 \\ V\_2 \\ V\_3 \end{bmatrix} . \tag{14}
$$

The system (14) can be solved using the Gaussian elimination method (Ross, 2004).

An equivalent method that can be used for solving the system is the LU factorization, by decomposing the [G] matrix.

Matrix [G]=[L]∙[U], with [L] being a matrix with "1" on the principal diagonal, and [U] is a matrix having only "0" below the principal diagonal. This method is more advantageous than the "classic" Gauss elimination method, mainly when the equation [I] = [G]∙[V] has to be solved several times: several sources [I] for the same conductance matrix. This is the situation for solving our problem using PSPICE, so that the LU factorization method shall be used.

In the analysis of dynamical circuits either the sources, voltage or current sources, have time variation, either the topology of the circuit is changing. If the passive elements are resistors, linear or nonlinear, using a time step ∆t for the discretization of the time variation (sinusoidal, exponential, linear) of the sources. For each time moment a set of values [V(t)] is calculated and memorized. These values can be used in further graph representations or printed.

The presence of inductors and/or capacitors implies replacing them with equivalent elements.

**Figure 3.** Thevenin and Norton generators for a capacitor , when trapeze method is used

448 Numerical Simulation – From Theory to Industry

0

used.

printed.

*g g*

[ *V* ]. [ *G* ] is the square conductance matrix.

These equations can be written in matrix form also as (13), where [ *I* ] is the column matrix of the sources for all the nodes, in the same order as the unknown nodes potentials in matrix

The potential of the reference node, "0", is taken with "zero" value so all the other N-1

1 1 1

1 12 <sup>2</sup> <sup>3</sup>

1 12 2

*R RR R*

*R R I V*

1 11 <sup>0</sup>

An equivalent method that can be used for solving the system is the LU factorization, by

Matrix [G]=[L]∙[U], with [L] being a matrix with "1" on the principal diagonal, and [U] is a matrix having only "0" below the principal diagonal. This method is more advantageous than the "classic" Gauss elimination method, mainly when the equation [I] = [G]∙[V] has to be solved several times: several sources [I] for the same conductance matrix. This is the situation for solving our problem using PSPICE, so that the LU factorization method shall be

In the analysis of dynamical circuits either the sources, voltage or current sources, have time variation, either the topology of the circuit is changing. If the passive elements are resistors, linear or nonlinear, using a time step ∆t for the discretization of the time variation (sinusoidal, exponential, linear) of the sources. For each time moment a set of values [V(t)] is calculated and memorized. These values can be used in further graph representations or

The system (14) can be solved using the Gaussian elimination method (Ross, 2004).

2 23

*R RR*

*R RR R V*

1 1 <sup>0</sup>

 

0

2

*V*

or,

1 2

*V*

*V*

3

*I GV*

. (14)

(13)

nodes potentials remain as unknown values in the equation system.

3 3

1 1 0 0

1 1 0 0

*R R I V I R R V*

<sup>0</sup> 1 11 1 <sup>0</sup>

0

decomposing the [G] matrix.

*g*

3 2 23

1 1

1 11 1 <sup>0</sup>

<sup>1</sup> 1 11 <sup>0</sup>

 

*R R RR*

With V0 = 0, system (13) is transformed into a system (14) with N-1 equations.

In this very simple example remain only 3 unknown values of nodes potentials (14).

For an iterative calculation process the capacitor can be replaced by a Thevenin or a Norton generator. The Norton generator presented in the Fig. 3 has the parameters calculated according to the trapeze method of integration. The method using the Euler's regressive algorithm and the Gear's second order algorithm can be used also, but the equivalences (parameters of the Norton or Thevenin generators) are different from those presented in Fig. 3.

**Figure 4.** Norton equivalent generator representation of a inductor, when trapeze method is used

In a similar manner for an inductor can be used a Norton equivalent generator or a Thevenin equivalent generator, with parameters depending on the method used for solving the problem. Taking the nodes potentials as unknown values it is more suitable to use the Norton generator equivalent to the inductor in a dynamic circuit.

The transient regime analysis is the most important analysis that can be performed using PSPICE.

When the transient regime begins with non zero initial conditions this fact can be introduced in the program by the option UIC (use initial conditions).

The situation of the modelization of a complex network is shown in the Fig. 5.

The transient regime is triggered by closing the switch, meaning that phase one is grounded, as if a fault phase to ground is produced.

Resistor R17 has a value that is corresponding to the conditions of the fault.

Numerical Methods for Analyzing the Transients in Medium Voltage Networks 451

**4. Numeric simulation of transients triggered by faults in medium** 

Faults in medium voltage networks (MVN) generate transient regimes with duration depending on the networks parameters, on the contact type at the fault place and on the default type itself. The numeric simulation performed in this chapter is based on PSPICE and the transient regimes are caused by simple and double grounding faults, as well as, by the fault produced by a broken conductor, grounded towards the consumer. A fault of the type broken conductor grounded towards the source can be treated similar as the simple grounding fault, with an insignificant error, so shall be no more analyzed in the followings

The single line diagram of the MVN whose behavior is studied in case of transient caused


**voltage networks** 

(Sybille et al., 2000).

The elements that are important in the analysis are:





**4.1. The structure of MVN** 

by faults is presented in Fig. 7.

**Figure 7.** Single Line Diagram of the MVN

The MVN in Fig. 7 contains the following elements:

of infinite power supply and internal impedance zero,

**Figure 5.** MVN represented as a complex circuit in SPICE drawing

Currents and voltages can be represented, as on a "soft" oscilloscope, after solving the transient regime, using the elements of the V[t] matrix, calculated for each time step, and the resulting, calculated, currents values.

**Figure 6.** Current and voltages representation as SPICE output oscillogrames
