Understanding Power Quality Based FACTS Using Interactive Educational GUI Matlab Package

The electricity is invisible and the complexity of mathematical models deviate the graduate students attention from well understanding the underlying main concepts. Interactive educational power system software has become a fundamental teaching tool because it helps in particular the undergraduate students to assimilate theoretical issues and complex models analysis through flexible graphic visualization of data inputs and the results (Abur et al., 2000), (Milano, F., 2005). From the educational point of view software developed for educational purposes should be flexible and interactive, easy to use and reliable. In particular, software for power system education should contain a user interface not only to allow graduate student to analyse and understand the physical phenomena, but also to improve the existing models and algorithms (Mahdad, B., 2010 ). Flexible AC Transmission Systems (FACTS) philosophy was first introduced by Hingorani (Hingorani N. G., and Gyugyi L, 1999) from the Electric power research institute (EPRI) in the USA in 1988, although the power electronic controlled devices had been used in the transmission network for many years before that. The objective of FACTS devices is to bring a system under control and to transmit power as ordered by the control centers, it also allows increasing the usable transmission capacity to its thermal limits. With FACTS devices we can control the phase angle, the voltage magnitude at chosen buses and/or line impedances. The avantages of the graphical user interface tool proposed lie in the quick and the dynamic interpretation of the results and the interactive visual communication between users and computer solution processes. The physical and technical phenomena and data of the power flow, and the impact of different FACTS devices installed in a practical network can be easily understood if the results are displayed in the graphic windows rather than numerical tabular forms (Mahdad, 2010). The application programs in this tool include power flow calculation based NewtonRaphson algorithm, integration and control of different FACTS devices, the economic dispatch based conventional methods and global optimization methods like Parallel Genetic Algorithm (PGA), and Particle Swarm Optimization (PSO). In the literature many educational Graphical tools for power system study and analysis developed for the purpose of the power system education and training (Milano et al., 2005).


Introduction
The electricity is invisible and the complexity of mathematical models deviate the graduate students attention from well understanding the underlying main concepts. Interactive educational power system software has become a fundamental teaching tool because it helps in particular the undergraduate students to assimilate theoretical issues and complex models analysis through flexible graphic visualization of data inputs and the results (Abur et al., 2000), (Milano, F., 2005). From the educational point of view software developed for educational purposes should be flexible and interactive, easy to use and reliable. In particular, software for power system education should contain a user interface not only to allow graduate student to analyse and understand the physical phenomena, but also to improve the existing models and algorithms (Mahdad, B., 2010 ). Flexible AC Transmission Systems (FACTS) philosophy was first introduced by Hingorani (Hingorani N. G., and Gyugyi L, 1999) from the Electric power research institute (EPRI) in the USA in 1988, although the power electronic controlled devices had been used in the transmission network for many years before that. The objective of FACTS devices is to bring a system under control and to transmit power as ordered by the control centers, it also allows increasing the usable transmission capacity to its thermal limits. With FACTS devices we can control the phase angle, the voltage magnitude at chosen buses and/or line impedances. The avantages of the graphical user interface tool proposed lie in the quick and the dynamic interpretation of the results and the interactive visual communication between users and computer solution processes. The physical and technical phenomena and data of the power flow, and the impact of different FACTS devices installed in a practical network can be easily understood if the results are displayed in the graphic windows rather than numerical tabular forms (Mahdad, 2010). The application programs in this tool include power flow calculation based Newton-Raphson algorithm, integration and control of different FACTS devices, the economic dispatch based conventional methods and global optimization methods like Parallel Genetic Algorithm (PGA), and Particle Swarm Optimization (PSO). In the literature many educational Graphical tools for power system study and analysis developed for the purpose of the power system education and training (Milano et al., 2005).

Fig. 1. Strategy for understanding power quality based FACTS technology
To carry out comprehensive studies on FACTS devices, to understand the basic principle of FACTS devices, and to determine the role that FACTS technology may play in improving power quality, it is mandatory to have an interactive educational tool using graphic user interface based Matlab, this is the main object of this chapter. This chapter is limited to show how the simplified software package developed works by showing the effects of the introduction of different FACTS devices like shunt Controllers (SVC, STATCOM), series Controllers (TCSC, SSSC) and the hybrid Controllers (UPFC) on a practical network under normal and abnormal situation. Fig.1 shows the strategy for understanding power quality based FACTS technology using an interactive graphical user interface (GUI).

Basic principles of power flow control
To facilitate the understanding of the basic principle of power flow control and to introduce the basic ideas behind the different type of FACTS controllers, the simple model shown in Fig. 2 is used (Mahdad, B., 2010). The sending and receiving end voltages are assumed to be fixed. The sending and receiving ends are connected by an equivalent reactance, assuming that the resistance of high voltage transmission lines is very small. The receiving end is modeled as an infinite bus with a fixed angle of 0°.
Where S V and R V are the magnitudes of sending and receiving end voltages, respectively, while δ is the phase-shift between sending and receiving end voltages. Fig. 3 shows the evolution of the active power delivered. It's clear from the demonstrated equations, that the active and reactive power in a transmission line depend on the voltage magnitudes and phase angles at the sending and receiving ends as well as line impedance.

Example of power flow control
The concepts behind FACTS controller is to enable the control of three parameters which are: 1. Voltage magnitude (V) 2. Phase angle (δ) 3. And transmission line reactance (X) in real-time and, thus vary the transmitted power according to system condition. The different operation mode can be obtained by appropriately specifying pq V and q I in the generalized schematic power flow controller is shown in Fig. 5. Case 1 Power flow controller is off. Then the power transmitted between the sending and receiving end generators can be expressed by: Where δ is the angle between the sending and receiving-end voltage phasors. Case 2 Assume that 0 q I = and pq Vj k X I =− , the voltage source acts at the fundamental frequency precisely as a series compensating capacitor. The degree of series compensation is defined by coefficient k ( 0 1 k ≤≤), the relationship between P and δ becomes: Case 3 The reactive current source acts like an ideal shunt compensator which segments the transmission lines into independent parts, each with an impedance of X/2, by generating the reactive power necessary to keep the mid-point voltage constant, independently of angle δ, for this case the relationship between P and δ becomes:  Case 4 The basic idea behind the phase shifter is to keep the transmitted power at a desired level independently of angle δ in a predetermined operating range. Thus for example, the power can be kept at its peak value after angle δ exceeds π/2, by controlling the amplitude of quadrature voltage pq V . Fig. 6 shows the evolution of active power transit based different compensation types.

Role of FACTS devices in power system operation and control
To further understand the strategy of FACTS devices in power system operation and control, consider a very simplified case in which generators at two different regions are sending power to a load centre through a network consisting of three lines. Fig. 7 shows the topology of simple electrical network, suppose the lines 1-2, 1-3 and 2-3 have continuous ratings of 1000MW, 2000MW, and 1250MW, respectively, and have emergency ratings of twice those numbers for a sufficient length of time to allow rescheduling of power in case of loss of one of these lines (Hingorani, N. G., and Gyugyi L, 1999). For the impedances shown, the maximum power flow for the three lines are 600, 1600, and 1400, respectively, as shown in Fig. 7, such a situation would overload line 2-3 (loaded 1600 MW for its continuous rating of 1250 MW), and there for generation would have to be decreased at unit 2, and increased at unit 1, in order to meet the load without overloading line 2-3. The following simplified studies cases demonstrate the main objective of integration of FACTS technology in a practical power system to enhance power system security.

Case 1: Capacitive Series Compensation at line 1-3
If the dynamic series FACTS Controller (type capacitive)installed at line 1-3 adjusted to deliver a capacitive reactance, it decreases the line's impedance from 10Ω to 4.9919Ω, so that power flows through the lines 1-2, 1-3, and 2-3 will be 250 MW, and 1750 MW, respectively. Fig. 8 illustrates the per cent loading of lines. It is clear that if the series capacitor is adjustable, then other power flow levels may be realized in accordance with the ownership, contract, thermal limitations, transmission losses, and wide range of load and generation schedules. Fig. 8 shows clearly the effect of series capacitive compensation to control the active power flow with another degree of compensation ( 6 C X =Ω  If the dynamic series FACTS Controller (type inductive) installed at line 2-3 adjusted dynamically to deliver an inductive reactance, it increase the line's impedance from 5 Ω to 12.1Ω, so that power flows through the lines 1-2, 1-3, and 2-3 will be 248.  It is clear from Fig. 9 and Fig. 10, that if the series inductance is adjustable, then other power flow levels may be realized in accordance with the ownership, contract, thermal limitations, transmission losses, and wide range of load and generation schedules.

www.intechopen.com
Understanding Power Quality Based FACTS Using Interactive Educational GUI Matlab Package

215
As we can see from simulation results depicted in different Figures; the location of series FACTS devices affect significtly the perfermances of power system in term of lines loading and total power losses.

Basic types of FACTS controllers
In general, FACTS Controllers can be classified into three categories (Hingorani, NG., and Gyugyi L, 1999) :

a. Series Controllers
In Fig. 12 the series controllers could be variable impedance, such as capacitor, reactor, etc., in principle; all series controllers inject voltage in series with the line. Even variable impedance multiplied by the current flow through it, represents an injected series voltage in the line. As long as the voltage is in phase quadrature with the line current, the series Controller only supplies or consumes variable reactive. In principle, all shunt controllers inject current into the system at the point of connection. Even a variable of shunt impedance connected to the line voltage causes a variable current flow and hence represents injection of current into the line (Mahdad, 2010).

c. Hybrid Controllers (Combined series-shunt)
This could be a combination of separate shunt and series compensators, which are controlled in coordinated manner, or a unified power flow with series and shunt elements. www.intechopen.com

Electrical Generation and Distribution Systems and Power Quality Disturbances 216
In Fig. 14 combined shunt and series controllers inject current into the system with the shunt part of the controller and voltage in series in the line with the series part of the controller. However, when shunt and series controllers are unified, there can be a real power exchange between the series and shunt controllers via the power link (Achat et al., 2004).

FACTS modeling
Since their apparition, many models of FACTS devices are proposed by researchers to improve the power quality delivered to consumer, the proposed models are integrated in the standard power flow problem, and to the optimal power flow problem. The objective of this section is to investigate the integration of many types of FACTS controllers (shunt, series, and hybrid Controllers) in a practical electrical network to enhance the power quality.

Static VAR Compensator (SVC)
The steady-state model proposed by Acha et al. (Achat et al., 2004) is used here to incorporate the SVC on the standard power flow problems based Newton Raphson. This model is based on representing the controller as a variable impedance, assuming an SVC configuration with a fixed capacitor (FC) and Thyristor-controlled reactor (TCR) as depicted in Fig. 15, the controlling element is the Thyristor valve. The thyristors are fired symmetrically, in an angle control range of 90 to 180 with respect to the capacitor (inductor) voltage. Fig. 16 shows the two SVC models basic representation. The UPFC equivalent circuit described in Fig. 17

Thyristor Controlled Reactor (TCSC)
The TCSC power flow model presented in this section is based on the simple concept of a variable series reactance, the value of which is adjusted automatically to constrain the power flow across the branch to a desired value. The amount of reactance is determined efficiently using Newton's method. The changing reactance shown in Fig. 18 represents the equivalent reactance of all the series connected modules making up the TCSC, when operating in either the inductive and capacitive region. The equivalent reactance of line ij X is defined as: Where, line X is the transmission line reactance, and TCSC X is the TCSC reactance. The level of the applied compensation of the practical TCSC usually between 20% inductive and 80% capacitive.

Understanding power quality based FACTS controllers using FACTS Simulator (SimFACTS Power Flow package)
The advantages of the proposed graphical user interface tool lie in the quick and the dynamic interpretation of the results and the interactive visual communication between users and computer solution processes. The physical and technical phenomena and data of the power flow, and the impact of different FACTS devices installed in a practical network can be easily understood if the results are displayed in the graphic windows rather than www.intechopen.com  In the literature many educational Graphical tools for power system study and analysis developed for the purpose of the power system education and training (). This section reveals how the software package developed works by showing the effects of the introduction of different FACTS devices like the SVC, STATCOM, TCSC, SSSC and the UPFC Controllers. Fig. 20 shows the global functionality of the package graphical user interface based Matlab as a tool to demonstrate the impact of FACTS devices on power system operation and control.

Structure of SimFACTS
A working main screen appears as shown in Fig. 20  The Newton-Raphson algorithm modified based on the FACTS models and used to calculate all the necessary electrical values involved on the power flow study. The simple software proposed is capable of doing simulations for several models of FACTS controllers at different power system situation.

Graphic User Interface tool (GUI)
The MATLAB graphical user interface development environment, provides a set of tools for creating graphical user interfaces (GUIs). These tools greatly simplify the process of designing and building GUIs. We can use the GUIDE tools to: Lay out the GUI. Using the GUIDE Layout Editor, the user can lay out a GUI easily by clicking and dragging GUI components such as panels, buttons, text fields, sliders, menus, and so on into the layout area. GUIDE stores the GUI layout in a FIG-file.

Program the GUI
GUIDE automatically generates an M-file that controls how the GUI operates. The M-file initializes the GUI and contains a framework for the most commonly used callbacks for each component the commands that execute when a user clicks a GUI component. Using the Mfile editor, we can add code to the callbacks to perform the functions the user want. Fig. 22 shows the structure of the object, Fig. 23 shows the different Object contained in a GUI.

Power flow program based FACTS (SimFACTS)
The interactive FACTS program proposed is implemented in a MATLAB environment, using the GUI tool; the Simulator is capable of doing simulations for several models of FACTS Controllers. First the program allows users to choose the working language (French, Arabic or English) Fig. 21 shows the global interface to simulate the integration of different FACTS Controllers in a practical network. The user may either retrieve an existing presaved system data or start a new system formulation; due to the limited pages we only present an example of UPFC interface description. Fig. 24

Simulation test and results using SimFACTS
The FACTS models integrated in the proposed educational power system control are those proposed by (Achat et al., 2004), and by Canizares (Canizares, C. A, at al., ). The Newton-Raphson algorithm is used to calculate all the electrical values involved in power system.. The FACTS simulation package is capable of doing interactive simulations for several types of controllers as shown in Table 1.
Using this simplified and interactive program, user can easely understand the basic concept of this new technolgy based FACTS devices introduced to power system operation and control. During simulation user can access directly to the code source program of any desired function (Ybus, Newton-Raphson, SVC Model, STATCOM model, TCSC Model, UPFC Model, Graphic functions,) , user also can modify the content of existant models, and test the efficiency of the modiefd models.  Table. 1. List of FACTS models used in the first version (V1.0) of the SimFACTS package

Demostration example using SVC controller
The two SVC models based susceptance values and firing angle are included in the FACTS Simulator; the two models can be applied to a different practical power systems (smal, medium and large test systems). To understand the real contribution of the shunt FACTS controller (SVC) to enhance the power quality, the shunt controller integrated in a practical modified electrical network, IEEE 30-Bus. Voltage deviation ( V Δ ) power loss ( loss P ), active power branch flow ( ij P ), and system loadability ( λ ), are the indices of power quality considred to demonstrate the improvement of power quality, to validate the flexibilite, and the simplicity of the proposed educational SimFACTS package based Matlab. Fig. 25 shows the improvement of voltages profiles using multi SVC controllers installed at 8 buses. Fig. 26 shows the evolution of voltage profiles at all buses based continuation power flow without SVC integration, the loading factor is 2.9449 p.u. By integration SVC Controllers at 8 critical buses, the loading factor improved to 3.1418 p.u. Fig. 27 shows clearly the contribution of shunt FACTS controllers to improve the power system loadability. Details results related to the integration of series controllers (TCSC, SSSC) and hybrid controllers (UPFC) will be given in the next contribution.

Results discussions
The effeciency of the integrated of multi SVC controllers at different location is tested at normal condition and at critical situations. 1. Voltage magnitude is one of the important indices of power quality. For a secure operation of the power system, it is important to maintain required level of security margin.

www.intechopen.com
Electrical Generation and Distribution Systems and Power Quality Disturbances 228 2. One might think that the larger number of FACTS devices integrated in a practical power systems, the greater increase in the system loadability, based in experience, this supposition is not always true, there is a maximum increase on load margin with respect to the compensation level (number and size of FACTS devices). 3. System loadability analysis: To guide the decision making of the expert engineers, the power flow solution with consideration of FACTS devices should take in consideration the critical situation due to severe loading conditions and fault in power system, so it is important to maintain the voltage magnitudes within admissible values at consumer bus under abnormal situation (load increase and contingency). 4. Power loss analysis: Power loss is also an important indice used by expert engineers in power system operation and planning. Based on experience and simulation results, it is not always true that the larger number of FACTS devices integrated in a practical power systems, the greater decrease in power loss. Optimal location and coordination between multi types of FACTS devices is an important research axes. 5. Optimal location of FACTS devices is not introduced in this first version of SimFACTS, user can choose, number and location of FACTS devices based on his personal experience, for example in this case study we can get the same power quality indices (power loss, voltage deviation, and system loadability) using only three SVC Conrollers installed at critical buses.

Conclusion
This chapter discusses the development of an educational simulator for the FACTS devices. The motivation of this first version of simulator is to provide the undergraduate engineers students with a simple and flexible tool about the principle of FACTS modelling and the contribution of FACTS devices to enhance power quality. The simulator has been developed under the simple graphic user interface (GUI) from MATLAB program. In this first version the user can edit, modify and save the FACTS parameters proposed for each type of Controllers in a specified file (Data) and choose location of different FACTS based on the results given by power flow and his personnel practical experience. Power quality analysis based series FACTS devices (TCSC Model), and Hybrid devices (UPFC Model) can be demostrated using the same strategy, due to the limited chapter length, new results related to these devices will be given in details with the next new chapter. The utilization of renewable energy sources such as wind energy, or solar energy, among others, is currently of greater interest. Nevertheless, since their availability is arbitrary and unstable this can lead to frequency variation, to grid instability and to a total or partial loss of load power supply, being not appropriate sources to be directly connected to the main utility grid. Additionally, the presence of a static converter as output interface of the generating plants introduces voltage and current harmonics into the electrical system that negatively affect system power quality. By integrating distributed power generation systems closed to the loads in the electric grid, we can eliminate the need to transfer energy over long distances through the electric grid. In this book the reader will be introduced to different power generation and distribution systems with an analysis of some types of existing disturbances and a study of different industrial applications such as battery charges.