USING MICROSOFT OFFICE VISIO PROFESSIONAL 2007 AND MICROSOFT OFFICE EXCEL 2007 TO CREATE POWER SYSTEM ONE-LINE DIAGRAMMING SOFTWARE

USING MICROSOFT OFFICE VISIO® PROFESSIONAL 2007 AND MICROSOFT OFFICE EXCEL® 2007 TO CREATE POWER SYSTEM ONE-LINE DIAGRAMMING SOFTWARE HASRUL HANIS B...
Author: Damian Leonard
2 downloads 1 Views 1MB Size
USING MICROSOFT OFFICE VISIO® PROFESSIONAL 2007 AND MICROSOFT OFFICE EXCEL® 2007 TO CREATE POWER SYSTEM ONE-LINE DIAGRAMMING SOFTWARE

HASRUL HANIS BIN KASMIRAN

A report submitted in partial fulfillment of the requirements for the award of the degree of Bachelor of Engineering (Electrical-Power)

Faculty of Electrical Engineering Universiti Teknologi Malaysia

MAY 2010

ii

iii

Dedicated, in sheer reverence and utmost respect, to my beloved Father, Mother, and Brothers.

iv

ACKNOWLEDGEMENT

First and foremost I would like to give my thanks to Allah S.W.T for His Grace and Blessing in enabling me to finally finish this project. I have owed too many to His Greatness, and to Him I kneel and bow.

Next, to Prof. Dr. Khalid Mohammed Nor, my highly-esteemed supervisor, which had been there with me through thick and thin, and never ever gave up on supporting me and pushing me forward. Thank you Prof!

My appreciation also goes to my beloved family, who has been standing beside me all these years, who had been tolerant of my antics and tantrums, and who had been such loving and caring family for me from the day I was born, until now and always. They are my primary source of spirit and confidence.

Last, but certainly not least, are to anybody and everybody who had been involved in this project, either directly, or indirectly. I also would like to pay tribute to all my lecturers, who had been tirelessly teaching and giving me knowledge, so that I would be able to be a good engineer, and person, in the future.

v

ABSTRACT

Power system one-line diagrams, which are the simplified representation of the power system in a power plant, is such vital nowadays, due to the need for safety and efficiency in the operations of the power plant, that companies nowadays are vying for the very best, yet economical way of doing power system one-line diagramming. However, the increase in living costs, such as the worker wages, had forced companies to cut costs on other certain matters, and the diagramming is included as well. Thus, companies nowadays are interested in a relatively cheap yet effective way of doing power system one-line diagramming. On the other hand, large companies such as Microsoft had been creating diagramming software, such as Microsoft Office Visio® Professional 2007, but this software is for general use, and not really specialized for creating power system one-line diagrams. However, Microsoft had been making this software to be modifiable, and prepared substantial documentations and tools for this purpose. Thus, this project’s purpose is to use these documentations and tools to modify Microsoft Office Visio® Professional 2007 to create a software that is cheap, yet optimized to do power system one-line diagramming.

vi

ABSTRAK

Lukisan segaris sistem kuasa, iaitu satu penyampaian mudah system kuasa di dalam seseebuah stesen janakuasa, adalah sebegitu penting pada masa sekarang, kerana keperluan keselamatan dan keefisyenan di dalam operasi sesuatu stesen janakuasa, yang syarikat-syarikat kini sedang mencari cara terbaik, tetapi masih ekonomikal, untuk membuat lukisan segaris sistem kuasa. Walau bagaimana pun, penambahan kos hidup, seperti gaji pekerja, telah memaksa syarikat-syarikat untuk memotong kos die bahagian lain, dan lukisan segaris adalah termasuk juga. Maka, syarikat-syarikat kini adalah berminat untuk mencari sesuatu cara yang mudah secara relatifnya, tetapi masih berkesan, untuk membuat lukisan segaris system kuasa. Pada masa yang sama, syarikat besar seperti Microsoft telah mencipta perisian-perisian untuk melukis, seperti Microsoft Office Visio® Professional 2007, tetapi perisian-perisian ini adalah untuk kegunaan umum, dan tidak dikhususkan untuk membuat lukisan segaris system kuasa. Walau bagaimana pun, Microsoft telah membuatkan supaya perisian itu boleh diubah-suai, dan sudah menyiapkan dokumentasi dan alatan secukupnya untuk tujuan ini. Maka, projek ini bertujuan untuk menggunakan dokumentasi dan alatan tersebut untuk mengubahsuai Microsoft Office Visio® Professional 2007 untuk mencipta satu perisian yang murah, tetapi dioptimisasikan untuk membuat lukisan segaris bagi sistem kuasa.

vii

TABLE OF CONTENT

CHAPTER

1

2

TITLE

PAGE

DECLARATION OF THESIS

ii

DEDICATION

iii

ACKNOWLEDGMENT

iv

ABSTRACT

v

TABLE OF CONTENT

vii

LIST OF FIGURES

ix

INTRODUCTION

1

1.1

Background

1

1.2

Problem Statements

3

1.3

Objectives

3

1.4

Scope of Study

3

1.5

Thesis Outline

4

LITERATURE REVIEW

5

2.0

Introduction

5

2.1

One-Line Diagram

5

2.2

Microsoft Office VISIO® 2007

10

viii

3

4

5

2.3

Microsoft Office EXCEL® 2007

12

2.4

Analysis Methods

13

2.5

Similar Commercial Software

14

2.6

Similar Non-Commercial Software

26

METHODOLOGY

28

3.0

Introduction

28

3.1

Process Flow Chart

29

3.2

Programming Tools

31

3.3

Open Database Connectivity

32

3.4

WinRAR

32

RESULT & DISCUSSION

33

4.0

Introduction

33

4.1

Objective 1: Portability between Computer

33

4.2

Objective 2: User-Friendly Interface

35

4.3

Objective 3: Enabling Easy Databasing

47

CONCLUSION & RECOMMENDATION

51

5.1

Conclusion

51

5.2

Recommendation

52

REFERENCES

54

ix

LIST OF FIGURES

FIGURE

TITLE

PAGE

1.1

One-Line Diagram

2

2.1

Graphical Symbols for One-Line Diagram

8

2.2

One-Line Diagram Showing Bus Arrangement

9

2.3

One-Line Diagram Showing Grounding Condition

10

2.4

Commercial Software Pricing

14

2.5

PowerWorld Sample Case

15

2.6

PowerWorld Bus 1 Window

16

2.7

PowerWorld Bus 2 and 3 Window

17

2.8

PowerWorld Generator Window

18

2.9

PowerWorld Load Window

19

2.10

PowerWorld Switched Shunt Window

20

2.11

PowerWorld Transmission Line (2-3) Window

21

2.12

PowerWorld Transmission Line (1-3) Window

22

2.13

PowerWorld Transformer Window

22

2.14

PowerWorld Help Window

23

2.15

PowerWorld Finished One-Line Diagram

24

2.16

PowerWorld Fully Solved Case Study

25

2.17

PowerWorld Case Information

25

3.1

The Process Flow Chart

29

3.2

Stencil of Power System Diagram

30

3.3

Masters’ Properties

30

3.4

Visual Basic Editor

31

4.1

The Compressed Files

34

x

4.2

The Extraction of The Compressed Files

34

4.3

Startup Interface

35

4.4

Power System Stencil

36

4.5

Case Study (using PowerWorld)

37

4.6

The Drawing of the Generator

38

4.7

Connector Tool

38

4.8

Connector Tool Usage (correct)

39

4.9

Connector Tool Usage (wrong)

39

4.10

Shape Data Window (bus)

40

4.11

Define Shape Data window

41

4.12

Case Study (using Visio)

41

4.13

Generator Shape Data

42

4.14

Bus Bars Example (at start)

43

4.15

Input Form - From Bus

44

4.16

Input Form - To Bus

44

4.17

Bus Bars Example (done)

45

4.18

Sample Code – Bus Example

46

4.19

Selecting ‘Reports’

47

4.20

Selecting types of ‘Reports’

48

4.21

Selecting format of ‘Report’

48

4.22

Generating ‘Report’

49

4.23

Excel Form

49

4.24

Visio Form

50

CHAPTER 1

INTRODUCTION

1.1

Background

There is a lot of one-line diagram power analysis software in market nowadays. They all share one common attribute however; they are quite relatively expensive for simple one-line diagramming work, and they are basically a mix of many components which are integrated together, as they all have their own specific functions.

The two main components that are usually needed by most engineers are the diagramming part and the simulation part for the load flow analysis only, yet all of the power analysis software is composed of much more “extras” that may not even be needed or used, but need to be bought because they come in the one same and large package.

2

Also, the main reasons why this project focused on power system one-line diagramming are two, which are firstly, for standardization of the presentation of the diagram, and secondly, for the simplification of the one-line diagram itself. They will be further explained based on Figure 1.1 below.

Figure 1.1: One-Line Diagram

From the diagram, we could see clearly that the generator, the grid and the load are interconnected with each other through a 3-bus system. There is also a capacitor in parallel with the load there. All of the symbols used are standardized, and thus should be able to be easily presented and understood by anyone analyzing the diagram.

3

Also, there exists some extra information in there, which should be understandable in the context of the situation. Thus, this means that a one-line diagram is simple enough that extra information can be added to make the meaning clearer for the ones who know the context of the situation.

1.2

Problem Statements

There is a lack of affordable programs supported by huge organizations which are specifically attuned towards creating one-line diagrams. This means that it is hard for any users to give and get feedback and help for their programs, unless they are willing to fork out a substantial amount to money.

1.3

Objectives

The main objectives of this project are firstly, to enable the customizable presentation of one-line diagrams. Secondly, is to enable an easy referencing to a system of databases. Thirdly, is to enable the portability of this program, so that it can be used in any computers with Visio® installed.

4

1.4

Scope of Study

This project will focus on the building and testing of the elements regarding the three main objectives, which are the creation of a graphical user interface, the referencing to a system of databases, and the portability of the project itself. The graphical user interface are based on Visio® itself, the referencing are based on Excel®, and the portability are gained using WinRAR®.

1.5

Thesis Outline

This thesis will be separated into 5 chapters. Chapter 1, which is this chapter, is to give an overview of what the project will be about. Chapter 2 is the literature review, or a collection of ideas of past researchers, including an introduction to Visio® and Excel®, and a brief explanation on other similar commercial software. Chapter 3 is the methodology chapter, which outlines on how this software is going to be coded, which will be primarily using the Visual Basic® language, and how the software is then going to be subsequently tested. Chapter 4 is the presentation of the results part, which is going to outline the effectiveness and customizability of this software, compared to all other similar software in the market. Chapter 5 is the conclusion and recommendation part, which is going to summarize on everything about the created software, and future recommendations for study in this area.

CHAPTER 2

LITERATURE REVIEW

2.0

Introduction

This chapter discusses on one-line diagrams, the capabilities of Visio® and Excel®, the language used, which is VBA, and also discussed on comparison between existing commercial and non-commercial programs that are similar to this project.

2.1

One-Line Diagram

One-line diagram is basically a simplified representation or notation that explains about a three-phase power system. By using one-line diagram, one would

6

be able to understand and study the electrical circuit of the power system, without having all the clutter of a normal electrical circuit. The advantage of this is that in power flow studies, the one-line diagram itself would be functional to be used as a diagram, and the simplified diagram would also leave a lot of space for other, nonelectrical uses, such as economical analysis for example. [1]

Also, using one-line diagram means that the electrical circuit would be standardized, and hence be able to understood by everyone, regardless of the electrical backgrounds. Since the shapes are the basic and standard shapes used in electrical circuit, the schematic diagram would be clear and unambiguous. [1]

For a three-phase system, as long as the loads on each phase are balanced, we could analyze each phase separately, so since this assumption is usually true in power engineering, it would be ideal to use the one-line diagram, which is a kind of block diagram showing how the power flow paths in an electrical system, between all the electrical bodies or entities. By following the above assumption, there would be no need to represent each of the three phases with a separate line or terminal for each phase, but only 1 body of 1 phase would be represented in the one-line diagram. [2]

By tackling it from another aspect, power systems are pretty much extremely complex electrical networks that are spread geographically over huge areas. Usually, power systems are three phase networks of power circuits, which consist of conductors and other devices like generators, transformers, breakers, disconnects etc.

7

Usually, the power systems are so complicated it is impractical to show all the connections in the conventionally complete and detailed way. Thus, there should be some simple but still quite concise way of representing the basic arrangement of the components of the power system. This is done by using one-line diagrams.

Most importantly, one-line diagram do not show the exact configurations or connections of the power circuits. However, the one-line diagram used only a single line, as mentioned before, to represent all three phases. They show the relative electrical interconnections of generators, transformers, transmission and distribution lines, loads, circuit breakers, etc., used in creating the power system. [2]

The amount of information a one-line diagram includes depends on the purpose for which the diagram is designed. For example, if the one-line diagram is used in the initial stages of designing a substation, then all the vital parts will be included in the diagram, with the majority being transformers, breakers, disconnects and buses. So, other, relatively minor equipments like instrument transformers or protection and metering devices would not need to be included. However, if the purpose of the one-line diagram is to design a protection scheme for the parts in the substation, then the equipments such as instrument transformers and relays would also need to be included.

In one-line diagrams, one of the most often used symbols, are the bus symbol. A bus is basically conceptually equivalent to an electrical node in an electrical circuit. There is one bus for each phase, however due to reasons mentioned above, only one bus is used to represent all three phases. Busses are

8

shown in one-line line diagrams to be short, straight lines which are perpendicular to the transmission lines. [3]

The busses do exist in actual substations however, with the busses being made of aluminum and copper bars which are several metres long. The impedance of busses are very low, practically zero, so in the electrical terms, the busses as a whole are deemed to be in the same potential. Ob Obviously, viously, there would be line voltages between the busses of the individual phases. [3]

Actually, there are no universally accepted symbols for the one one-line diagrams. However, variations between symbols are minor, and would not be difficult to decipher. Some of the symbols that are used for the one-line line diagram are as in the Figure 2.1 shown below. [3]

Figure 2.1 2.1: Graphical Symbols for One-Line Line Diagram

9

One line diagrams like in the figure below is used to illustrate the layout of the busses in the substation. For example, the figure below shows the breaker breaker-anda-half half configuration. This is because there are three breakers for every two connections of lines es or terminations to the bus, which in other words, mean 1 ½ breakers per terminations. [3]

Figure 2.2: One One-Line Line Diagram Showing Bus Arrangement

10

One-line line diagram may also be used to show the configuration of a whole power system, like in the figure below. Any information that is required is added to the one-line line diagram itself itself. In this case, the connections of the generator and transformer windings, as well as the grounding method are indicated. [3]

Figure 2.3: One One-Line Diagram Showing Grounding Condition

2.2

Microsoft Office VISIO® 2007

VISIO® is a diagramming software that is used to enable the easy creation of informative and beautiful diagrams, drawings and models. VISIO® is said to be so easy-to-use use and intuitive that it can be used to by anyone to draw any kind of models, yet it is considered to be powerful enough to be able to draw complicated yet precise drawings, that are used to illustrate the details of a specific system. [4] [4

The nice thing about VISIO® is that there existed solutions that are designed specifically to produce different ddiagrams iagrams for different situation. These solutions are mainly divided into two, which are “templates” and “stencils”.

11

VISIO® templates are used to set up the working environment with a specific graphical user interface, which comes with menus of tools specialized for a specific task, shapes that are already predefined with their own properties, and other settings such as orientation and page size which is suitable for the desired drawing.

VISIO® stencils, on the other hand, is used to collect and categorize your own predefined shapes that have built-in behaviors, called “masters”, which are also customizable by users. [4]

Of course, the topic of the project specifically stated that MICROSOFT OFFICE VISIO® PROFESSIONAL 2007 is going to be used for this project. To clarify, there are two main versions of VISIO®, which are MICROSOFT OFFICE VISIO®

STANDARD

2007

and

MICROSOFT

OFFICE

VISIO®

PROFESSIONAL 2007. While the users of both versions should be able to use the finished product, the reason why the latter version is chosen because the latter comes with a variety of advanced features and special-purpose templates that will help in the creation of the finished product of this project. [5]

The most important reason why VISIO® is chosen is that it can interface directly with EXCEL® in a two-way process, using the integrated Database Wizard. Thus, this will form the basis of this project, in which the user will just need to enter the data in VISIO®, and EXCEL® will do all the complicated analysis, and the result will be shown back in VISIO®.

12

2.3

Microsoft Office EXCEL® 2007

EXCEL® is a spreadsheet program that can be used to enter and organize data, and to perform a wide variety of number crunching tasks. EXCEL® can also be used as a database program to organize and track large quantities of data. [6] Thus combining these two features, EXCEL® may then be used to do analysis on a power system, due to its ability to both interface with VISIO® as previously mentioned, and to do complicated mathematics analysis, like the Newton-Raphson method.

In this project, EXCEL® is going to be used as the database and simulation part. Due to all the load flow data, field test results, and other engineering information, there is a need to have a system that can easily format, scale, chart and sort the data easily using just the standard spreadsheet functions. Of course, if the simulation is able to be done using the database, all the better. For example, the program by W. Xu et all [7] shown the capability of an add-on to EXCEL® that his team had made. They found that spreadsheets are very capable on manipulations of data, but very weak on drawing schematic diagrams. Thus, there is ultimately a need to integrate a one-line diagram software with the database in a method that would be satisfactory, viable and most importantly, user-friendly.

This is similar case with the program by Jen-Hung Chen [8], though his program focused more on the environments and requirements by an industrial plant. In the end, the program would make it easier to maintain and update the database, and at the same time provide an up-to-date documentation on the operation of the plant.

13

Also, Nourdine Aliane had shown that EXCEL® may also be used for spreadsheet-based control system analysis and design [9]. This shows the potential of EXCEL® in doing interactive simulations. Alas, the most important thing about EXCEL® is in its huge potential, due to the availability of its built-in Visual Basic for Application (VBA), which enables developers to design add-ins in order to extend the capabilities and functionalities of EXCEL® using a flexible generalpurpose programming language [10].

2.4

Analysis Methods

This program is initially going to do steady state analysis using three-phase. For most cases, the imbalance of a power system can be ignored and single phase analysis is more than enough. However, certain condition like such as very long untransposed lines, large single phase loads like induction furnaces and traction motors, or single pole switching means that much detailed analysis is needed.

The analysis method that is going to be used will be based on a sequence Newton-Raphson method, which is proven to be superior to the conventional phase coordinates Newton-Raphson method, in the aspect of large savings in the aspects of CPU execution time and memory [11].

However, due to the limitations of time and programming capabilities, this analysis method cannot be included on the current version of the program, and should be able to be integrated in future versions.

14

2.5

Similar Commercial Software

There are lots of other similar commercial software in the market, which can already do what this project aims to do, and perhaps even more. Yet all of these software pales when compared to VISIO® mainly due to their costs [12] [13] [14] [15], which can be shown vividly in the figure below:

Pricing $9,000.00 $8,000.00 $7,000.00 $6,000.00 $5,000.00 $4,000.00 $3,000.00 $2,000.00 $1,000.00 $0.00

$8,000.00 $3,995.00 $4,495.00 $459.95

Figure 2.4: Commercial Software Pricing

Due to the fact that cost of VISIO® is a very small fraction of the other software’s costs, yet could theoretically be equivalent in functionality to them, at

15

least in the presentation and simulation part, this is the main reason why this project is now being done.

A special mention had to be made for the Powerworld Simulator, since this project basically used the Powerworld Simulator as the the main program reference. Below is an example of how the one-line diagram initially looks like in the Powerworld Simulator, for a simple case: [13]

Figure 2.5: PowerWorld Sample Case

This simple case consists of 3 buses. Bus 1 is connected to the source. Bus 2 is connected to a generator. Bus 3 is the interchange between the source and the load. One transmission line, from Bus 2 to 3, and one transformer, from Bus 1 to 3,

16

links up the network. A switched shunt is available to boost the bus voltage, as needed.

So initially, all the components would have to be placed on the working board. This is easily done using drag-and-drop even in VISIO® itself. However, what is missing in VISIO® is the ability to edit all the information, in easy-todigest and user-friendly boxes, as below:

Figure 2.6: PowerWorld Bus 1 Window

The box above defined the characteristics of a bus. For example, the System Slack Bus option is ticked, meaning that the system is a slack bus, thus both voltage and angle settings need to be set. So in this example, the nominal voltage is set to be 69 V, and the voltage in per-unit to be 1 pu with the angle of 0 degrees.

17

For the other two busses, Bus 2 is a Generator Bus, with one generator connected to it. Thus only the voltage setting needs to be set, and not the angle setting. Bus 3 is the Load Bus, so neither the voltage setting nor the load setting need to be set, as shown in the boxes in the figure below.

Figure 2.7: PowerWorld Bus 2 and 3 Window

For the generator, which is connected to Bus 2, the output of the generator is 1 MW. So, all the needed parameters can be easily inputted into the dialog boxes as shown in the figure below. Also, the Available for AVR option means the generator will automatically change its reactive power output to maintain the desired terminal voltage.

18

Figure 2.8: PowerWorld Generator Window

The load, which is defined to be a constant power load of 7 MW and 6.3 MVar is shown in the figure below. The needed parameters are inputted in the space shown, with all other spaces remained as default. The bus number is automatically sensed by the program to be 3, which is the number of the bus connected to the load.

19

Figure 2.9: PowerWorld Load Window

Again, the same process is repeated for the switched shunt window. This time only the nominal Mvar, which is 6 Mvar, need to be included. For the Control Mode, it is just to determine whether the switched shunt had a fixed value, or whether the value of the shunt is to control a certain amount of voltage which is based on the Control Regulation Settings. Since in this case, the user only wants a fixed control mode, it is set to be Fixed.

20

Figure 2.10: PowerWorld Switched Shunt Window

The same process is repeated for the transmission lines. The impedance here needs to be inputted in per unit, and since the per unit impedance of the line between Bus 2 and Bus 3 are 0.06 + j0.12, the impedance is put into the appropriate places, as shown. Also, there should be a limit for the impedance of the lines, since

21

the user is effectively simulating a real-life circuit, and for this circuit it is taken to be 10 MVA.

Figure 2.11: PowerWorld Transmission Line (2-3) Window

For the impedance between Bus 1 and Bus 3, in this example it is taken to be 0.03 + j0.53, and the turns ratio for the transformer is 1.01, which means 1.01 primary winding versus 0.01 secondary windings. All the parameters are inputted appropriately.

22

Figure 2.12: PowerWorld Transmission Line (1-3) Window

Figure 2.13: PowerWorld Transformer Window

23

In case any problem existed, a user only had to click on the Help option to get detailed information on each and every option. This should be of huge help to handle any problems that a user may encounter.

Figure 2.14: PowerWorld Help Window

24

The one-line diagram could also be adjusted to display more information about the generators, busses, branches etc. One of the features of PowerWorld is that it can also be used to solve cases, as shown below:

Figure 2.15: PowerWorld Finished One-Line Diagram

The solving of the cases could theoretically be done through the EXCEL® software, however due the limitations of time and programming capability of the this researcher, the solving part of the project had not been done yet, and may be done in the future upcoming versions.

25

Shown below are figures of an example of a sample case study fully solved using the PowerWorld software, with the Case Information of the case study, in a format similar to EXCEL®.

Figure 2.16: PowerWorld Fully Solved Case Study

Figure 2.17: PowerWorld Case Information

26

2.6

Similar Non-Commercial Software

There are several other three phase load flow analysis programs that had been done in the past, using all kinds of methods. One of the earliest is the program developed by Kenneth A. Birt et all [16]. Their program used the Newton-Raphson method, using optimally ordered triangular factorization to take advantage of the sparsity of the network equations. Their program’s input data preparation and output data interpretation are in both phase and symmetrical component quantities; however the load flow problem formulation and method of solution are in done in phase quantities (A, B, C). Their program will only handle up to 30 buses, with a maximum of 10 generators, and a total of 100 system elements, like lines and transformers, may be included.

A different approach is taken by F. Schlaepfer et all [17] in which they designed a graphical user interface to the load flow program, or in this case called Interactive Load Flow Program (ILF), one of the earliest ever. This design is due to the need for an interface between the user and the load flow program, to make a “highly responsive” program. Even though the user used CRT monitor as its main interface, this innovation paved the way towards a much more powerful and interactive load flow analysis program later on.

Another program done in the subject matter is the one by D. C. Tarsi [18]. His program uses bus impedance matrix written with symmetrical components. According to [17] however, this results in a severe problem in the modeling of generators and transformers. A newer work done in the subject is by G. N. Korres et all [19]. Their program also used the phase method in the Newton-Raphson solution, and implemented by using Digital Fortran-90 for Windows 98. Their

27

program could handle an industrial network of 3 generators, 580 buses, 213 lines, 42 transformers and 165 load buses, and convergences were reached in 5-6 iterations.

There is also a load flow simulation that is actually web-based. The one designed by Rong Ceng-Leou [20] used ActiveX component which is developed using Visual Basic Language. This is due to the fact that traditional load flow program design, which used Fortran Language, C Language, or Matlab, cannot be run through the Internet.

An even newer program, is a program called SIMULTEC [21], which is developed in Turbo Pascal 5.5 environment. One of the important finding of this tool is that the Newton-Raphson method is faster and sure to converge in almost all cases, compared to the Gauss-Seidel method.

The newest non-commercial program in this field of study is done by K. W. Louie et all [22]. This program, which used a variant of the Newton-Raphson’s method, which is the damped Newton-Raphson’s method, is initialized for the first two iterations using the Gauss-Seidel solution method so that the initial guesses are better, and the program will then be faster. Other ways used to improve the speed are minimizing the looping structures in the software development, minimizing the use of constraint checks, and creating more economical and concise data structures during the solution process.

CHAPTER 3

METHODOLOGY

3.0

Introduction

This chapter discusses on the methodology for this project. This project will need to be done in three major steps:

(a)

Programming the graphical user interface of VISIO® so that the inputting

and outputting of data is easily and intuitively done through it.

(b)

Setting up the EXCEL® database so that all the needed analysis could be

done through it.

29

(c)

Interfacing VISIO® and EXCEL® so that two-way flow of information

between the programs will be operational.

Of course, the project will first be done on a part-by-part basis. That’s why the Gantt chart above shows the “enable drawing of components”. This is because as each part is settled for all three steps above, the project then proceeds on with the next part, one step at a time. After all that is done though, the most important part, which is debugging, is required. Lastly, is the full preparation of an adequate documentation.

3.1

Process Flow Chart

Figure 3.1: The Process Flow Chart

30

The flow chart above shows the steps needed to be taken in order to finish this project. The first and the second steps are already done by the first semester, as shown by the figure below.

Figure 3.2: Stencil of Power System Diagram

Each of the shapes itself had its data been “defined”, to be relevant for the analysis. The shapes had to be called as “masters” first, which are basically shapes which had their own special properties:

Figure 3.3: Masters’ Properties

31

3.2

Programming Tools

The Visual Basic® programming will be primarily be done in 2 languages, which are Visual Basic for Application (VBA) and Visual Basic 6.0, using the free Microsoft Visual Basic 2008 Express Edition, and the built-in Visual Basic Editor, respectively:

Figure 3.4: Visual Basic Editor

32

3.3

Open Database Connectivity

Open Database Connectivity (ODBC) is used to integrate between applications under Windows, which a program to access, view, and modify data from a database. This VISIO® solution will be using it in order to integrate with the database from EXCEL® in a quick and efficient manner [23].

3.4

WinRAR

WinRAR is one of the most popular free file compressing tool that had been used in the 21st century. Utilizing the all-time popular format like .zip, or even more safer .rar, WinRAR would be used to easily compress the project into one, easy-to-use and easy-to-install package, complete with instructions, so that someone with the most rudimentary knowledge of computing would be able to easy use and install the package.

Also, the package may also be encrypted with password, so just in case in the future, the product goes commercial, it may only be used by those with the knowledge of the password only, and not just anyone.

CHAPTER 4

RESULTS AND DISCUSSION

4.0

Introduction

This chapter discussed on the results of this project, and subsequent analysis. The project is done to satisfy the three objectives, which are to enable easy databasing, to enable a user-friendly interface, and to enable easy portability.

4.1

Objective 1: Portability between Computers

Firstly, the project are basically comprised of 3 parts, which are the stencil, the drawing itself, and the instructions. Basically, everything is compressed into a .rar file, which looks like the figure below when opened.

34

Figure 4.1: The Compressed Files

To install the program, it is basically composed of three, very easy steps, shown in the instructions included in the .rar file itself:

Figure 4.2: The Extraction of The Compressed Files

35

(1)

Extract the contents of “Power System Visio.rar” using WinRar or similar

tools to any folder, as shown in the figure above.

(2)

Double-click the “VISIO® - Power System One-Line Diagram Maker.vsd”

to start using this program. Make sure Microsoft Office Visio® Professional 2007 software had already been installed.

(3)

Open the stencil “Power_system_stencil.vss” in the running Microsoft

Office Visio® Professional 2007 software.

And now the program is installed, and ready to be used. These steps should be suitable for all type of computers that are able to run VISIO® 2007.

4.2

Objective 2: User-Friendly Interface

Figure 4.3: Startup Interface

36

The figure above is what the user will be presented with when they first started the program. The Power System Stencil on the left-hand side, the Shape Data on the right-hand side. All of this is already modified to be as user-friendly as possible to a new user to VISIO® 2007.

If, for example, a user needs to drag in a bus bar to begin creating a power system one-line diagram, there are no more need to search for the bus bar in all the varied stencils. Everything is there in the Power System stencil, everything that is directly related to the creation of one-line diagrams.

Figure 4.4: Power System Stencil

37

Take the above PowerWorld case study as an example. The initial one-line diagram, drawn from the PowerWorld, is as follows:

Figure 4.5: Case Study (using PowerWorld)

To start drawing the one-line diagram on the drawing board, firstly, a user would need to drag-and-drop all the needed symbols of the entities from the stencil. So, for the the initial generator, it would be as in the following figure.

38

Figure 4.6: The Drawing of the Generator

Repeat the same drag-and-drop process until all the initial entities are put on the drawing board. Next, use the Connector Tool conveniently located on the toolbars above to begin connecting.

Figure 4.7: Connector Tool

39

Figure 4.8: Connector Tool Usage (correct)

As shown in the figure above, each time a transmission line could be connected between two correct shapes, the lines would show red squares, as shown above. These red squares mean that both of the shapes are now connected, as the red squares would not appear if the two shapes are not properly connected, as shown in the figure below.

Figure 4.9: Connector Tool Usage (wrong)

40

If two shapes are not properly connected, it may adversely affect the analysis afterwards, since the two shapes are not “sensed” by Visio to be connected.

Also, every time a new shape is added or dropped into the drawing board, a window will appear asking about some parameters that the users may want to initialize. For example, the window that will appear when the bus bar is added is shown in the figure below.

Figure 4.10: Shape Data Window (bus)

The parameters that may be initialized by this window could be easily customized by the user, by clicking on the Define option, and ticking on the Ask on Drop option for the parameter that the user wants to initialize:

41

Figure 4.11: Define Shape Data window

Figure 4.12: Case Study (using Visio)

42

The drawing is done. Now all the user needs to do is to input the data in the Shape Data, conveniently accessed each time the user selected the shapes. An example is when the generator is selected, it will show the following Shape Data.

Figure 4.13: Generator Shape Data

Also, if a user needs to connect several bus bars automatically (in a complex circuit perhaps), the user only needs to input into easy-to-understand input forms without having to connect one-by-one. This should save time for the user to do stuff that is more technical for him, without needing to worry about all the superficial stuff.

43

A simple example is shown below:

Figure 4.14: Bus Bars Example (at start)

This example is to show how easy it is to connect between bus bars that the users have specified to be Bus Bar 1, Bus Bar 2, Bus Bar 3, Bus Bar 4, and the rest. The bus bars are automatically specified when each is drag and dropped into the drawing board.

44

For example, if the user wants to connect Bus Bar 1 and Bus Bar 3, then the user would only need to input into forms such as below:

Figure 4.15: Input Form - From Bus

Figure 4.16: Input Form - To Bus

45

Figure 4.17: Bus Bars Example (done)

Then, the bus bars would be automatically connected, as shown in the figure above. Of course, the example may be too simple to appreciate the importance of the automatic connecting, but when the circuits get bigger and larger and more complex, the user would certainly appreciate to be able to connect these bus bars (and other elements) automatically, and without fail, so he or she would then be able to focus on the more important stuff, such as the presentation of the whole circuit, etc.

46

Figure 4.18: Sample Code – Bus Example

Shown above is the sample code for the automatic connection of the busses. It uses several functions that are custom-made for this project, and for anyone who had a basic grasp of the VBA language, it is also quite easily edited.

For example, in case of an error, the Err variable may be changed to have an output of other messages that would be appropriate. Also, in case other shapes are going to be used, the “Bus Bar.” in the vsoShape argument could be easily changed to be “Generator.” for example, since the numbers of the generator would follow

47

the numbers specified in the input boxes earlier. Thus, this sample code is pretty much the base for the automatic connection of other shapes in the circuit.

4.3

Objective 3: Enabling Easy Databasing

There is finally the enabling of easy linking to a system of Databases (based on Microsoft Office Excel), and it is now easily accessible from the interface itself.

First, you have to select Data from toolbars above, and select Reports, as shown below:

Figure 4.19: Selecting ‘Reports’

48

A Reports window shall appear, like below:

Figure 4.20: Selecting types of ‘Reports’

Next, choose Bus Info, and click Run, and the window below will appear:

Figure 4.21: Selecting format of ‘Report’

49

Thirdly, choose Excel, and click Ok:

Figure 4.22: Generating ‘Report’

Finally, the database is created, in Excel® form. Now the data may be inserted here to easily modify data in the circuits, or from the Shape Data in the Visio® window:

Figure 4.23: Excel® Form

The main advantage of converting data from the Visio® form into Excel® form is that there are so many things that can be done in the Excel® format, like

50

inserting formulas, creating graphs, and even mundane tasks such as copy-pasting. All of these mean that the user would be able to utilize the full capabilities of two programs at the same time without having to swap back and forth between these two programs.

Also, in the future versions of the program, formulas may be programmatically included into the Excel® form. This will make even the simulation of the Visio® diagram to be possible, something that is unheard of before, for the Visio® users.

Figure 4.24: Visio® Form

All the data may also be input through the Shape Data above, for easy presentation on the drawing board itself. However, it is still easier to just input data using the Excel® form, which can also be accessed from outside, and linked into inside the Visio® drawing.

CHAPTER 5

CONCLUSION AND RECOMMENDATION

5.1

Conclusion

Microsoft Office Visio® Professional 2007 is one of the leading programs in creating diagrams for all types of applications, like for designing buildings, creating network and flow charts, and creating some sort of “face” for all sorts of engineering fields, such as electrical, mechanical, and chemical. Suitable to its namesake, Visio® excels in visualizing things, and there are lots of things out there, that are better understood in a graphical form, rather than in an essay form.

What this project had managed to achieve, is to create a type of environment that should be instinctively familiar to any users who are new to Visio® itself, but already knew the basic of electrical one-line diagrams. Thus, the users would hopefully be able to utilize the full power and capability of Visio®

52

itself to do such a deceptively simple but very vital task, of creating power system one-line diagrams.

Also, the easy link with Excel® would be a bonus to the users, for those who placed huge importance on the organizing of the data itself, which would then be able to be used in formulas which are not possible by using Visio® only.

5.2

Recommendation

The project has shown that Visio® can be programmed to create an environment that is suitable for the creation of one-line diagrams. However, there are several aspects that can be improved upon the project itself.

Firstly, the project, as a whole, still cannot simulate the Visio® drawing. This is quite a huge drawback, due to the abundance of other programs out there, like PowerWorld, with the ability to draw and to simulate. Thus, a future researcher on this topic may attempt to use the link to the Excel® that now exists to attempt to program some sort of formula into the Excel® sheets that are able to do NewtonRaphson analysis or something similar for the circuit diagram that had been drawn in Visio.

Secondly, the project itself is very sensitive to any attempts at modifying the coding and everything. Thus, a future researcher may be able to program the

53

project in such a way that it will be modular, which is easily programmed by experienced users without breaking the program, yet still retains its portability, for novice users who just want to use the program as it is.

Finally, the project itself is done without any explicit support from Microsoft, or in other words, independently done by this researcher based on the materials on the Internet and on Microsoft’s website. Thus, future researchers may attempt to apply for some sort of grants from Microsoft to develop this project further, so that the project could be officially sanctioned by Microsoft, and if needed, could also be marketed and commercialized by Microsoft itself, so that this project could be available to everyone in need of a portable Visio® stencil to create power system one-line diagrams.

54

REFERENCES

[1]

McAvinew,

Thomas;

Mulley,

Raymond

(2004),

Control

System

Documentation. ISA. [2]

E.Guile, W. Patterson (1978), Electrical Power Systems, Pergamon.

[3]

Tleis, Nasser (2008), Power System Modelling and Fault Analysis, Elsevier.

[4]

B.Biafore (2007). Visio® 2007 Bible, Wiley Publishing Inc.

[5]

S.Holzner (2008). Special Edition Using Microsoft Office Visio® 2007, Que Publishing.

[6]

B. Jelen (2007). Special Edition Using Microsoft Excel® 2007, Que Publishing.

[7]

Xu, W., Liu, Y., Koval, D., & Lipsett, M.A., (1999), Using spreadsheet software as a platform for power system analysis, Computer Applications in Power, IEEE Volume 12, Issue 1, Jan. 1999 Page(s):41 – 45.

[8]

Jen-Hung Chen, (1999), Industrial power system analysis with database access, Industry Applications Conference, 1999. Thirty-Fourth IAS Annual Meeting. Conference Record of the 1999 IEEE, Volume 2, 3-7 Oct. 1999 Page(s):1366 - 1372 vol.2.

55

[9]

Aliane, N. (2008), Spreadsheet-Based Control System Analysis and Design A Command-Oriented Toolbox for Education, Control Systems Magazine, IEEE Volume 28, Issue 5, October 2008 Page(s):108 - 113.

[10]

David M. Bourg (2006). Excel® Scientific and Engineering Cookbook, O’Reilly.

[11]

K. M. Nor, M. Abdel-Akher, & A.H.A. Rashid (2004), Improved ThreePhase

Power-Flow

Methods

using

Sequence

Components,

IEEE

Transactions On Power Systems, Volume 20, No. 3, August 2005. [12]

AutoCAD website, http://usa.autodesk.com/adsk/servlet/index?siteID=123112&id=8446723, last accessed 1st October 2009.

[13]

Powerworld Simulator website, http://www.powerworld.com/features/pricing.asp, last accessed 1st October 2009.

[14]

Visio® website, http://office.microsoft.com/en-us/visio/default.aspx, 2009, last accessed 1st October 2009.

[15]

Pspice

website,

http://www.cadence.com/products/orcad/pspice_simulation/pages/default.as px, 2009, last accessed 1st October 2009. [16]

Rong-Ceng Leou & Zwe-Lee Gaing (2002), A Web-based load flow simulation of power systems, Power Engineering Society Summer Meeting, 2002 IEEE Volume 3, 25-25 July 2002 Page(s):1587 - 1591 vol.3.

56

[17]

Ngundam, J.M., Ngalemo Ngalemo, E.R., & Kenfack, F. (2001), Virtual lab for power system simulation, Power Engineering Journal, Volume 15, Issue 4, Aug. 2001 Page(s):211 – 215.

[18]

D. C. Tarsi (1967), Analysis of Unbalanced Three-phase Load Flows, M. S. Thesis, Purdue University, January 1967.

[19]

Korres, G.N., Contaxis, G.C. & Ginis, N (1999), A three phase load flow program for industrial power system analysis, Electric Power Engineering, 1999. PowerTech Budapest 99. International Conference on 29 Aug.-2 Sept. 1999 Page(s):22

[20]

Birt, K.A., Graffy, J.J., McDonald, J.D., & El-Abiad A.H. (1967), Three phase load flow program, Power Apparatus and Systems, IEEE Transactions

on

Volume 95, Issue 1, Part 1, Jan. 1976 Page(s):59 – 65 [21]

Schlaepfer, F. Kelly, T.C. & Dewey, A.G (1967), Interactive Load Flow Program, IEEE Transactions on Power Apparatus and Systems, Volume PAS-91, Issue 1, Jan. 1972 Page(s):78 – 84.

[22]

Louie, K.W., Wang, A., Wilson, P., & Buchanan, P. (2003),

A new

powerful production grade load flow program for power system design and studies, Electrical and Computer Engineering, 2003. IEEE CCECE 2003. Canadian Conference, Volume 1, 4-7 May 2003 Page(s):603 - 606 vol.1 [23]

Microsoft Press (2001). Developing Microsoft Visio® Solutions, Microsoft Corporation.