Afaifia Ammar
Department of Electrical Engineering; Faculty of Science Engineering
University of Badji Mokhtar-Annaba
E-mail: Afaifia_ammar@hotmail.fr
Abstract
The objective of this work is devoted to the development of a software under
Matlab for the analysis of the electrical supply networks by the Newton-Raphson method.
During the analysis of the flows of energy in the electrical supply networks [6], this method
enables us to define the values of the currents, the active and reactive powers, the active
and reactive power losses, and the power-factor of the electrical supply network for
different loads. It also enables us to determine the degree of stability of the network,
following disturbances such as the loss of a line of transport, the sudden release of an
alternator, the accidental cut of an important load.
The results of the analysis define us the location of the capacitor batteries in order
to reduce the energy losses or to improve the plan of the voltage.
This software make it possible to evaluate the impact of the projects on the current
network and its future evolution, as well at the time of the design as at the time of additions
of new installations, to dimension the equipment, to determine the adjustment of
protections, to analyse the electric phenomena which often require the calculation of the
voltages and the currents of the networks and thus to contribute to the optimal use of
different types of generators.
Introduction
The electrical supply network consists of generators representing the supply of electric energy. They
can provide an active power and to provide or absorb a reactive power in some limit. The most
important groups of the network try to maintain on their terminals a level of voltage and frequency
given.
The electric charge characterises the consumption of the energy which is the fact of all the
economic sectors. It is presented in various forms: synchronous motors and asynchronous, lighting and
heating appliances etc. It is the whole of consumption in a node of the network which constitutes the
Analysis of the Electrical Supply Networks by the Newton-Raphson Method 319
load of substitution characterising this node [1]. We suppose that the load consumes an active power
and a constant reactive power. The reactive power can be positive or negative.
Since at the beginning the losses in the network are not known, we cannot impose an active
power in all the nodes. It is necessary thus a particular node called ““node beam”” on which the active
power could not be imposed [5], but will result from calculation.
For each node, it is necessary to thus impose two values P and Q or the module of the voltage
and phase angle. The unknown factors are the voltages of the generators and the loads. The known
elements are the characteristics of the network, i.e. impedances or admittances, the loads of the nodes
and the generators. However, it is more convenient to work with the admittances rather than with
impedances [5]. In this form, this problem is insoluble. It is thus necessary to arbitrarily fix a level of
voltage in the network. This reference of voltage is expressed in magnitude; in addition one still needs
a reference of phase. Often we make the reference voltage to the node beam [10], at the boundaries of
which we impose the magnitude of the voltage and the phase angle took naturally to zero.
2
I12
J1 O
I13
3
1 I15
5
In accordance with the first law of Kirchhoff we can write the following relation:
J 1 = I 12 + I 13 + I 14 + I 15
Each current I depends on the potential difference between the Kth one and the reference node.
(U −U )Y (U −U )Y (U −U )Y (U −U )Y
J1 = 1 2 12 + 1 3 13 + 1 4 14 + 1 5 15 ; 3J1 =(U1 −U2)Y12 +(U1 −U3)Y13 +(U1 −U4)Y14 +(U1 −U5)Y15
3 3 3 3
3J1 =U1(Y12 +Y13 +Y14 +Y15) −Y12U2 −Y13U3 −Y14U4 −Y15U5
We obtain thus the equation of node 1 in the following form:
3 J1 = Y11U1 − Y12U 2 − Y13U 3 − Y14U 4 − Y15U 5
In the same way for node 2;
3J 2 = −Y21U 1 + Y22U 2 − Y23U 3 − Y24U 4 − Y25U 5 . And so on, until we obtain at the end a system
of equation whose matrix form is:
[Y] [U] =√3 [J] (1)
[J]: vector of the currents injected with the nodes;
The matrix [Y] of order (n+1) called indefinite matrix by the fact that no access of the network
was referenced. This matrix can systematically be written either by inspection of the circuit with for
affected elements non-diagonal Yij all of the minus sign and equal to the sum of the admittances
connected between nodes I and J:
1
Yij = −Yl = − (2)
Zl
Z l - Impedance of the branch i-j;
For the diagonal elements, Yii equal to the sum of the admittances of the incidental branches out
of i:
n +1
Yii = ∑ Yl = −∑ Yij (3)
j =1
i≠ j
That is to define it by computer as for the case considered, by the development of software
under Matlab, allowing us to obtain the required matrix.
If the consumption by an electric receiver or provided by a generator to the node K is constant,
therefore the nodal current is equal to:
Sˆ K
J& K (U K ) = (4)
3Uˆ K
Analysis of the Electrical Supply Networks by the Newton-Raphson Method 321
If an unspecified access is referred for example to (n+1). With the elimination of the last
equation of the system (1) and by taking account of the relations (2) and (3), we obtain in matrix form
the following system:
YN (U& − U& b .n) = 3J& (5)
U Vector of the nodal voltage;
YN - definite matrix of order (n) or stamps nodal admittance;
U b - voltage of the reference node ,
n – Unit vector;
YbU& b − the vector of current, for the Kth element equalizes with YkbU& b .
In generalized form, the equation of the kth node of the relation (5) is written as follows:
n+1
Sˆ
w& k = YkkU& k + ∑YkjU& J − k = 0 (6)
j =1 k Uˆ
j ≠k
k=1, 2… n;
The matrix of the conductance [G] is equal to the real component of the matrix of the
admittance [Y], and stamps it succeptance [B] equal to the component of imaginary preceded by the
minus sign;
Ua, Ur components active and reactive of the nodal voltages;
P and Q active and reactive power of the nodes (generators and loads);
The equations of the system obtained above are nonlinear in voltage. Because of nonlinearity,
this system is impossible to solve directly. With this intention an iterative process of resolution is then
necessary. The process, most usually used is founded on the method of linearization of the nonlinear
equations of Newton-Raphson [2] and whose algorithm amongst other things consists in linearizing the
function considered and to take the point of cancellation of this linearization like approximation of the
required root. This method applies to equations of the type f ( x) = 0 , having a derivative f ′(x) .
However, if the estimated x1 is an approximate value of the true root and that x 2 = x1 + Δx , we must
seek using the method of Newton-Raphson the increase which it is necessary to give to x1 of kind so
that f ( x 2 ) = f ( x1 ) + Δx .
If x (n ) is estimated near to the solution x of the equation f(x)=0 and since the Newton-
Raphson method resides in its quadratic convergence, i.e. the error with the nth step is proportional to
the square of the error of the preceding step, then the square of the error (ε ( n ) = x − x ( n ) ) and the terms
of higher degrees are negligible. In addition, since we know that f ( x ) = 0 , we obtain an approximate
value then: f ( x ( n ) ) + f ′( x ( n ) )( x − x ( n ) ) = 0 .
An approximation of the error:
f ( x ( n) )
ε (n) = ( x − x (n) ) = − (9)
f ′( x ( n ) )
We can thus consider that the best estimated solution x will be:
x ( n +1) = x ( n ) + ε (10)
From the two last relations, we obtain the algorithm of Newton-Raphson for an equation
F (X) =0 in the form:
( n +1) f ( x ( n) )
x =x −(n)
(11)
f ′( x ( n ) )
However, like all the iterative procedures, the Newton-Raphson method requires for a criterion
to determine if the solution converged. For this purpose, we can measure the difference between the
two last computed values while putting an end to the iteration when this difference is lower than ε
efines as a preliminary. In other words, the solution x ( n +1) must satisfy the criterion known as of the
difference:
x ( n +1) − x ( n ) 〈ε
Taylor series:
W ( X ) = W ( X ( n ) ) + J ( X ( n ) )( X − X ( n ) ) + ....
With the nonlinear operator: W ( X ) = [ w1 ( x ), w2 ( x),........ ...., wn ]T and J ( X (n ) ) being Jacobi [1]
such as:
∂w1 ∂w1 ∂w1
..........
∂x1 ∂x 2 ∂x n
∂w2 ∂w2 ∂w
(13)
∂W .......... 2
J(X ) = = ∂x1 ∂x 2 ∂x n
∂X
.................... ............
∂wn ∂wn ∂w
......... n
∂x1 ∂x 2 ∂x n
On the following iteration by neglecting the terms higher than two of the development of
Taylor, we can write:
W ( X ( n +1) ) = W ( X ( n ) ) + J ( X ( n ) )( X ( n +1) − X ( n ) ).
If X ( n +1) is a solution sufficiently close to the true solution, we obtain an approximate value
then:
W ( X ( n ) ) + J ( X ( n ) )( X ( n +1) − X ( n ) ) = 0 ,
as well as the formula known as ““algorithm of Newton-Raphson”” in the form according to:
Analysis of the Electrical Supply Networks by the Newton-Raphson Method 323
X ( n +1) = X ( n ) − [ J ( X ( n ) )]−1 (W ( X ( n ) ))
and of which the flow chart is represented below.
We will note that one can avoid the inversion of Jacobi, by solving on each iteration the linear
equation of Newton-Raphson:
J ( X ( n ) ) X ( n +1) = J ( X ( n ) ) X ( n ) − W ( X ( n ) ) ⇒ , J ( X ( n ) )( X ( n +1) − X ( n ) ) = −W ( X ( n ) )
in the traditional form:
n
∂wi r r r
∑j =1 ∂xj
( X ).Δx j = − w j ( X )
We then obtain a linear system of n equations with n unknown elements which are components
r
of the vector ΔX It any more but does not remain to solve this system. The linear systems are
relatively simple to solve precisely because of the linearity of the equations. For our case we use the
direct method known as of the pivot of Gauss [5]. This method is simplest and most traditional. It is
easy to program.
Data
Determination of
Network parameters
Initialisation
x1. . . . . . . . . . .x2
Determination of second
system vector
r
bi = − wi (X )
Determination of Jacobi
⎛ ∂w r ⎞
J = ⎜ i (X )⎟ iter=iter+1
⎜ ∂x ⎟
⎝ j ⎠
r
ΔX < ε
No
Yes
Convergence
Determination
X ( n −1) = X ( n Oui
)
+ ΔX ( n )
Matlab is a high level scientific language for the development of algorithm. The use of Matlab
makes it possible to solve the problems of calculation more quickly than with the traditional languages
such as the language C, C++ or FORTRAN, because it is not necessary to carry out the spots of
programming like the declaration of the variables, the specification of the types of data and the
allowance of the memories. The Matlab language places at our disposal the vectorial and matrix,
fundamental operations for the problems of engineering.
admittances Y, it indicates that the connection is between the first index and the second index. The
definite current of the branch kj according to the Ohm law is expressed by the following relation:
U& −U& 1
I&KJ = K J = − (U&K −U& J )YKJ (14)
3ZKJ 3
U& , U - voltage respectively made up of the nodes K and J;
K j
While taking into account which the voltage and the admittance can be respectively represented
& Y& = g kj − bkj
in the following form: U k = U a + jU rk ; kj ,We obtain the components active and reactive
current of branch:
1 1 1 1
I akj = − (U ak − U aj ) g kj − (U rk − U rj )bkj I rkj = (U ak − U aj )bkj − (U rk − U rj ) g kj
3 3 3 3
Power at the beginning of branch considered KJ:
S&1kj = 3U&k Iˆkj =−U&k (Uˆk −Uˆ j )Yˆkj (15)
Whereas the power on arrival is:
S& 2 kj = 3U& j Iˆkj = −U& j (Uˆ k − Uˆ j )Yˆkj (16)
Powers losses in the element kJ:
ΔS& kj = S&1kj − S 2 kj
ΔS& = −(U& − U& )(Uˆ − Uˆ )Yˆ
kj k j k j kj
2
ΔS& kj = − U& k − U& j Yˆkj (17)
Total power losse in the network considered:
ΔS& = ΔP + jΔQ = Uˆ . Yˆ U&
Σ Σ
T
Σ [ ][ ] [ ] (18)
&
While taking into account that: Y = G − jB U = Ua + jUr ,
The preceding relation enables us to obtain the following expressions for the calculation of the
total losses active and reactive power in the network:
ΔPΣ = [Ua ][
. G ][
. Ua ] + [Ur ][
. G ][
. Ur ]
T T
(19)
ΔQΣ = [Ua ][
. B ][
. Ua ] + [Ur ][
. B ][
. Ur ]
T T
(20)
Discussions
After the numerical application, we note that the number of iteration is reduced to three iterations.
The powers which forward by the branches are directly deduced starting from the result from
convergence, thus on the one hand we can judge profitability of the network as a whole (economic
aspect) and on the other hand the currents obtained, inform us on the degree of saturation of the lines of
transport and the power transformers in time in accordance with the increase in load in the network per
year.
Conclusion
In this work, we presented the Newton-Raphson method generalized for the resolution of the nonlinear
systems of equations of the electrical supply networks, whose size and complexity became so
important that the analysis is completely impossible without the data-processing assistance of tools for
simulation. Then the evolution of the methods of programming and the performances of the operating
systems of the computers, allowed us the design of an algorithm of simulation whose generated results
enable us to analyze and to interpret the behavior of the networks for the operation considered by the
studied method. It is noted that the process converged at the end of three iterations. The program thus
conceived was implemented in Matlab. To the beginning after the choice of the standard of
convergence ε, we proceeded to estimates of the unknown variables (component active and reactive of
the voltages of the nodes and generators) like initial variables, because it is well-known that the
Newton-Raphson- Newton method has very good properties of convergence if the initial solution is
close to the exact solution. Finally, an intermediate stage of linearization is necessary. Indeed, the
nonlinear problem is transformed into a series of linear problems so that linear solutions converge
towards the desired nonlinear solution. At summer also presented the calculation of the flow
parameters, whose result determines the state of the network in permanent mode. The flexibility of the
worked out software, enables us to analyze the network under severe conditions of operating such as
overload, losses of power as well as optimal management in real time of the groups of production of
electrical energy. The program thus conceived was tested on microcomputer under Matlab. Its
application can be extended to other fields.
328 Afaifia Ammar and Debbache Nasr eddine
References
[1] VENIKOF V.A., energy electro Systems in exercises and illustration, Mr., ENERGY, 1983, pp.
143-147, pp. 207-229.
[2] Mr. BOUMAHRATI, A. GOURDIN, numerical Methods applied, O.P.U., 1993, pp. 46-47, p
49.
[3] A. AFAIFIA, statistical dynamic stability of the complex electro-energy systems Analyzes.
Thesis of magister, Annaba, 1989.
[4] KRILOF B.I., BOBKOF V.V., MONASTIRNI P.I. numerical Methods, tome1, SCIENCE,
1976, pp. 207-210.
[5] STROEV V.A., Method of calculation of the equations of the steady operation of the electric
systems, M, MEI .1998.
[6] S. Touahri, Mr. Babes, H. Kateb, H. Labar, method of experimental design (MPE) in the
improvement of the technico-economic indices of the electrical supply networks H.T., African
newspaper off science and technology (AJST) .Science and Engineering Series Vol.7, N°2, pp.
1-7.
[7] VENIKOF V.A., calculations and analyze modes of exploitation of the networks, Mr.,
ENERGY, 1974.
[8] Weber, J.D., Implementation of Newton power-based optimal a power system simulation
environment, Master Thesis, University off Illinois, Department off Electrical and Computer
Engineering, January 1997.
[9] J.J. Grainger and W.D. Stevensen, Power System Analysis, New York, NY: McGraw Hill, Inc.,
1994, pp. 33-330.
[10] D.G. Luenberger, Linear and Non-Linear Programming, Reading, MA: Addison-Wesley
Publishing Company, 1984, pp. 138-145.