Sie sind auf Seite 1von 5

Proceedings of 2014 IEEE

International Conference on Mechatronics and Automation


August 3 - 6, Tianjin, China

A simulation toolbox based on an integrated automatic


mechanism for ATP and Matlab
Rui Niu, Jun Liang, Zhihao Yun, and Hongtao Wang Zhongkang Wei
School of Electrical Engineering State Grid Jibei Electric Power Company Limited
Shandong University, Beijing, Zaolinqian Road 100053, China
Jinan, Jingshi Road 250061, China
sdjcnr@126.com

Abstract - An integrated automatic mechanism for Matlab powerful computation and plotting function, and provides high
invoking the kernel of ATP is proposed. Based on the level functions that enable a portable programming of a
mechanism, a power system transient simulation toolbox is graphical user interface [6], so it is a powerful tool for
developed for interactive setup, automatic simulation, evaluation achieving user interaction and data processing. Thus, it is
of protection algorithms and fault location methods, and
necessary to study how to merge both advantages of ATP and
transient computation. Parallel computing technology is adopted
to improve its efficiency, and the data structure guarantees the Matlab to improve the automation and efficiency of simulation
modularity. The toolbox provides a very modular, flexible and and to combine simulation and data analysis.
user-friendly tool for education, research and equipment tests. This paper proposes an integrated automatic invocation
An example demonstrates the unification of the toolbox in the mechanism (IAIM) for ATP and Matlab. Based on the IAIM,
simulating automation, data analysis capability and high a user-friendly simulation toolbox is developed. The toolbox
efficiency. is provided with user interactive setup and control, automatic
simulation for traversal models, optional data saving with the
Index Terms - Simulation, Matlab, ATP, Automation, general standard, algorithms validation, and transient results
Toolbox.
analysis. The parallel computing technology is adopted to
improve the efficiency. The IAIM and the extensibility of the
I. INTRODUCTION
system establish the good basis for the further research and
The post fault transient electrical quantities are affected application. A case demonstrates the application and its
by many factors, including fault type, fault location, fault convenience as well as high efficiency.
inception angle, fault resistance, et al. Therefore, large
II. IAIM FOR ATP AND MATLAB
volumes of fault data and data processing of different fault
scenarios are needed for both theoretical research and ATP is used to implement accurate electromagnetic
equipment tests [1], such like the design and evaluation of transient simulation [7]. Since the execution is completely
protection algorithms and fault location methods, overvoltage encapsulated, duplication of manual operation is needed for
computing along the line, relay tests and fault recording and different modified models. Due to the lack of advanced data
locating equipment tests. Comprehensive and effective processing capability, simulation results have to turn to other
computation and tests need thousands of simulation. The softwares for analysis. The IAIM is proposed to incorporate
repetition of manual setting and operation is costly and the advantages of both ATP and Matlab.
laborious and may result in human errors. The automatic The operation principles are the basis of IAIM for
simulation of multi-parameter varying and the efficient data Matlab and ATP. The ATP program mainly comprises of three
processing have become an urgent need. files: ATPDraw, Tpbig.exe and STARTUP. Graphical
EMTP is a recognized authoritative program on modelling is carried out using ATPDraw. The resulting
simulating power system transients for its accuracy and diagram is translated into a binary-encoded *.atp file
comprehensive model library. Due to the lack of complex data following specific rules. Then the *.atp file is executed by
processing capability, interaction between EMTP and Matlab Tpbig.exe to complete the simulation, and results are yielded
were discussed in [2, 3]. However, the application of EMTP is in form of a *.pl4 file. The ATP package offers Pl42mat
limited for its business feature and high cost. ATP is the program to convert simulation results to mat files available in
widely-used free version based on EMTP, but it needs manual Matlab environment. Afterwards, Matlab takes over the data
operation on each simulation and cannot deal with advanced files for processing and one round of simulation-analysis is
data analysis. A batch simulation by ATP was proposed in [4] completed.
by Windows message passing, but the efficiency was impacted Fig. 1 illustrates the principle of IAIM. Different
by message passing reliability. An interactive scheme based parameters are set by Matlab based on its capability of reading
on ATP and Matlab was proposed in [5], which copied the and writing binary files and the basic structure of the *.atp file
*.atp file to a temporary file and modified its settings with as shown in Fig. 1(a). Then Matlab invokes the Tpbig.exe to
Matlab. The scheme may affect the stable operation of ATP execute the modified *.atp file. Simulation results are yielded
since massive amounts of *.atp files are generated and all fault in form of a *.pl4 file. Afterwards, the Pl42mat.exe is called
parameters need to be modified for each file. Matlab has by Matlab to translate the simulation results into mat files. At

978-1-4799-3979-4/14/$31.00 2014 IEEE 2039


last, these mat files are saved to a specific location following Based on the IAIM for ATP and Matlab, a toolbox used
some data storage convention under the guidance of Matlab. for simulation of power system electromagnetic transients is
As shown in the Fig. 1(b), the one-time setup is required for proposed.
users by the GUI to determine the variation range of multiple
III. MAIN FEATURES AND FUNCTIONS OF THE TOOLBOX
parameters. Matlab processes the setup into a nested loop, in
which each execution is completed by application of IAIM. A. Main features of the toolbox
All modification in one model is within one *.atp file to 1) Simplicity of use. The toolbox is portable with a series
simplify the setup. of *.m files; each block has a user-friendly interface and all
procedures implemented in this toolbox can be launched by
IAIM
means of buttons, tabs, menus, et al; ATP can be invoked in
the background automatically to complete a lot of simulations.
ATPDraw
2) High efficiency. A large number of fault scenarios can
be set for one time and then execute automatically; the
Modify *.atp file Modify Headline simulation is speed up using the parallel computing
Control models data technology. Moreover, a consistent convention for naming and
Invoke
Tpbig.exe Input storage is used to facilitate data extraction.
Brunch data
3) Expandability. User defined blocks can be added to an
Matlab
*.pl4 file Switch data existing model in the setup module; the algorithm validation
Source data
module allows users to submit new algorithms for
Invoke Pl42mat.exe performance evaluation.
Output data
Save data to ... B. Main modules of the toolbox
specific locations
*.mat file The basic structure of The toolbox comprises of parameter setting module,
the *.atp file simulation module, algorithm validation module, and data
Naming and storing analysis module. The synoptic scheme of the toolbox is
rules
depicted in Fig. 2. All of the setup and operation information
are stored in a Matlab global variable, which will update in
(a) real time with setup and operation. The global variable
separates the user interface with the background. Modules
keep independent with the interface and other modules based
on communication with the global variable and simulation
data files. As a result, the toolbox operates modularly and
provides scalability to the future improvement.
Parameters loop

(b)
Fig. 1. IAIM for ATP and Matlab
IAIM

Users only need to interact with the graphical interface,


while all of the simulations run in the background. None
manual intervention is participated in simulations to guarantee
the automation and reliability of the toolbox. The IAIM Fig. 2. Synoptic scheme of the toolbox
enables ATP functionally to be one embedded module of
Matlab. Thus, Matlab can make full use of the advantages of 1) Setting module
ATP to extend functionality, such as flexible and efficient This module consists of three parts: system setup, model
transient computation, study on the influence of the setup and fault parameters setup. The first part includes the
parameters on the system performance, verification of the settings of the sample frequency, simulation time, and data
accuracy of other simulation software, et al. storage location, et al. The second part allows users to build
new models or modify blocks of built-in models. The third

2040
part includes settings of fault parameters. Fig. 3 shows that the codes. If a new function has been submitted, it will be added
fault parameters are set by initial value, step size and final to the algorithm options and become optional. The interface
value. will be terminated with a warning message if parameters used
in the function do not match the given input and output ones.

Fig. 3. GUI for parameter setting

2) Simulation module
This simulation process can be started, paused, continued
and terminated by a series of command buttons in this module.
The IAIM and the parallel computing technology are used for
automatic and effective simulation. Fig. 4. GUI for user defined algorithm submission
The data structure and modularity of the toolbox enable
The evaluation results will be displayed in downloadable
each simulation to run along with information from the global
spreadsheets.
variable. Thus, simulations keep independent with each other
4) Data analysis module
and can run simultaneously without mutual communication,
Fig. 5 depicts the fault scenario selection window. The
which makes parallel computing feasible. The toolbox
toolbox extracts specific data files based on the global variable
automatically detect whether the computer where it is installed
representing users selection, and then displays the
has configured the Matlab Distributed Computing Server
waveforms. Based on these waveforms, transient data analysis
(MDCS) to determine the parallel method. If installed, the
and computation can be achieved, such as harmonic analysis,
toolbox adopts the cluster method to allocate the simulations
sequence component analysis, and the RMS computation, et
to all nodes of the cluster for parallel computing; otherwise the
al.
toolbox takes use of the multi-core processors to improve the
simulation speed. With the increase of the number of
simulation times, the parallel computer cluster is much more
prominent since time spent in data communication is much
less than in simulation. The future version of the toolbox will
develop parallel computing method combined with cloud
computing to use idle resources to further increase efficiency.
For compatibility with common format for transient data
exchange for power systems, the toolbox provides the format
conversion button to save simulation results as files based on
the IEEE COMTRADE 199[8]. Due to the single sampling
frequency and no state variables involved, the converted
configuration files keep concise and the converted data files
keep nicely formatted.
3) Algorithm validation module
Fig. 5. GUI for fault scenario selection
This module consists of algorithm validation and results
display. The algorithms are mainly three types: filtering, IV. CASE STUDY
protection and fault location. Each type contains common
To evaluate the performance of the toolbox, test models
algorithms in the respective fields. Moreover, the toolbox
with the toolbox and with normal operation have been
provides function for evaluating user defined algorithms. As
performed. Table I shows the settings of fault parameters. The
shown in Fig. 4, the input and output parameters have been
number of the simulation times is 1055462.
given and a text-editor shell is opened for users to add Matlab

2041
TABLE I Fig. 6. Comparison of operation procedures
FAULT PARAMETERS SETUP
The operational procedures with conventional method
Initial Step Terminal and with the toolbox are depicted in Fig. 6. Compared to the
value size value duplication of normal manual settings, operation and turning
to Matlab for data processing in the normal way, the toolbox
Fault inception angle demonstrates its automation and convenience with using
10 10 180
() modules of the graphical user-interface. Table II records the
Fault indistance single simulation time and the total simulation time of the
20 10 280
km
toolbox. The total simulation time of normal operation is got
Fault resistance () 0 10 300 by the single simulation time multiplied with 105462. The
Power source angle ratio of total time with normal method and with the toolbox is
0 10 60

up to 6.63:1 in favour of the parallel computing adopted in the
toolbox. Considering the manual operation before every
Conventional operation Operation with the toolbox simulation in the normal way, the consuming time ratio will
be far greater.
Modify one parameter in the Set all fault parameters in the
ATPDraw interface setting module
TABLE II
COMPARISON OF SIMULATION TIME

Run the atp model


Execuate the simulation Single simulation time (s) 1.075
module
Total simulation time of normal operation (s) 1.13e5
Excuate Algorithm validation and results
Total simulation time of the toolbox (s) 1.71e4
Convert the output into *.mat file
the loop display in the validation module
105462
times Evaluate the impedance fault location method using the
Matlab load the *.mat file
Data analysis and results display in simulation data files and part of the resulting spreadsheet is
the data analysis module
shown in Table III.
The table header lists information of the simulation
Algorithm validation and data processing model and the algorithm, and different sheets represent
different fault types. Fault location errors under all the fault
Display processing results scenarios are integrated into one table, which benefits the
effective and intuitive analysis of the algorithm performance.

Table III
PART OF SPREADSHEET FOR ALGORITHM PERFORMANCE EVALUATION

Single ended fault location errors (%)Impedance-Kalman_filtering

Fault inception angle () 10 10 10 10 10 10 10

Power angle differences () 0 0 0 0 0 0 0


Fault resistance ()
0 10 20 30 40 50 60
Fault distance (km)
50 0.191 0.212 0.197 -0.188 0.293 -0.475 0.384
100 0.578 0.83 1.252 1.203 1.54 1.61 1.633
150 0.726 1.369 1.53 1.632 1.787 1.815 1.704
200 -0.881 1.581 1.536 2.011 2.316 2.319 2.211
250 -1.513 2.119 2.335 2.011 2.337 2.583 2.503

processing. It is a convenient and effective tool for research


V. CONCLUSION
and equipment test The proposed IAIM establishes the
An integrated automatic invocation mechanism (IAIM) foundation for further research on power system transients and
for ATP and Matlab is proposed in this paper. The IAIM the improvement of the toolbox.
enables dynamic parameter adjustment and automatic
execution of ATP models. A power system transient ACKNOWLEDGMENT
simulation toolbox is developed based on the IAIM. The
presented toolbox is modular and flexible which merges user
interactive control, automatic simulation and complex data

2042
This paper Supported by the National High-tech Research
and Development Program of China (863 Program) under
Grant No. 2011AA05A101.
REFERENCES
[1] L. Hong, T. Tankzawa, and M. Kuriyama. Advanced Protection Relay
Test System using a Digital Simulator. National conference of IEEJ, pp.
141-146, 2011.
[2] M. Kezunovic , Q. Chen. A novel approach for interactive protection
system simulation. IEEE Transactions on Power Delivery, vol. 12, no. 2,
pp. 668-674, 1997.
[3] J. Mahseredjian, G. Benmouyall, X. Lombard, M. Zouiti, B. Bressac, L.
Lajoie. A link between EMTP and MATLAB for user-defined
modeling. IEEE Transactions on Power Delivery, vol. 13, no. 2, pp. 667-
674, 1998.
[4] S. Su, X. Duan, and X. Zeng. ATP-Based automated fault simulation.
IEEE Transactions on Power Delivery, vol. 23, no. 3, pp. 1687-1689,
2008.
[5] J. Mora, J. Bedoya, and J. Melendez. Extensive Events Database
Development using ATP and Matlab to Fault Location in Power
Distribution Systems. Transmission & Distribution Conference and
Exposition, 2006, 1-6.
[6] MATLAB, high-performance numeric computation and visualization
software. The Math Works, Inc. MATLAB Users guide. August 1992
[7] Canadian/American EMTP User Group, Alternative Transient Program
(ATP) Rule Book, Portland, Oregon, 1992.
[8] IEEE Std C37. 111-1999. IEEE standard common format for transient
data exchange (COMTRADE) for power systems.

2043

Das könnte Ihnen auch gefallen