05307400

Embed Size (px)

Citation preview

  • 8/12/2019 05307400

    1/6

    1

    AbstractRelays usually need to be tested under a variety of

    fault and non-fault scenarios. In order to better achieve this goal,

    relay testing simulation tools based on EMTP/ATP combined

    with MATLAB/C/FORTRAN have been studied by a few

    researchers. However, there is hardly a relay testing tool

    designed for PSCAD/EMTDC. An advanced simulation tool

    based on PSCAD and MATLAB for relay testing is proposed in

    this paper. The simulation tool can not only batch test relay

    performance under various scenarios automatically, but also can

    solve the problem of PSCAD not being able to automatically

    generate scenarios at different fault locations. Examples are

    given in this paper to illustrate the application of the proposed

    simulation tool in relay testing. Tips on how to use the proposed

    tool for neural network training are also included.

    KeywordsDigital Simulation, MATLAB, Power System,

    Protective relaying, PSCAD.

    I. INTRODUCTION

    omputer based protection system simulation has been

    studied for years and it has been proven to be an accurate

    and economic way for testing relay algorithms and settings.

    Especially after the advent of microprocessor and digital relay,

    computer based relay testing simulation became more popular

    for its convenience and flexibility. Users can easily change the

    settings of the power system to be tested, change the relay

    algorithms and settings and even test the relay under variousautomatically generated fault and non-fault scenarios.

    For conventional relays, it may be easier to set parameters

    and test if there is a graphic component pre-built in the EMTP-

    like software. However, an advanced language such as

    MATLAB is definitely more powerful and flexible to design

    and test users own relay algorithms, especially digital relay

    algorithms. For this kind of testing system, the power system

    model to be tested is usually built using transient programs

    such as EMTP and PSCAD. The relay algorithm can be

    written in one of the several programming languages, such as

    C, FORTRAN and MATLAB. The relay can be tested with

    either open-loop method or closed-loop method depending on

    the purpose of testing [1].EMTP has been widely used for simulating power system

    transients since it was developed. Alternative Transient

    Program (ATP) is a public domain licensed software based on

    the EMTP [2]. Relay testing simulation systems based on

    EMTP and ATP have been studied by a few researchers [1],

    [3]-[6]. Some of them proposed closed-loop interactive testing

    systems [1], [3], [5] and others proposed open-loop testing

    Xiaolei Liu ([email protected]) , A.H. Osman and O.P. Malik are with theUniversity of Calgary, Alberta, Canada, T2N 1N4.

    system, such as [4].PSCAD/EMTDC is another popular power system

    simulator for its fast simulation speed, accuracy and easy-to-

    use interface. However, there is hardly any relay testing

    simulation tool based on this simulator other than the

    interactive system using PSCAD and PLSA proposed in [2].

    In this paper, an advanced simulation tool based on PSCAD

    and MATLAB for relay open-loop batch testing is proposed.

    PSCAD has a multiple-run component designed for generating

    various fault and non-fault scenarios; however, the fault

    location cannot be automatically changed by PSCAD. The

    proposed simulation tool uses MATLAB to automatically

    implement the whole process, from calling EMTDC to

    generate various fault scenarios including different fault

    locations, to extracting data from EMTDC output data files

    and finally to testing relay algorithms or training artificial

    neural networks (ANN).

    II. SIMULATION TOOL FRAMEWORK

    The power system simulator product PSCAD consists of

    two parts, i.e. the Graphic User Interface (GUI) and the

    solution system. At the early stage of this product, users use

    the command line driven EMTDC system. After the invention

    of the PSCAD GUI, all information required is input using the

    easy-to-use GUI and EMTDC is rarely noticed anymore.

    However, EMTDC stand-alone execution is still usable [7].When this mode is used, EMTDC is run from a command line

    instead of from the GUI. This feature is very useful for the

    open-loop system proposed in this paper.

    When the power system model is input in the GUI and the

    run button is pressed, PSCAD will automatically execute

    three processes, i.e. compiling the project, making the project

    (assembly of the associated executable files to be run by

    EMTDC) and running the project (solving the performance

    equations and record data). After the compiling and making

    processes, a temporary folder will be created by PSCAD as

    shown in the middle part of Fig. 1. Among several files in the

    folder, an .exe file is created and can be used manually to

    run the project in EMTDC stand-alone mode. Besides, if there

    is transmission line section setup in the GUI, the input file

    .tli, line constant output file .tlo and the line constant

    program output file .out for the transmission line will be

    created during the compiling process through the PSCAD

    Line Constants Program (tline.exe).

    In the system proposed in this paper, the operation

    sequence is different from the normal mode. Step one, Users

    design their power system model using the PSCAD GUI and

    use the make button in PSCAD GUI to finish compiling and

    making processes, after which the temporary folder with the

    Advanced Simulation Tool for Relay TestingXiaolei Liu, Student Member, IEEE, A.H. Osman,Member, IEEEand O.P. Malik,Life Fellow, IEEE

    C

    978-1-4244-4283-6/08/$25.00 2008 IEEE

  • 8/12/2019 05307400

    2/6

    2

    above mentioned files will be created. After step one is done,

    the PSCAD GUI will be no longer in use.

    Fig. 1. The simulation tool scheme for open-loop relay testing

    At step two, the main program written in MATLAB will

    automatically finish all the tasks. It controls the whole testing

    process and mainly consists of four sections, i.e. initialization

    section, power system model section, data extraction sectionand digital relay algorithm section. The fault location

    information is updated at each iteration of the main program.

    This process is shown in the right part of Fig. 1, noted as

    MATLAB main program (step 2). All the four sections are

    introduced next.

    A. Initialization

    This section will clear MATLAB workspace variables,

    initialize fault location information and the step value to

    update the fault location. This section also collects the input

    information, such as the name of Map file (.map) and the

    name of output data file (.out), required for EMTDC stand-alone execution to be introduced in the next section.

    B. Power System Model

    In this section, the fault location loop starts. MATLAB

    needs to call a function linecon.m written by the authors to

    update line length information in the file .tli as shown in Fig.

    2, at each iteration. This tli file provides all input

    information required by the PSCAD Line Constants Program.

    MATLAB then calls the Line Constants Program and saves

    new output in the temporary folder. The last step in this

    section is for MATLAB to call the .exe file in the temporary

    folder, which will run EMTDC to solve the performanceequations and generate output data file, saved as .out in the

    temporary folder.

    Since both the Line Constants Program and the EMTDC

    stand-alone program are to be executed by using .exe file,

    the dos function in MATLAB is used to provide DOS

    environment required to run .exe. Besides, when the

    EMTDC stand-alone execution command .exe is called, a

    DOS based dialog window will pop up to ask users for file

    names and some other options. In order to make sure the

    MATLAB main system does not have to halt for this dialog

    window, DOS redirection command is used to direct all the

    questions to a pre-defined IN.DAT file.

    Fig. 2 Locate the line length information in the .tli file

    C. Data ExtractionWhen multiple-run component is used in PSCAD GUI, the

    names of output data files follow the form of

    X_r00001_01.out,X_r00002_01.out,

    X_r00003_01.out, where X is the user defined name for

    the output data file. The function genmat.m defined by the

    authors is used here to read all these data files and convert

    them to .mat form which is the MATLAB data form. The

    names of .mat files follow the same rule as .out files. So

    X_r00001_01.mat corresponds to X_r00001_01.out. The

    parameter settings, i.e. fault scenarios, which are changed each

    simulation run by the multiple-run component, are saved in a

    file called mrunout.out (default file name).

    D. Digital Relay Algorithm

    In this section, algorithms written in MATLAB are

    implemented. It can be digital relay algorithm, ANN training

    algorithm or any other algorithm needed to process output data

    from EMTDC. In this part, variable names should be assigned

    to the data extracted from EMTDC output file. When the

    EMTDC generates the output data file X_r00001_01.out, it

    also generates a file X_r00001.inf to save the structure of the

    output data file, as shown in Fig. 3. In this example .inf file,

    three variables, Va, Vb and Vc are recorded, which

    corresponds to the 2

    nd

    , 3

    rd

    and 4

    th

    column in the data file .out,respectively. The first column in .out file is always time

    information.

    In the first example of the simulation tool for this paper, the

    function MATrelay.m written by the authors is called in the

    main program to implement a digital distance relay. The

    details of the example will be introduced in a later section.

    After the digital relay algorithm section, fault location

    information will be updated and the program will go through

    the previous three sections again with the new fault location,

    i.e. new iteration.

  • 8/12/2019 05307400

    3/6

    3

    Fig. 3 EMTDC output structure file .inf and output data file .out

    III. SIMULATION EXAMPLES

    A. Simple distance relay testing example

    This example demonstrates the application of the proposed

    simulation tool to test a simple distance relay. The distance

    protection example provided by PSCAD 4.2 is used here as an

    original case, where both the power system model and the

    distance relay algorithm are implemented with PSCAD GUI

    only. The example is reproduced using the proposed

    simulation tool, where the power system model is built in

    PSCAD GUI and the digital relay algorithm is written in

    MATLAB.

    The power system built with PSCAD GUI is shown in Fig.

    4. The relay location is at the left hand end of the transmission

    line. A multiple-run component is used to change fault

    inception time, fault resistance and fault type. Fault location is

    changed by the MATLAB main program. Digital relay

    algorithm is implemented in MATLAB too, including phasorextraction and sequence component transformation as well as

    distance protection scheme part including impedance

    calculation and MHO characteristics. For example, the phasor

    extraction using Fast Fourier Transform [8][9] is defined as a

    MATLAB function phasor_extraction.m. The relay

    algorithm uses dynamic window method rather than static

    window method to better reproduce the original case.

    Fig. 4 Power system model build in PSCAD GUI

    Firstly, the results produced by the proposed simulation

    tool are the same with the original system. Various fault

    scenarios including different fault types, fault inception

    angles, fault resistance and fault locations are tested using the

    proposed simulation tool. It is found that the trip decisions are

    all the same with the original case, which proves the reliability

    of the proposed simulation tool for relay testing.

    For example, a permanent phase-AC-to-ground fault with

    1 ohm ground resistance is simulated at 50 km away from

    relay location. The trajectory of impedance calculated using

    the original system is shown in Fig. 5 and the trajectory

    calculated using the proposed simulation tool is shown in Fig.

    6. It can be found that they are identical.

    Fig. 5 Trajectory of impedance for distance relay using the original system

    Fig. 6 Trajectory of impedance for distance relay using the proposedsimulation tool

    Secondly, fault location has to be manually changed for the

    original case while it can be automatically changed when the

    proposed simulation tool is used. The proposed simulation tool

    also has additional features such as displaying the detection

    time and any other result in MATLAB command window as

    the program is running, and generating a final statistical report

    on how many percentages of faults are correctly detected, for

    instance. All these extra features are due to the powerful

    calculating ability of MATLAB.

    Thirdly, although the digital relay algorithm part can be

  • 8/12/2019 05307400

    4/6

    4

    implemented either with PSCAD GUI or with MATLAB in

    this example case, the algorithm is very complex or even

    impossible to be implemented with PSCAD GUI under many

    other situations. For example, when complex digital signal

    processing is required in the relay algorithm, or complex

    MHO shape is required, it has to be implemented with

    MATLAB-like software. The proposed simulation tool is one

    of the easiest alternatives for these situations. It also provides

    an efficient tool to generate a large amount of fault scenariosor to train ANN. One example of the above mentioned

    situation is shown in the following example.

    B. Fault detection using Discrete Wavelet Transform example

    In this example, there are at least two reasons that the

    proposed simulation tool should be used. First, the wavelet

    transform is more complex than Fourier transform. There is no

    wavelet transform module in PSCAD and it is very difficult

    for users to build their own wavelet transform module in

    PSCAD GUI, since knowledge of FORTRAN language would

    be required. On the other hand, MATLAB is more flexible and

    powerful at mathematical calculations. The MATLAB wavelettoolbox even provides the discrete wavelet transform function

    ready to use. Second, the algorithm should be tested under

    various fault scenarios to verify its validation. By using the

    proposed simulation tool, this process will be greatly

    simplified for users. All users need to do is to build the system

    model in the PSCAD GUI and input their relay algorithm in

    the Digital Relay Algorithm section, as shown in Fig.1.

    The power system model in this example is a 225 km long

    240 kV AC transmission line. It is very similar to the system

    shown in Fig. 4. For detailed parameter settings of the system

    see the Appendix of [10]. A fault detection method is

    proposed in [10]. Discrete Wavelet Transform is applied to

    three phase currents and then the norms of the first level detailcoefficients are calculated for each phase. If any one of the

    three norms exceeds a threshold, a fault is detected. For a

    double-line-to-ground fault 10 km away from the relay

    location, with 100 ohms ground resistance, the norms are

    shown in Fig. 7. Shortly after the fault occurs at 0.19896 s,

    norms for both phase A and phase B exceed the threshold (0.4

    in this case) and the fault is successfully detected.

    In order to make sure that the fault detection algorithm is

    sensitive, it should be tested under various situations, such as

    fault scenarios with different fault inception time, ground fault

    resistance, fault type, fault location and under different load

    angles. The combination of these situations will be an

    extremely large number. The proposed simulation tool is very

    efficient in dealing with this situation. After users build the

    power system model (step 1) in PSCAD GUI and run the

    MATLAB main program (step 2), the performance of the fault

    detection algorithm can be automatically tested under tens of

    thousands of fault scenarios. The detection times under some

    fault scenarios are shown in Table I. It is obvious that faults

    can be detected shortly after the fault inception with the

    detection algorithm proposed in [10].

    Fig. 7 Calculated norms for ABG fault close to relay end of the line with 100

    ohms ground resistance

    Table I Fault Detection time (s)under various scenarios

    Fault

    inception

    (s)

    Fault

    resistance

    Fault

    type

    Fault location

    10 km 90km 170km

    0.19896 1 AG 0.2021 0.2083 0.2104

    ABG 0.2000 0.2031 0.2083

    100 AG 0.2073 0.2094 0.2177

    ABG 0.2042 0.2073 0.2146

    0.20174 1 AG 0.2031 0.2094 0.2115

    ABG 0.2031 0.2052 0.2094

    100 AG 0.2073 0.2094 0.2177

    ABG 0.2073 0.2094 0.2177

    0.20452 1 AG 0.2094 0.2115 0.2188

    ABG 0.2073 0.2104 0.2125

    100 AG 0.2104 0.2167 0.2240

    ABG 0.2104 0.2146 0.2229

    Not only should the fault detection algorithm be sensitive,

    it should also be reliable under no fault situations. The fault

    detection algorithm should be able to distinguish line charging

    (including simultaneous line charging and staggered line

    charging) from regular faults. For example, when the circuit

    breaker (CB) on the right hand end of the line closes on a

    healthy line before the CB on the left hand end of the line

    closes (staggered line charging), none of the norms exceed the

    threshold 0.4, as shown in Fig. 8.

    The fault detection algorithm should also be able to

    distinguish closing on healthy line and faulty line. Again, the

    combination of scenarios can be a huge number. With the

    proposed simulation tool, it is very easy to fulfill the testing of

    the detection algorithm under as many scenarios as needed.

    The detection times under some scenarios are shown in Table

    II. It can be found that the algorithm does not detect fault

    when closing on a healthy line. When closing on a faulty line,

    the fault can be detected effectively, no matter whether it is a

    simultaneous line charging or staggered line charging.

  • 8/12/2019 05307400

    5/6

    5

    Fig. 8 Calculated norms for staggered line charging on a healthy line

    Table II Fault detection time (s)under line charging on both healthy line andfaulty line

    Line

    charging

    type

    Healthy

    or

    faulty

    line

    Fault

    resist

    -ance

    Fault location

    10 km 90 km 170 km

    Simul-

    taneously

    Healthy N.A. N.A. N.A. N.A.

    BCG 1 0.2021 0.2063 0.2115

    100

    0.2073 0.2104 0.2188

    Right CB

    closes

    first

    Healthy N.A. N.A. N.A. N.A.

    BCG 1 0.2021 0.2063 0.2115

    100

    0.2083 0.2104 0.2167

    Left CB

    closes

    first

    Healthy N.A. N.A. N.A. N.A.

    BCG 1 0.2313 0.2333 0.2375

    100

    0.2365 0.2417 0.2500

    C. Artificial Neural Network Training

    The application of ANN in power system protection has

    been studied by many researchers [11][12]. ANN training has

    similar requirement with digital relay algorithms testing in the

    sense that data from many scenarios are needed and the ANN

    algorithms are also difficult to implement directly in PSCAD

    GUI. Some of them also require data of faults at different line

    locations. Therefore, the proposed simulation tool can also be

    applied to ANN training.

    During the training stage, the system structure is exactly the

    same as the scheme shown in Fig. 1. The ANN training

    program should be written within the Digital Relay

    Algorithm section. If there is fault location iteration, the ANN

    is trained at each iteration; the final weight of the last iteration

    should be used as the initial weight for the next iteration to

    carry on the training. If there is no fault location iteration

    required, the training will be even simpler. Random data

    should be selected for training and the file names of the

    unused data should be saved to a file for future ANN testing.

    Example of applying the proposed simulation tool to ANN

    training is not given here since the procedure is very similar to

    the first two examples.

    IV. CONCLUSIONS

    A powerful simulation tool for relay open-loop batch

    testing using PSCAD/EMTDC and MATLAB is proposed in

    this paper. The proposed simulation tool can not only generate

    different fault scenarios and test relay algorithms

    automatically, but also can solve the problem that PSCADmultiple-run component cannot change fault location

    automatically. It can also be applied to ANN training and

    some other algorithms testing too. Two simulation examples

    are given to illustrate the effectiveness of the proposed

    simulation tool and the procedure of applying it to relay

    testing. Tips on how to use the proposed simulation tool in

    ANN training are included. This paper also illustrates how

    PSCAD works in a deeper level and explores PSCAD file

    systems.

    V. REFERENCES

    [1] M. Kezunovic and Q. Chen, "A novel approach for interactive protectionsystem simulation,"IEEE Transactions on Power Delivery, vol. 12, no.2, pp. 668-674, April 1997,

    [2] S.G.A. Perez, M.S. Sachdev and T.S. Sidhu, "Modeling relays for use inpower system protection studies," Proceedings, 2005 Canadian

    Conference on Electrical and Computer Engineering, pp. 566-9.

    [3] J. Mahseredjian, G. Benmouyall, X. Lombard, M. Zouiti, B. Bressac andL. Gerin-Lajoie, "A link between EMTP and MATLAB for user-defined

    modeling," IEEE Transactions on Power Delivery, vol. 13, no. 2, pp.667-74, April 1998,

    [4] N. Zhang and M. Kezunovic, "Implementing an advanced simulationtool for comprehensive fault analysis," Proceedings, 2005 IEEE/PESTransmission and Distribution Conference and Exhibition - Asia and

    Pacific, pp. 1-6.

    [5] X. Luo and M. Kezunovic, "Interactive Protection System SimulationUsing ATP MODELS and C++," Proceedings, 2005/2006 IEEE/PES

    Transmission and Distribution Conference and Exhibition, pp. 6, 2006

    [6] K.H. So, J.Y. Heo, C.H. Kim, R.K. Aggarwal, J.C. Kim and G.S. Jang,"An implementation of current differential relay and directionalcomparison relay using EMTP MODELS,"Electrical Power and Energy

    Systems, vol. 28, pp.261272, 2006.

    [7] PSCAD/EMTDC Runtime Manual, Manitoba HVDC Research Center,pp. 56-57, 1994.

    [8] L. Wu, C. liu and C. Chen, "Modeling and testing of a digital distancerelay using MATLAB/SMULINK," Proceedings of the 37th Annual

    North American Power Symposium, pp. 253-9, 2005.

    [9] A.G. Phadke, J.S. Thorp, and M.G. Adamiak, "A new measurementtechnique for tracking voltage phasors, local system frequency, and rate

    of change of frequency," IEEE Transactions on Power Apparatus and

    Systems, vol. PAS-102, no. 5, pp 1025-38, May 1983.

    [10] A.H. Osman, "Transmission Line Protection Techniques Based onWavelet Transform," Ph.D. dissertation, Department of electrical andcomputer engineering, the University of Calgary, 2003.

    [11] Y.H. Song, Q.X. Xuan and A.T. Johns, Comparison studies of fiveneural network based fault classifier for complex transmission lines,

    Electric Power Systems Research,vol. 43, no. 2, pp.125-32, Nov. 1997.

    [12] F. Martin and J.A. Aguado, Wavelet-Based ANN approach fortransmission line protection,IEEE Transactions on Power Delivery,

    vol. 18, no. 4, pp. 1572-4, Oct. 2003.

    VI. BIOGRAPHIES

    Xiaolei Liu (S07) received his B.Sc. from P.R. China in 2005. He is

    currently pursuing the Ph.D. degree at the University of Calgary, Calgary, AB,

  • 8/12/2019 05307400

    6/6

    6

    Canada. His area of interests includes digital protection relaying, signal

    processing, neural network and HVDC systems.

    A.H. Osman (S01, M03) received his B.Sc. and M.Sc. in electrical

    engineering from Helwan University, Cairo, Egypt in 1991 and 1996,respectively. In 2003 he received his PhD in electrical engineering from the

    University of Calgary, Canada. Currently he is an assistant professor in

    Department of Electrical and Computer Engineering at the University of

    Calgary, AB, Canada. His areas of interest include power system engineering,

    digital protection relaying, signal processing and power electronics.

    O.P. Malik (M66SM69LF00) received the National Diploma in

    electrical engineering from Delhi Polytechnic, Delhi, India, the M.E. degree in

    electrical machine design from Roorkee University, Roorkee, India in 1962

    and received Ph. D. degree from the University of London and D.I.C. from the

    Imperial College, London, England in 1965. In 1974, he became a Professorin Department of Electrical and Computer Engineering, University of Calgary,

    Calgary, AB, Canada and is presently professor emeritus there. He has

    performed research work in collaboration with teams from Russia, Ukraine,China, Egypt and India. In addition to his research and teaching, he has served

    in many additional capacities at the University of Calgary including Associate

    Dean of Academics/Student Affairs and Acting Dean of the Faculty of

    Engineering.