Power System Analysis Using LabVIEW i

The focus of this work is on investigation of LabVIEW electric power tool in particular and LabVIEW software in general for the analysis and design of electric power systems. Here we are targeting the solution of different electrical engineering problems which we very often face in teaching the course of power system analysis. At the time being, at Zarqa University, we are preparing a self study report for submission to ABET for accreditation of electrical engineering program. ABET considers that the application of different software tools during the learning process is essential and must be covered. Thus, power system analysis course has been selected as one of the courses that are decided to reach this outcome. As a result of that, a literature survey was conducted and several relevant topics were selected to be investigated. This included the following: simulation of on-line measurement RMS of electric power, on-line of components, analysis to find phasor magnitude and phase angles, conversion of star to delta and delta to star configurations, and simulation of rotating phasors. All designed virtual instruments were analyzed, tested, and chosen solved examples gave very accurate results.


Introduction
Implementation of LabVIEW in power system analysis is presented in several papers. Two of the early relevant works are the researches [1] and [2]. In paper [1] we find a short introduction to labVIEW and its possible applications in electric power systems engineering. Basic equations of electric power in single-phase AC circuits in time domain and polar notation of complex quantities were used in order to find instantaneous and average values of power. In the said research we find a simple numeric example which was solved without showing the core code in the block diagram. Only results of calculations are given in the front panel. In paper [2], practically authors solved the same problem the same way and also without giving the block diagram code. In both works authors did not use the specific Virtual instrument (VI) which exists in electric power tool to directly find apparent power S, active power P and and reactive power Q at the same time. In paper {3} LabVIEW was used as power quality analysis tool. The authors refer to and use fundamental vector values (VI) and power (VI) and suggest a flow chart to use virtual instruments as a power quality analysis tool. At the time being, there are several published works related to electric power quality studies using LabVIEW. Good examples are [6] and [7].
In this paper we focus on basic fundamental issues and present our own virtual instruments in order to solve several commonly used tasks in power system analysis teaching, such as electric power calculations, calculations of symmetric components, conversion of star/delta to delta/star, creation of single phasor or three phase phasors, and finding RMS values and phase shifts for generated electrical waveforms. In this regard, it is worthy to note that one of the most important student learning outcomes that are required by students in order to gain ABET accreditation is to implement software packages in the learning process. Presently, the Faculty of Engineering Technology, Zarqa University, is focusing on this kind of work. This paper includes an abstract, key words, introduction, description and analysis of designed programs, conclusions and references.

Electric Power Measurement
One of the basic skills that students must develop is to find the apparent power(S), the active power (P) the reactive power (Q) and the power factor (PF). Normally these variables are calculated by using common equations: P = V I cos , Q = VI sin , S = V I and PF = P/S. Voltage and current are in RMS values,  is the phase angle between voltage and current.
LabVIEW electric power tool includes an Electric Power VI which finds all the above variables at once. Two ways may be used in order to calculate these values and both give the same result. The implementation of power VI can be very practical when the inputs are online voltage and current. This is shown in Fig (1).
Application of the above given equations requires knowledge of V, I RMS values and the phase angle between them which are: V=2.8288V, I=2.1216A, and Փ= 30 degrees. Fortunately, the LabVIEW electric power tool includes a specific RMS VI which yields the RMS value for a given online input waveform. In this regard we have worked out an alternative solution which is shown in Fig  (2). Therefore, we determined at first the waveform peak value firstly, and then the RMS value is found by dividing the peak value by √ 2. This VI allows quantization of the analog waveform (sample and hold) at the required frequency also. This VI could be used for further power system analysis such as noise content or harmonic distortion evaluation. Normally v(t) and i(t) represent the instantaneous time functions of the voltage and current, and the instantaneous power will be equal to: . This equation could be rewritten in a more informative way as follows: VI cos{1 + cos 2(t + v) } + VI sinsin 2(t + v ), where  =  v - I . The first term of the previous equation determines energy flow to the load, and the second term represents the fluctuating reactive power. As an example, when v(t) = 100 cost, and i(t) = 80 cos (t -60 0 ), P(t) = 8000 cos t cos (t -60 0 ), [9]. Figure (3) illustrates.   The waves of S, P, and Q types of power as well. Practical study of these energy types curves helps students to comprehend the nature of reactive power and that the average value of it is zero, while the active power is always positive and has a non zero average value.
As mentioned above, the knowledge of the phase difference between voltage and current waveforms is important in order to evaluate P. Q and PF. To meet this requirement we designed the VI shown in Fig (4), which allows finding the phase difference between any two waveforms. Practical investigation of both VIs gives the same results.

Star to Delta and Delta to Star Conversions
Another Common issue in power system analysis is to convert star to delta or delta to star impedances. This issue was tackled by [1], [2]. Both works refer to the front panel only and they do not show the core code which is most important. Knowing the controls and indicators only is not sufficient to carry out conversions. In order to fill this gap we have introduced the VI shown in figure (5).
We have shown the complete detailed VI, although it is always possible to create a sub VI by selection [9]. In order to verify the results we examined the example (2) page 10-9 in [5] and the results came identical. Important to note that this VI could be used for impedance, reactance and resistance controls simultaneously.

Symmetric and UN Symmetric Components
In addition to the analysis of balanced electric power systems, recent developments of LabVIEW Electric Power Tool, allow the analysis of unbalanced power systems too. Finding the symmetric components is the basis for unbalanced power system analysis and protection. This issue has been taken care of also. At first, we developed a program to carry out the forward transforms by finding the symmetric components from the phase values. And then another VI is developed to carry out inverse transforms in order to find phase values knowing the values of symmetric components. Both programs are shown in figure (6).  In order to verify both Vis we examined example 1 of [4] and the results were the same. However it is of great importance to find symmetric components for a three phase waveforms. In this connection we can find the peak values and phase differences and apply the above Vis. At the same time the Electric Power Tool permits to carry out these activities directly when utilizing symmetric component Vis. Figure (7) illustrates such a case where the symmetrical component VI calculates the symmetric components of a three phase system.
The program illustrates the three vectors of the system also. This program demonstrates how varying amplitudes and phases relationships changes the symmetric components. This program was intentionally designed to give an alternative solution for example (11.1) of [4], where the third phase is opened. And again we got the same results too.

Phasor Representation
In power system analysis the phasor concept is widely used. Phasor is a rotating vector at a given velocity. Thus creating and simulating phasors is an important activity. We worked on this problem and designed a VI that creates a phasor with the required magnitude and argument. This program is presented in figure (8). In this VI a reference vector is used and the length of created phasor is scaled as a percentage of the reference vector. Velocity of phasor is defined by the timing function within the while loop. Stopping rotation of the phasor is done by utilizing the iteration terminal of the while loop.  As a development to this VI a three phase rotating phasor's set VI is given in Figure (9). In this VI the phasor's lengths and arguments are programmable.
Manipulation of phasors magnitudes and arguments helps the investigation of symmetric components of the electric power system. The shown phasor set matches three phasors with different lengths and phases. This yields a three sequence sets, positive, negative and zero at the same time. There are many important electric power issues and problems that could be analyzed and investigated using LabVIEW environment. Such issues include defining the ABCD constants of transmission line, building of vector diagrams of transformers and transmission lines, investigation of power flow problem and others. Because of the limited size of the paper, these issues could be considered in another paper.

Conclusions
1. Considering the excellent advantages of data flow programming, LabVIEW environment could be used as a tool to solve any problem related to power system analysis and design. 2. Several virtual instruments that are designed and illustrated in this paper could be used in teaching and analyzing of electric power systems. Illustrated examples prove originality and accuracy of suggested virtual instruments. 3. Designed virtual instruments allow online measurements and analysis of common electric power values Such as, phase difference between two waveforms, instantaneous values of different types of electric power, and three phase symmetric components.