A VIRTUAL INSTRUMENT FOR DC POWER FLOW SOLUTION USING LABVIEW LANGUAGE

In this paper, we present a method for solving the power flow problem by the method of DC power flow using the graphical programming environment of LabVIEW as a virtual instrument (VI) suitable for contingency analysis. The DC power flow greatly simplifies the power flow by making a number of approximations including 1) completely ignoring the reactive power balance equations, 2) assuming all voltage magnitudes are identically one per unit, 3) ignoring line losses and 4) ignoring tap dependence in the transformer reactance. Hence the DC power flow reduces the power flow problem to a set of linear equations. The effectiveness of the method developed is identified through its application to a 6 buses test system. The calculation results show excellent performance of the proposed method, in regard to computation time and quality of results.


Introduction
The problem of power flow also said the problem of load balancing is crucial for anyone who operates a power grid and also in point of view network structures, to enhance, modify and adapt the network to consumer's load.
The operator requires having precise knowledge about behaviour of its network in the event of an incident, to take the optimal decision.In addition, the problem of load distribution is the fundamental problem of driving economic electric power systems.
The most accurate approach for modelling the steady state behaviour of balanced, three phase, electric power transmission networks is through the solution of the power flow.From the power flow solution, which contains the voltage magnitude and phase angles at each bus in the system, all other values can be derived, including the real and reactive flows on all the lines in the system.The power flow, which requires the iterative solution of a set of nonlinear algebraic equations, is typically taught in the junior or senior year of an electric power engineering curriculum.It is also considered the most heavily used tool by power system engineers.With modern computers the power flow for even a fairly large system, such as the NERC 43,000 bus model of the North American Eastern Interconnect, can often be solved in seconds.
Solving this problem has led many researchers to find ways easier and faster to improve their convergence, reducing the execution time and save a lot of computer memory.However, a "secret" well-known to practicing engineers is the power flow solution can often be maddeningly difficult to obtain, particularly when a good initial guess of the solution is not available.The "flat start" starting point taught to undergraduates for small systems rarely works when solving large, realistic systems.These convergence problems are especially troublesome when one tries to substantially change the operating point for a previously solved case, such as by scaling the load/generation levels.
There are several reasons for these solution difficulties.First, the nonlinear power balance equations themselves usually have a large number of alternative (low voltage) solutions, or, more rarely, no solution [1].So even when the power flow converges it may not have found the desired solution.Second, when using the common Newton-Raphson method the region of convergence for these solutions, including the desired high-voltage solution, is fractal [2], [3], [4].For stressed systems a "reasonable" initial guess might actually be in the region of convergence of a low voltage solution.Third, the power flow algorithm must not only solve the nonlinear power balance equations, but it must often determine the correct values for a large number of discrete and/or limited automatic controls.These controls values include generator AVR status, LTC and phase shifting transformer tap positions, discrete switched shunt reactive compensation values, the power flow on direct current (DC) lines, and more recently the values for FACTS devices.Further complicating the situation, the series impedance of the LTC and phase shifting transformers is often dependent upon the transformer's tap value.Last, the power flow models themselves are often "hard-coded" for a specified operating point.This hard-coding is particularly apparent with the values of fixed reactive shunts at buses, which usually represent manually switched capacitors, but is also apparent in the control settings for other devices such as phase shifting and LTC transformers, and generator voltage set point values.For example, scaling down the load/generation for a peak case, and then trying to resolve can be very problematic since the large amount of fixed, primarily capacitive, compensation quickly results in abnormally high voltages.

Power Flow
The calculation of the power flow [5] is used to determine: (1) the complex tensions at different buses, (2) the transmitted power from one bus to another, (3) the powers injected in a bus and (4) real and reactive losses in the power system.The calculation of the power flow in established steady state is based on the system of linear equation as follows: .
where I is the complex vector of injected currents into the network, Y is the matrix of complex admittances and V is the complex vector of voltages.
To resolve this system of linear equations, one must impose on each bus either the voltage or the injected current.Practically the problem is more complicated because we must define the operating conditions of the power system.These conditions affect the electrical quantities of the network buses such as: the real power P, reactive power Q, the voltage magnitude |V| and the phase angle δ , these can then be defined according to three types of buses: (1) Generation bus (or controlled voltage bus), (2) Load bus and Slack bus.

Variables Classification
The operation of a power system can be described according to six variables [6] for each bus in a power system: P chi , Q chi are real and reactive power consumed at bus i, respectively; P Gi , Q Gi are real and reactive power generated at bus i, respectively; V i is the voltage magnitude at bus i and δ i is the phase angle at bus i.
These variables are divided into three groups: (1) Uncontrollable variables: are the real and reactive powers related to the consumption; (2) Independent variables or control: are generally real and reactive power generated.and (3) Dependent variables or state variables: these are the magnitude and phase angle of voltage representing the state of the system.

Classification of Constraints
These constraints are related to the physical nature of the power system elements [7].We distinguish the constraints on the dependent variables, known as security constraint and constraints on the independent variables limits.These constraints must be checked at each load balance for optimization.
In steady state and at any time, equality between generation and load of real and reactive power must be done and can be provided by the following equations: where P L is the total real losses Q L are reactive losses, N c is the number of load buses and N g is the number of generation buses.

1) Constraint on the Voltage Modules
The operating conditions of a power system setting limit the maximum voltage by the dielectric strength of the material and the saturation of transformers and the minimum limits by the increasing of losses and maintaining the stability of the generators.For all buses, the necessary and sufficient condition is as follows:

2) Constraint on the Transit Capacity of the Line
The transmitte as fo e i-j, Q ij is the reactive ower .We limit the current for overload power system elements, one example of these constraints S ij is the apparent power transited in line i-j, S ij max is the maximum apparent power transited in the line i-j, P ij is the active power transited in lin p transited in line i-j.
From the constraints of transmitted power, we can determine the constraints of current corresponding to the lines and transformers and stability reasons.

3) Constraint of Independent Variables
These constraints are related to the physical nature of are the constraint on the generation, which is bounded above by the maximum power it can provide and below by the minimum.For all generation buses, the real and reactive constraints are:

Fast Decoupled Method
The Newton algorithm for solving the problem of power flow is considered as the most robust used in practice [8], [9].But the drawback is that the terms of the Jacobian matrix and the set of linear equations in Eq. ( 5), must be recalculated at each iteration.
  Since thousands of power flow solutions are often executed for planning or operating study, it was important to find ways to accelerate this process.The reference [10] is the development of a technique known as "the fast decoupled Newton method" according to [10], the Newton-Raphson method is simplified to Note that both Eq. ( 6) and Eq. ( 7) are based on the same matrix.These two matrices will be different with the further simplifications: 1. We simplify the relationship between ΔP and Δδ in Eq. ( 6) as follows:  Suppose that r ik <<x ik this will change -B ik to - 1/x ik .
 Neglecting all shunts reactance to the ground.
 Neglecting all shunts to the ground resulting from ionship between ΔQ and Δ|V| g all effects of transformers phase-e simplified equations are: auto-transformers.

DC Power Flow Formulation
cations, we a flat voltage for every bus i, Eq. ( 9) becomes 1 ' ' 1 Another simplification on power flow algorithm can be performed by neglecting simply any QV equation in Eq. ( 11) [6], [10].This gives a linear and non-iterative power flow algorithm.To achieve these simplifi The terms of the matrix B' are described above by Eq. ( 10) and Eq.(11).The DC power flow is used only to calculate the real power flow (MW) of transmission lines and transformers.It gives no indication of the voltages or on the re .(14) active power flow (Mvar) and apparent power VA power ow can be described by the followin (M ).
The power flow on each line using the DC fl g equation: Before moving on it is important to point out that one of the most obvious differences between the twothe lack of losses in the DC solution -can be reasonably compensated for by increasing the total DC load by the amount of the ac losses.Hence, in the DC approach the irst been creas proximately by calculating the state-independent LODF.ADVANCES estimated transmission system losses could be allocated to the bus loads.This requirement to first estimate the losses is usually not burdensome since the specified total control area "load" is actually the true load plus the losses.In this paper, when comparing the AC and DC solution results the DC solution load value has f in ed to match the total AC load plus losses.
Computationally the DC power flow has at least three advantages over the standard Newton-Raphson power flow.First, by just solving the real power balance equations its equation set is about half the size of the full problem.Second, the DC power flow is noniterative, requiring just a single solution of Eq. ( 15) and Eq. ( 16).Third, because the B' matrix is state-independent provided the system topology does not change it need only be factored once.Therefore, one would expect the DC power flow to be about ten times faster than the regular power flow for the initial solution, and even faster for subsequent solutions since solving for δ with a modified P would only require a forward/backward substitution.DC load flow can be used for contingency analysis where the computational speedups available by using linear approximations are even more dramatic.Linear methods for contingency analysis have been used for many years [11], [12].In the line outage distribution factor (LODF) approach [13] the effects of single and multiple device outages can be linearly ap , 0 his allows the contingencies to be linearly approximated many times faster than the approach of actually solving the power flow for the contingent nd buses data of any power system in the front panel of the virtual instrument.Figure 1 presents the front panel of VI that we have 7] and [6].The simulated the same system with the Newton-Raphson method in MATLAB shown in Tab. 2 with a maximum power mismatch equal to 3,7•10 -5 MW in 3 iterations.where Δf l is the change in MW flow on line l following the outage of line k, and f k 0 is the original flow on line k before it was outages.The LODF vector d k contains the LODFs for all monitored lines.Similar values can also be calculated for line opening (closure) contingencies.Since the LODFs are state independent, they can be calculated once and used many times for contingency analysis.Once the factored B' matrix is available, the computation requirements to calculate each LODF vector are proportional to a fast forward/full backward substitution.
T system.

The DC Load Flow VI
According to DC load flow approximation, we have programmed a virtual instrument using LabVIEW [14], [15], [16] which can be used to calculate the DC load flow by introducing line a programmed in LabVIEW.

Case Study and Results
To demonstrate the performance of the proposed DC power flow program for solving the power flow, we have taken a 6-buses test system from [1 s n is obtained by the VI developed with LabVIEW language where the front panel and the graphical program is shown in Fig. 1 and 2, respectively.
The system contains 6 buses, bus and lines data for this test system are shown in Fig. 3 and 4. The results are shown in Fig. 5 and Tab. 1.To enable a comparison with [17], we olutio    Tab.1: DC power flow results of six buses test system by increasing the real power of load at buses 4, 5 and 6 by AC losses, respectively.

DC load flow solution
Injected real power P ij (

Conclusion
The importance of studying and evaluation the power flow in a power system is crucial to obtaining a state of network; for this purpose, we developed a program based on DC power flow method for solving the power flow using LabVIEW.
The program has given very satisfactory results, through its application to solve a test system of 6 buses, which explore the performance of the algorithm.
The results showed that the differences in power flow results between the DC power flow and the AC power flow are satisfactory, which checks the validity of this virtual instrument.Concerning execution time, the performance of our method is faster than the reference [17] and [6] because it is a direct and not iterative solution.In the future, we will focus mainly on the conception of such virtual instrument using DC power flow for contingency analysis.

Fig. 1 :
Fig. 1: Front panel of DC load flow VI using LabVIEW.

Fig. 2 :
Fig. 2: Graphical program of DC load flow VI using LabVIEW.

Fig. 3 :
Fig.3: Bus data of six bus test system by increasing the real power of load of buses 4, 5 and 6 by AC losses at a time.

Fig. 5 :
Fig. 5: DC power flow results by increasing the real power of load at bus 4 by AC losses.

Tab. 2 :
Power flow results of six buses test system using Newton-Raphson with MATLAB.