CN105069265B - Realize the system that ATP electric system simulation computation models automatically generate operation - Google Patents
Realize the system that ATP electric system simulation computation models automatically generate operation Download PDFInfo
- Publication number
- CN105069265B CN105069265B CN201510564740.2A CN201510564740A CN105069265B CN 105069265 B CN105069265 B CN 105069265B CN 201510564740 A CN201510564740 A CN 201510564740A CN 105069265 B CN105069265 B CN 105069265B
- Authority
- CN
- China
- Prior art keywords
- simulation
- module
- simulation calculation
- atp
- data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000004088 simulation Methods 0.000 title claims abstract description 213
- 238000004364 calculation method Methods 0.000 claims abstract description 148
- 238000012545 processing Methods 0.000 claims abstract description 20
- 230000005540 biological transmission Effects 0.000 claims description 5
- 235000013399 edible fruits Nutrition 0.000 claims 1
- 230000009466 transformation Effects 0.000 claims 1
- 238000000034 method Methods 0.000 description 15
- 230000015556 catabolic process Effects 0.000 description 5
- 230000006870 function Effects 0.000 description 4
- 238000004422 calculation algorithm Methods 0.000 description 3
- 238000006243 chemical reaction Methods 0.000 description 3
- 238000013461 design Methods 0.000 description 3
- 238000002360 preparation method Methods 0.000 description 3
- 230000001052 transient effect Effects 0.000 description 3
- 238000005457 optimization Methods 0.000 description 2
- 238000013528 artificial neural network Methods 0.000 description 1
- 230000007812 deficiency Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 238000009413 insulation Methods 0.000 description 1
- 239000002245 particle Substances 0.000 description 1
- 230000003252 repetitive effect Effects 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Landscapes
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
Description
技术领域technical field
本发明涉及电力系统仿真计算的技术领域,尤其涉及一种实现ATP电力系统仿真计算模型自动生成与运行的系统。The invention relates to the technical field of power system simulation calculation, in particular to a system for realizing automatic generation and operation of an ATP power system simulation calculation model.
背景技术Background technique
仿真计算是进行电力系统规划设计、运行调度和事故分析的必需技术手段,准确合理的仿真计算模型是进行有效仿真计算的前提和基础。ATP软件是一个用于各种电力系统设计及校核的快速、精确和易于使用的电力系统模拟器,可广泛应用于电磁暂态过程,架空线路防雷设计,高压/超高压输电系统运行与控制等方面的研究,是目前暂态仿真领域通用的分析工具。Simulation calculation is a necessary technical means for power system planning and design, operation scheduling and accident analysis. Accurate and reasonable simulation calculation model is the premise and basis for effective simulation calculation. ATP software is a fast, accurate and easy-to-use power system simulator for various power system design and verification. It can be widely used in electromagnetic transient process, lightning protection design of overhead lines, high voltage/ultra high voltage transmission system operation and Research on control and other aspects is a common analysis tool in the field of transient simulation.
但是,随着电网规模的不断扩大,系统元件数量的不断增加,仿真计算需解决问题难度的不断加大,都增加了仿真计算模型编制的复杂程度,也对模型编制人员的专业技术水平提出了更高的要求。目前绝大部分仿真计算模型仍是由运行人员手工编制,由于网络规模大,元件数量多,导致模型编制工作量大,重复工作多,出错几率高且不易查找。同时手工编制属于离线编制方式,不能反映实时的网络运行状态,所得模型时效性差、可信度不高。电力系统仿真计算结果的分析等工作依靠电力部门运行人员完成是非常困难且不现实的。因此,目前仿真计算模型的手工编制方式已不能适应这种新的形势,甚至模型编制任务无法完成。为解决上述问题,目前虽有根据网络拓扑和元件参数来自动完成仿真计算模型编制的方法,但由于仿真计算过程中使用的算法为自主开发,功能极其有限,且其可信度明显低于ATP此类广为应用的仿真计算软件;或在生成仿真计算模型时,仍需要编制人员人工收集必需的数据,并转换为特定的格式,同样存在工作量大和出错几率高的问题。However, with the continuous expansion of the grid scale, the continuous increase in the number of system components, and the continuous increase in the difficulty of solving problems in simulation calculations, the complexity of simulation calculation models has been increased, and the professional technical level of model compilers has also been raised. higher requirement. At present, most of the simulation calculation models are still compiled manually by operators. Due to the large network scale and the large number of components, the model compilation workload is heavy, there are many repetitive tasks, the probability of errors is high, and it is difficult to find. At the same time, manual compilation is an off-line compilation method, which cannot reflect the real-time network operation status, and the resulting model has poor timeliness and low reliability. It is very difficult and unrealistic to rely on the operation personnel of the power department to complete the analysis of the simulation calculation results of the power system. Therefore, the current manual compilation of simulation calculation models can no longer adapt to this new situation, and even the task of model compilation cannot be completed. In order to solve the above problems, although there is currently a method to automatically complete the simulation calculation model compilation according to the network topology and component parameters, because the algorithm used in the simulation calculation process is self-developed, its functions are extremely limited, and its reliability is significantly lower than that of ATP Such widely used simulation calculation software; or when generating the simulation calculation model, the compiler still needs to manually collect the necessary data and convert it into a specific format, which also has the problems of heavy workload and high error probability.
因此,若能直接从电力系统各种原始数据出发,自动生成仿真计算软件能调用的仿真计算模型并根据需要自动循环运行,可极大简化模型编制过程,降低模型编制难度,提高模型准确性,还可使工作人员专注于后续分析过程,提高仿真计算的效率。Therefore, if the simulation calculation model that can be invoked by the simulation calculation software can be automatically generated directly from various raw data of the power system and automatically cycled as needed, the model compilation process can be greatly simplified, the difficulty of model compilation can be reduced, and the accuracy of the model can be improved. It can also enable staff to focus on the subsequent analysis process and improve the efficiency of simulation calculations.
发明内容Contents of the invention
本发明的目的在于克服现有技术的不足,提供一种实现ATP电力系统仿真计算模型自动生成与运行的系统,根据电力系统各种原始数据,自动生成相应ATP仿真计算模型,并根据需要自动循环运行,从而简化仿真计算中的模型编制过程,减小模型编制的难度,提高仿真计算的效率。The purpose of the present invention is to overcome the deficiencies of the prior art, to provide a system that realizes the automatic generation and operation of the ATP power system simulation calculation model, and automatically generates the corresponding ATP simulation calculation model according to various original data of the power system, and automatically circulates as needed Running, thereby simplifying the model compilation process in the simulation calculation, reducing the difficulty of model compilation, and improving the efficiency of simulation calculation.
本发明技术方案提供一种实现ATP电力系统仿真计算模型自动生成运行的系统,包括数据格式处理模块11、仿真计算模型主文件生成模块12、数据卡生成模块13、仿真计算模型程序生成模块14、仿真计算模型程序自动执行模块15、仿真计算结果判断模块16、仿真计算模型参数调整模块17和仿真计算结果输出模块18;The technical solution of the present invention provides a system for automatically generating and running ATP power system simulation calculation models, including a data format processing module 11, a simulation calculation model master file generation module 12, a data card generation module 13, a simulation calculation model program generation module 14, Simulation calculation model program automatic execution module 15, simulation calculation result judgment module 16, simulation calculation model parameter adjustment module 17 and simulation calculation result output module 18;
所述数据格式处理模块11,用于将电力系统的原始数据,转换成ATP仿真计算模型主文件所需要的格式;The data format processing module 11 is used to convert the raw data of the power system into the required format of the ATP simulation calculation model master file;
仿真计算模型主文件生成模块12,用于根据数据格式处理模块11的转换结果生成ATP仿真计算模型主文件,包括在主文件中加入各个仿真计算模型中所涉及到元件的文本;The simulation calculation model master file generating module 12 is used to generate the ATP simulation calculation model master file according to the conversion result of the data format processing module 11, including adding the text of the involved elements in each simulation calculation model in the master file;
数据卡生成模块13,用于根据仿真计算模型主文件生成模块12所得ATP仿真计算模型主文件和架空线路仿真计算模型文件生成相应的数据卡,架空线路仿真计算模型文件包括架空线路的参数;Data card generating module 13 is used to generate corresponding data cards according to the obtained ATP simulation computing model master file and overhead line simulation computing model file according to simulation computing model master file generating module 12, and the overhead line simulation computing model file includes the parameters of overhead line;
仿真计算模型程序生成模块14,用于将数据卡生成模块13所得各种数据卡进行连接,生成能够执行的ATP仿真计算模型程序;The simulation calculation model program generation module 14 is used to connect the various data cards obtained by the data card generation module 13 to generate an executable ATP simulation calculation model program;
仿真计算模型程序自动执行模块15,用于自动运行仿真计算模型程序生成模块14生成的ATP仿真计算模型程序,得到仿真结果文件;The simulation calculation model program automatic execution module 15 is used to automatically run the ATP simulation calculation model program generated by the simulation calculation model program generation module 14 to obtain the simulation result file;
仿真计算结果判断模块16,用于从仿真计算模型程序自动执行模块15所得仿真结果文件中读取仿真计算结果;The simulation calculation result judging module 16 is used to read the simulation calculation result from the simulation result file obtained by the simulation calculation model program automatic execution module 15;
仿真计算模型参数调整模块17,用于根据仿真计算结果判断模块16读取的仿真计算结果对仿真模型参数进行调整,包括判断仿真计算结果是否满足预先设定的要求,如果满足要求,则将命令仿真计算结果输出模块18输出显示当前的仿真计算结果,否则根据仿真计算结果与目标值的差异情况,对仿真模型参数进行调整,将新的参数送至仿真计算模型主文件生成模块12,命令仿真计算模型主文件生成模块12重新生成ATP仿真计算模型主文件;The simulation calculation model parameter adjustment module 17 is used to adjust the simulation model parameters according to the simulation calculation result read by the simulation calculation result judging module 16, including judging whether the simulation calculation result meets the preset requirements, and if it meets the requirements, the command The simulation calculation result output module 18 outputs and displays the current simulation calculation result, otherwise, the simulation model parameters are adjusted according to the difference between the simulation calculation result and the target value, and new parameters are sent to the simulation calculation model master file generation module 12, and the command simulation Calculation model master file generating module 12 regenerates the ATP simulation calculation model master file;
仿真计算结果输出模块18,用于输出显示满足要求的仿真计算结果。The simulation calculation result output module 18 is used to output the simulation calculation results that meet the requirements.
而且,数据格式处理模块11对电力系统的原始数据进行转换的实现方式为,按照ATP对模型文件格式的要求,进行数据格式处理,转成所要求长度的字符;实现方式为,当数据长度过长时,转为科学计数法的形式,并转成字符串的形式保存,当数据长度不够时,在前面补空格,并转成字符串的形式保存。Moreover, the data format processing module 11 implements the conversion of the original data of the power system by performing data format processing according to the requirements of ATP on the model file format, and converting it into characters of the required length; For a long time, it will be converted to the form of scientific notation and saved in the form of a string. When the length of the data is not enough, spaces will be filled in front and converted to a string for storage.
本发明一方面能自动生成ATP仿真计算模型,极大简化仿真计算模型编制过程,降低模型编制难度,减少人工成本,提高模型编制效率,提高模型准确度;另一方面能自动按照要求调整模型参数并自动重复生成ATP仿真计算模型并运行,自动根据仿真结果调整模型参数,极大简化了利用仿真计算求解指标参数的过程,提高了利用ATP进行电力系统仿真计算的自动化水平。本发明技术方案适用于多种需要进行电力系统仿真计算的应用场合,如架空线路雷电初始击穿电流幅值的确定,高压直流输电滤波器滤波效果的分析等,尤其在电力系统复杂、仿真模型规模较大时更能体现本发明方案的优越性。On the one hand, the present invention can automatically generate the ATP simulation calculation model, greatly simplify the simulation calculation model preparation process, reduce the difficulty of model preparation, reduce labor costs, improve model preparation efficiency, and improve model accuracy; on the other hand, it can automatically adjust model parameters according to requirements And the ATP simulation calculation model is automatically generated and run repeatedly, and the model parameters are automatically adjusted according to the simulation results, which greatly simplifies the process of solving index parameters using simulation calculations, and improves the automation level of power system simulation calculations using ATP. The technical solution of the present invention is applicable to a variety of application occasions that require power system simulation calculations, such as the determination of the initial lightning breakdown current amplitude of overhead lines, the analysis of the filtering effect of high-voltage direct current transmission filters, etc., especially in complex power systems and simulation models The superiority of the scheme of the present invention can be embodied more when the scale is larger.
附图说明Description of drawings
图1是本发明实施例的系统结构示意图。Fig. 1 is a schematic diagram of the system structure of the embodiment of the present invention.
具体实施方式Detailed ways
为了使本发明实施例的目的、技术方案、优点更加清晰,下面将结合本发明实施例和附图来介绍本发明的技术方案。In order to make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be introduced below in conjunction with the embodiments of the present invention and the accompanying drawings.
本发明根据编制ATP仿真计算模型所需要的原始数据,根据ATP仿真计算模型文件的格式,自动编写生成ATP仿真计算主模型文件,自动生成可供ATP仿真计算主模型文件调用的架空线路的仿真计算模型文件。根据ATP仿真计算主模型文件和架空线路的仿真计算模型文件,自动编写生成相应的数据卡文件,将各种数据卡进行连接,自动生成可执行的ATP仿真计算模型程序。自动运行可执行的ATP仿真计算模型程序,并读取仿真结果,根据仿真结果判断是否满足仿真要求,如果满足要求则结束,输出仿真结果。如果不满足要求,则按照预先设定的模型参数调整算法调整模型参数,重新自动生成ATP仿真计算模型程序并自动执行,直至仿真结果满足仿真要求。According to the original data required for compiling the ATP simulation calculation model and the format of the ATP simulation calculation model file, the present invention automatically compiles and generates the ATP simulation calculation main model file, and automatically generates the overhead line simulation calculation that can be called by the ATP simulation calculation main model file model file. According to the main model file of ATP simulation calculation and the simulation calculation model file of overhead line, the corresponding data card file is automatically written and generated, and various data cards are connected to automatically generate an executable ATP simulation calculation model program. Automatically run the executable ATP simulation calculation model program, read the simulation results, judge whether the simulation requirements are met according to the simulation results, end if the simulation results are met, and output the simulation results. If the requirements are not met, the model parameters will be adjusted according to the preset model parameter adjustment algorithm, and the ATP simulation calculation model program will be automatically regenerated and executed automatically until the simulation results meet the simulation requirements.
如图1 所示,本发明的一种实现ATP电力系统仿真计算模型自动生成与运行的系统,包括数据格式处理模块11、仿真计算模型主文件生成模块12、数据卡生成模块13、仿真计算模型程序生成模块14、仿真计算模型程序自动执行模块15、仿真计算结果判断模块16、仿真计算模型参数调整模块17、仿真计算结果输出模块18。其中数据格式处理模块11与仿真计算模型主文件生成模块12连接;仿真计算模型主文件生成模块12与数据卡生成模块13连接;数据卡生成模块13与仿真计算模型程序生成模块14连接;仿真计算模型程序生成模块14与仿真计算模型程序自动执行模块15连接;仿真计算模型程序自动执行模块15与仿真计算结果判断模块16连接;仿真计算结果判断模块16与仿真计算模型参数调整模块17连接;仿真计算模型参数调整模块17与仿真计算模型主文件生成模块12和仿真计算结果输出模块18连接。As shown in Figure 1, a system of the present invention that realizes the automatic generation and operation of an ATP power system simulation calculation model includes a data format processing module 11, a simulation calculation model master file generation module 12, a data card generation module 13, and a simulation calculation model A program generation module 14 , a simulation calculation model program automatic execution module 15 , a simulation calculation result judgment module 16 , a simulation calculation model parameter adjustment module 17 , and a simulation calculation result output module 18 . Wherein the data format processing module 11 is connected with the simulation calculation model master file generation module 12; the simulation calculation model master file generation module 12 is connected with the data card generation module 13; the data card generation module 13 is connected with the simulation calculation model program generation module 14; the simulation calculation The model program generation module 14 is connected with the automatic execution module 15 of the simulation calculation model program; the automatic execution module 15 of the simulation calculation model program is connected with the simulation calculation result judgment module 16; the simulation calculation result judgment module 16 is connected with the simulation calculation model parameter adjustment module 17; The calculation model parameter adjustment module 17 is connected with the simulation calculation model master file generation module 12 and the simulation calculation result output module 18 .
数据格式处理模块11用于将电力系统的原始数据(包括电源参数,接地参数,杆塔参数,雷电流参数,架空线路参数等,这些数据存储在数据库中,对不同类型的仿真,需要的参数不一样,比如在雷击故障的仿真中需要雷击数据,但是在非雷击故障的仿真中,则并没有雷电参数),转换成ATP仿真计算模型主文件所需要的格式,由于ATP对模型文件格式的要求十分严格,不同类型元件数据占用的字符长度不同,且对字符的排列要求十分严格,因此需要进行数据格式处理,转成一定长度的字符。当数据长度过长时,需要转为科学计数法的形式,并转成字符串的形式保存。当数据长度不够时,需要在前面补空格,并转成字符串的形式。比如电力元件的参数的长度大多为六个字符,因此需要把EXCEL表格中的参数读取,并转化成六个字符的长度,如果EXCEL表格中的数据不够六位,则需要在前面补充空格,如果超过六位则需要转化成科学计数法的形式,然后在生成ATP代码时,直接输出六位的字符形式的数据即可。例如:在ATP中,电源数据的长度一般为10,如果原始数据为‘123456789’,该数据长度为9,没有超过10位,则经过数据处理模块11后,输出的为‘ 123456789’,在原始数据前面添加了一个空格。如果原始数据为‘111122223333’,该数据长度为12位,超过了12位,因此处理后输出的结果为‘1.11122E12’,即把输出转化为指数形式输出。The data format processing module 11 is used to store the original data of the power system (including power supply parameters, grounding parameters, tower parameters, lightning current parameters, overhead line parameters, etc.) in the database. For different types of simulations, the required parameters are different. The same, for example, lightning data is needed in the simulation of lightning fault, but in the simulation of non-lightning fault, there is no lightning parameter), converted into the format required by the main file of the ATP simulation calculation model, due to ATP’s requirements for the model file format Very strict, the length of characters occupied by different types of component data is different, and the requirements for the arrangement of characters are very strict, so it is necessary to process the data format and convert it into characters of a certain length. When the length of the data is too long, it needs to be converted into scientific notation and saved in the form of a string. When the length of the data is not enough, you need to add spaces in front and convert it into a string. For example, the length of parameters of power components is mostly six characters, so it is necessary to read the parameters in the EXCEL table and convert them into six characters in length. If the data in the EXCEL table is not enough for six characters, you need to add spaces in front. If it exceeds six digits, it needs to be converted into the form of scientific notation, and then when generating the ATP code, directly output the data in the form of six characters. For example: in ATP, the length of the power supply data is generally 10, if the original data is '123456789', the length of the data is 9, no more than 10 bits, then after the data processing module 11, the output is '123456789', in the original A space is added in front of the data. If the original data is '111122223333', the length of the data is 12 bits, which exceeds 12 bits, so the output result after processing is '1.11122E12', that is, the output is converted into an exponential form for output.
仿真计算模型主文件生成模块12用于根据数据格式处理模块11的转换结果生成ATP仿真计算模型主文件。具体实施时,可通过在主文件中编入各个仿真计算模型中所涉及到元件的文本实现。The simulation calculation model master file generation module 12 is used to generate the ATP simulation calculation model master file according to the conversion result of the data format processing module 11 . During specific implementation, it can be realized by compiling the texts of the components involved in each simulation calculation model in the master file.
数据卡生成模块13用于生成各个数据卡,比如对电源元件,读取经过数据格式处理模块11处理后数据,然后编写电源数据卡。主要的数据卡包括:起始数据卡、TACS数据卡、MODEL数据卡、支路数据卡、开关数据卡、电源数据卡、输出数据卡和空白数据卡。 TACS的英文名称是Transient Analysis of Control Systems,用于对控制系统的瞬时分析;MODEL是自定义的模型,方便根据用户的实际需要编写特定功能的自定义元件。这些数据卡的编写方法可根据ATP仿真软件的帮助手册中获得。例如:一个典型的电源数据卡如下所示:The data card generation module 13 is used to generate each data card, for example, for the power supply element, read the data processed by the data format processing module 11, and then write the power supply data card. The main data cards include: initial data card, TACS data card, MODEL data card, branch data card, switch data card, power supply data card, output data card and blank data card. The English name of TACS is Transient Analysis of Control Systems, which is used for instantaneous analysis of control systems; MODEL is a custom model, which is convenient for writing custom components with specific functions according to the actual needs of users. The writing methods of these data cards can be obtained from the help manual of the ATP simulation software. Example: A typical power data card looks like this:
/SOURCE/SOURCE
C < n 1><>< Ampl. >< Freq. ><Phase/T0><A1><T1><TSTART><TSTOP>C < n 1><><Ampl.><Freq.><Phase/T0><A1><T1><TSTART><TSTOP>
14X00S1A 0179629.248 50. 30. -1. 1.14X00S1A 0179629.248 50. 30. -1. 1.
14X00S1B 0179629.248 50. -90. -1. 1.14X00S1B 0179629.248 50. -90. -1. 1.
14X00S1C 0179629.248 50. 150. -1. 1.14X00S1C 0179629.248 50. 150. -1. 1.
14X00S2A 0179629.248 50. 300. -1. 1.14X00S2A 0179629.248 50. 300. -1. 1.
14X00S2B 0179629.248 50. 180. -1. 1.14X00S2B 0179629.248 50. 180. -1. 1.
14X00S2C 0179629.248 50. 420. -1. 1.14X00S2C 0179629.248 50. 420. -1. 1.
其中,C表示注释,n1是节点的名称,此处是电源的参数,所以下面的第一列为电源节点的名称,Ampl是幅值,此处表示的是电压源幅值,Freq表示的是频率,Phase/T0表示的是相位,A1、T1是对雷电流或雷电压而言的,A1表示雷电流(压)在T1时刻的幅值,TSTART和TSTOP表示的开始时间和结束时间,开始时间用-1表示在仿真开始时刻,电源已经开始作用。Among them, C indicates the comment, n1 is the name of the node, here is the parameter of the power supply, so the first column below is the name of the power supply node, Ampl is the amplitude, here is the voltage source amplitude, and Freq is Frequency, Phase/T0 represents the phase, A1 and T1 are for lightning current or lightning voltage, A1 represents the amplitude of lightning current (voltage) at T1 time, TSTART and TSTOP represent the start time and end time, start Use -1 for the time to indicate that the power supply has started to function at the beginning of the simulation.
可以看出,电源数据卡主要有电源节点名称,电源类型(电压源和电流源),电源幅值,电源频率,初始相位等参数构成。It can be seen that the power data card mainly consists of parameters such as power node name, power type (voltage source and current source), power amplitude, power frequency, and initial phase.
仿真计算模型程序生成模块14用于将数据卡生成模块13所得各种数据卡进行连接(一般可按照起始数据卡、TACS数据卡、MODEL数据卡、支路数据卡、开关数据卡、电源数据卡、输出数据卡和空白数据卡进行依次连接,具体实施时没有的数据卡可以跳过,例如如果没有自定义元件,则就没有MODEL数据卡),生成可执行的ATP仿真计算模型程序,例如:为了生成ATP程序,首先需要生成一个后缀为ATP的文件,其生成代码为:The simulation calculation model program generation module 14 is used to connect various data cards obtained by the data card generation module 13 (generally according to the starting data card, TACS data card, MODEL data card, branch data card, switch data card, power supply data card) Card, output data card and blank data card are connected sequentially, and the data card that is not available in the specific implementation can be skipped, for example, if there is no custom component, then there is no MODEL data card), and an executable ATP simulation calculation model program is generated, such as : In order to generate an ATP program, it is first necessary to generate a file with the suffix ATP, and its generated code is:
fid=fopen('auto_atp.atp','w','native');(fid是一个生成文件的句柄,对该文件进行操作时会用到句柄信息,fopen是MATLAB中打开一个文件的函数,如果该文件不存在,则会创建一个相应的文件,'w'表示的是以写入形式对该文件进行操作,'native'是写入的格式,表示以默认格式写入,可以省略)fid=fopen('auto_atp.atp','w','native');(fid is a handle to generate a file, handle information will be used when operating on the file, fopen is a function to open a file in MATLAB, If the file does not exist, a corresponding file will be created, 'w' means to operate the file in the form of writing, 'native' is the writing format, which means writing in the default format, which can be omitted)
该代码表示生成文件auto_atp.atp。This code means to generate the file auto_atp.atp.
为了把其他数据卡写进去,在其他数据卡开头加入以下代码即可。In order to write other data cards, just add the following code at the beginning of other data cards.
fid=fopen('auto_atp.atp','a');fid=fopen('auto_atp.atp','a');
该代码表示在文件auto_atp.atp后面继续写入。其中,a表示后续写入,即如果auto_atp文件存在就继续写入,不是擦除原来auto_atp中的内容重新写入。This code means to continue writing after the file auto_atp.atp. Among them, a indicates subsequent writing, that is, if the auto_atp file exists, continue writing, instead of erasing the original auto_atp content and rewriting.
仿真计算模型程序自动执行模块15用于自动运行仿真计算模型程序生成模块14生成的ATP仿真计算模型程序,得到仿真结果文件。这可通过调用ATP仿真软件自带的runATP.exe程序实现。例如采用MATLAB编程语言,自动运行名为Example.atp的仿真计算模型程序,相应的命令为:system(example.atp )。The simulation calculation model program automatic execution module 15 is used for automatically running the ATP simulation calculation model program generated by the simulation calculation model program generation module 14 to obtain the simulation result file. This can be achieved by calling the runATP.exe program that comes with the ATP simulation software. For example, using the MATLAB programming language to automatically run the simulation calculation model program named Example.atp, the corresponding command is: system (example.atp ).
仿真计算结果判断模块16自动从仿真计算模型程序自动执行模块15所得仿真结果文件中读取仿真计算数据,并对这些数据进行处理,判断是否发生绝缘击穿。ATP仿真计算结果保存在LIS文件中,LIS文件的格式可根据ATP仿真软件的帮助手册中获得,因此读取LIS文件中的相关数据,通过对读取数据的处理判断各相是否击穿。例如,在三相仿真的情况下,如果LIS中的A B C三相的数据在仿真时间内全为0,则表示均未发生击穿,输出[0 00],如果LIS中的A B 两相的数据在仿真时间内全为0,C相在仿真时间内数据不全为0,则表示C相发生击穿,输出[0 0 1],用1表示发生击穿,而0表示未击穿。The simulation calculation result judging module 16 automatically reads the simulation calculation data from the simulation result file obtained by the simulation calculation model program automatic execution module 15, and processes the data to determine whether insulation breakdown occurs. The ATP simulation calculation results are saved in the LIS file. The format of the LIS file can be obtained from the help manual of the ATP simulation software. Therefore, read the relevant data in the LIS file, and judge whether each phase breaks down by processing the read data. For example, in the case of three-phase simulation, if the data of the three phases A, B and C in the LIS are all 0 within the simulation time, it means that no breakdown occurs, and the output is [0 00]. If the data of the two phases of A, B and C in the LIS During the simulation time, it is all 0, and the data of phase C is not all 0 during the simulation time, it means that the phase C is broken down, and the output is [0 0 1], 1 means that the breakdown occurs, and 0 means that there is no breakdown.
仿真计算模型参数调整模块17根据仿真计算结果判断模块16的输出对仿真模型参数进行调整。调整的策略是预先设定的。首先仿真计算模型参数调整模块17判断仿真计算结果是否满足预先设定的要求,如果满足要求,则将结果由仿真计算结果输出模块18输出显示。如果不满足要求,可根据仿真计算结果与目标值的差异情况,对仿真模型参数进行调整,将新的参数送至仿真计算模型主文件生成模块12,仿真计算模型自动生成与运行系统重新执行。根据仿真计算结果与目标值的差异情况对仿真模型参数进行调整可采用现有成熟的优化方法实现,例如黄金分割、单纯线性或者神经网络、粒子群优化算法等。具体实施时,仿真计算模型参数调整模块17的工作过程可以为,判断仿真计算结果是否满足预先设定的要求,如果满足要求,则将命令仿真计算结果输出模块18输出显示当前的仿真计算结果,否则根据仿真计算结果与目标值的差异情况,对仿真模型参数进行调整,将新的参数送至仿真计算模型主文件生成模块12,命令仿真计算模型主文件生成模块12重新生成ATP仿真计算模型主文件,仿真计算模型主文件生成模块12、数据卡生成模块13、仿真计算模型程序生成模块14、仿真计算模型程序自动执行模块15、仿真计算结果判断模块16、仿真计算模型参数调整模块17将根据新的ATP仿真计算模型主文件同样进行后续工作。The simulation calculation model parameter adjustment module 17 adjusts the simulation model parameters according to the output of the simulation calculation result judging module 16 . The adjustment strategy is preset. First, the simulation calculation model parameter adjustment module 17 judges whether the simulation calculation results meet the preset requirements, and if the simulation calculation results meet the requirements, the results are output and displayed by the simulation calculation result output module 18 . If the requirements are not met, the simulation model parameters can be adjusted according to the difference between the simulation calculation result and the target value, and the new parameters are sent to the simulation calculation model master file generation module 12, and the simulation calculation model is automatically generated and the operating system is re-executed. According to the difference between the simulation calculation results and the target value, the adjustment of the simulation model parameters can be realized by existing mature optimization methods, such as golden section, simple linear or neural network, particle swarm optimization algorithm, etc. During specific implementation, the working process of the simulation calculation model parameter adjustment module 17 can be to judge whether the simulation calculation results meet the preset requirements, and if the requirements are met, the simulation calculation result output module 18 will be ordered to output and display the current simulation calculation results, Otherwise, adjust the simulation model parameters according to the difference between the simulation calculation result and the target value, send new parameters to the simulation calculation model master file generation module 12, and order the simulation calculation model master file generation module 12 to regenerate the ATP simulation calculation model master file, simulation calculation model master file generation module 12, data card generation module 13, simulation calculation model program generation module 14, simulation calculation model program automatic execution module 15, simulation calculation result judgment module 16, simulation calculation model parameter adjustment module 17 will be based on The new ATP simulation calculation model master file also carries on the follow-up work.
仿真计算结果输出模块18,用于输出显示满足要求的仿真计算结果。The simulation calculation result output module 18 is used to output the simulation calculation results that meet the requirements.
综上可知,在生成ATP仿真计算模型时,只需要用户预先指定需要进行仿真计算的电力系统某个区域等简单的信息(即这些区域内元件的参数),即可应用本软件接口自动生成所需要的仿真计算模型,整个生成过程再无需人工干预,降低了模型编制的难度;模型编制的数据源自对原始数据库的解析,提高了模型编制的准确性;利用计算机可完成模型编制任务,提高了模型编制的效率。In summary, when generating the ATP simulation calculation model, the user only needs to pre-specify simple information such as a certain area of the power system that needs to be simulated (that is, the parameters of the components in these areas), and the software interface can be used to automatically generate the ATP simulation calculation model. The required simulation calculation model does not require manual intervention in the entire generation process, which reduces the difficulty of model compilation; the data for model compilation comes from the analysis of the original database, which improves the accuracy of model compilation; the use of computers can complete model compilation tasks and improve improve the efficiency of modeling.
需要强调的是,本发明所述的实施例是说明性的,而不是限定性的,因此本发明并不限于具体实施方式中所述的实施例,凡是由本领域技术人员根据本发明的技术方案得出的其他实施方式,同样属于本发明保护的范围。It should be emphasized that the embodiments described in the present invention are illustrative rather than restrictive, so the present invention is not limited to the embodiments described in the specific implementation, and those skilled in the art according to the technical solutions of the present invention Other obtained implementation modes also belong to the protection scope of the present invention.
Claims (2)
- A kind of 1. system realized ATP electric system simulation computation models and automatically generate operation, it is characterised in that:Including data lattice Formula processing module (11), Simulation Calculation master file generation module (12), data card generation module (13), Simulation Calculation It is program generating module (14), Simulation Calculation program automated execution module (15), simulation result judgment module (16), imitative True computation model parameter adjustment module (17) and simulation result output module (18);The data format processing module (11), for by the initial data of electric system, being converted into ATP Simulation Calculation masters The required form of file;Simulation Calculation master file generation module (12), for being generated according to the transformation result of data format processing module (11) ATP Simulation Calculation master files, are included in the text that involved element in each Simulation Calculation is added in master file;Data card generation module (13), for the ATP simulation calculations according to obtained by Simulation Calculation master file generation module (12) Model master file and the corresponding data card of overhead transmission line Simulation Calculation file generated, overhead transmission line Simulation Calculation file Parameter including overhead transmission line;Simulation Calculation program generating module (14), for various data cards obtained by data card generation module (13) to be connected Connect, generate the ATP Simulation Calculation programs being able to carry out;Simulation Calculation program automated execution module (15), for automatic running Simulation Calculation program generating module (14) The ATP Simulation Calculation programs of generation, obtain simulation result file;Simulation result judgment module (16), for being tied from emulation obtained by Simulation Calculation program automated execution module (15) Simulation result is read in fruit file;Simulation Calculation parameter adjustment module (17), based on the emulation read according to simulation result judgment module (16) Calculate result to be adjusted simulation parameters, including judge whether simulation result meets requirement set in advance, if Meet the requirements, then order simulation result output module (18) output is shown into current simulation result, otherwise basis The difference condition of simulation result and desired value, is adjusted simulation parameters, and new parameter is sent to simulation calculation Model master file generation module (12), order Simulation Calculation master file generation module (12) regenerate ATP simulation calculations Model master file;Simulation result output module (18), the simulation result met the requirements for exporting display.
- 2. realizing the system that ATP electric system simulation computation models automatically generate operation according to claim 1, its feature exists In:The implementation that data format processing module (11) changes the initial data of electric system is, according to ATP to model The requirement of file format, carries out data format processing, changes into the character of required length;Implementation is, when data length mistake When long, switch to the form of scientific notation, and the form for changing into character string preserves, and when data length is inadequate, is above covering Lattice, and the form for changing into character string preserves.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510564740.2A CN105069265B (en) | 2015-09-08 | 2015-09-08 | Realize the system that ATP electric system simulation computation models automatically generate operation |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510564740.2A CN105069265B (en) | 2015-09-08 | 2015-09-08 | Realize the system that ATP electric system simulation computation models automatically generate operation |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105069265A CN105069265A (en) | 2015-11-18 |
CN105069265B true CN105069265B (en) | 2018-04-20 |
Family
ID=54498631
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510564740.2A Active CN105069265B (en) | 2015-09-08 | 2015-09-08 | Realize the system that ATP electric system simulation computation models automatically generate operation |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105069265B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105301458A (en) * | 2015-11-20 | 2016-02-03 | 国网内蒙古东部电力有限公司检修分公司 | ATP-based overhead line initial breakdown current extraction method and system |
CN107862103B (en) * | 2017-09-20 | 2021-07-30 | 国家电网公司 | A method and system for generating simulation model based on ADPSS |
CN108416078B (en) * | 2018-01-12 | 2022-11-11 | 国家电网有限公司 | Method and system for testing short-circuit thermal stability of portable short-circuit grounding wire |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101996271B (en) * | 2010-08-12 | 2013-08-14 | 武汉大学 | Software interface for automatically generating simulation calculation model of PSCAD power system |
CN102708232B (en) * | 2012-04-24 | 2013-06-19 | 中国人民解放军国防科学技术大学 | Processing method and device for distributed simulation data |
CN103838921B (en) * | 2014-02-13 | 2015-03-25 | 华北电力大学(保定) | PSCAD-EMTDC simulation model automatic generation method |
-
2015
- 2015-09-08 CN CN201510564740.2A patent/CN105069265B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN105069265A (en) | 2015-11-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102609596B (en) | System and method for generating power plant relay protection setting calculation report | |
CN106960103B (en) | Automatic generation method and device of power grid graph | |
CN102522128B (en) | Method and system for testing configuration logic design of DCS (Distributed Control System) of nuclear power station | |
CN110955410B (en) | Code automatic generation method, device, equipment and medium | |
CN103838921B (en) | PSCAD-EMTDC simulation model automatic generation method | |
CN103136406A (en) | Method for automatic generation of function code for simulation through visualization application program | |
CN106372370A (en) | Flight control distributed type real-time simulation system | |
CN107544283A (en) | A kind of semi-matter simulating system based on virtual synchronous generator control strategy | |
CN108345739B (en) | Method for identifying CIME and SVG model file information to realize protection fixed value on-line check function and obtain model | |
CN105069265B (en) | Realize the system that ATP electric system simulation computation models automatically generate operation | |
CN106709143B (en) | VFTO batch simulation analysis method and system based on ATP automatic modeling | |
CN107797463A (en) | A kind of emulation mode of multiaxis electric propulsion semi-physical object simulating test platform | |
CN110147226B (en) | System, method and device for automatically generating program according to functional block diagram | |
CN108733919A (en) | Power distribution network simulating analysis and system based on VBA and OpenDSS | |
CN107179910A (en) | The logic configuration method that a kind of online editing comes into force immediately | |
CN103441496A (en) | MATLAB-based electric-power-system load-flow calculation method | |
CN103268568A (en) | Method for Determination of Relay Protection Device Setting Value Using Formula Editor to Customize Template | |
CN111026451A (en) | Parameter configuration method and configuration tool for transformer substation terminal interval | |
CN105700934A (en) | Intelligent compiling method and intelligent compiling system | |
CN106844900B (en) | The Construction Method of Electromagnetic Transient Simulation System | |
CN107340995A (en) | A kind of traction control applied software development system | |
JP2013020580A (en) | Parallelization method, system and program | |
CN204129786U (en) | A kind of generation of electricity by new energy production simulation analogue system | |
CN109657332B (en) | Method and system for decoupling electromagnetic transient automatic modeling of large-scale power grid | |
CN104933255A (en) | Combined simulation method of calling MATLAB engine by PSASP from background |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |