CN114077787B - Automatic parameter setting method for PSCAD model element - Google Patents

Automatic parameter setting method for PSCAD model element Download PDF

Info

Publication number
CN114077787B
CN114077787B CN202111223678.2A CN202111223678A CN114077787B CN 114077787 B CN114077787 B CN 114077787B CN 202111223678 A CN202111223678 A CN 202111223678A CN 114077787 B CN114077787 B CN 114077787B
Authority
CN
China
Prior art keywords
file
name
parameter
ini
configuration file
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
Application number
CN202111223678.2A
Other languages
Chinese (zh)
Other versions
CN114077787A (en
Inventor
黎涛
郑琼玲
刘松
韩坚
肖纯
李剑
黄华
彭翔
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
State Power Grid Jiangxi Electric Power Co ltd Pingxiang Power Supply Branch
State Grid Corp of China SGCC
Original Assignee
State Power Grid Jiangxi Electric Power Co ltd Pingxiang Power Supply Branch
State Grid Corp of China SGCC
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by State Power Grid Jiangxi Electric Power Co ltd Pingxiang Power Supply Branch, State Grid Corp of China SGCC filed Critical State Power Grid Jiangxi Electric Power Co ltd Pingxiang Power Supply Branch
Priority to CN202111223678.2A priority Critical patent/CN114077787B/en
Publication of CN114077787A publication Critical patent/CN114077787A/en
Application granted granted Critical
Publication of CN114077787B publication Critical patent/CN114077787B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation

Abstract

The invention discloses a PSCAD model element parameter automatic setting method, which comprises an ini configuration file of element parameters and a PSCAD model element parameter automatic setting process. According to the invention, a user gets rid of a complicated parameter setting panel of the PSCAD model element, the setting of the PSCAD model element parameters can be rapidly and accurately completed automatically according to operation steps, and the ini configuration files can be multiplexed, so that parameter setting can be rapidly performed on other element examples of the same type.

Description

Automatic parameter setting method for PSCAD model element
Technical Field
The invention relates to a quick setting method of PSCAD model element parameters, belonging to the technical field of digital simulation of an electric power system.
Background
PSCAD is digital simulation software widely used in power systems. A rich library of elements is provided in PSCAD, comprising: simple passive components, complex control modules, motors, FACTS devices, wires, etc.
The power system is simulated by using PSCAD, and the general flow is as follows:
1) Drawing a simulation power system which is the same as the actual power system in a drawing area by using corresponding elements in a PSCAD element library according to the actual power system main wiring diagram;
2) Setting parameter values for corresponding elements in the simulation power system according to the collected parameter values of the elements in the actual power system;
3) Creating relevant control elements, monitoring elements to control the triggering of faults, monitoring the signals of interest;
4) Compiling and debugging the simulation power system until no error exists;
5) And starting to operate the simulation power system, and checking an operation result.
In the above-mentioned process of using PSCAD to simulate power system, after the simulation model of power system is drawn, then according to each element parameter collected, setting parameters for correspondent elements in the simulation system one by one. The process is a very critical step in the simulation, is relatively cumbersome and is prone to error.
Because the parameters of different elements are different in number, the parameters are few, more and hundreds. For elements with hundreds of parameters, a user often collects only a small number of key parameters of the element, and when setting parameter values for the elements, the user needs to find positions of the key parameters from a large number of parameters of the elements and fill the parameter values into the positions, and other parameters often use default values. The method for manually searching the parameters and manually filling the parameters has the advantages of large workload, low efficiency, complex operation process and great easiness in error.
Disclosure of Invention
Aiming at the problems existing in the parameter setting of the PSCAD model element in the prior art, the invention provides a parameter automatic setting method of the PSCAD model element, which simplifies the parameter setting process of the PSCAD model element, reduces the workload of parameter setting, improves the parameter setting efficiency and reduces the error probability of parameter setting.
The technical scheme adopted by the invention is as follows: the automatic PSCAD model element parameter setting method comprises the following working processes:
1) The user first designates a directory containing configuration files of all elements; then designating a preset PSCAD model file name;
2) Acquiring a file list of all configuration files with the extension name of 'ini' under the directory;
3) Opening a PSCAD model file appointed by a user;
4) For each ini configuration file in the file list, the following operations are performed:
(1) reading the file name of the ini configuration file, and extracting an element instance id in the basic name of the file;
(2) opening an ini configuration file, and recording as: reading all parameter names and parameter values in the section of the paramlist according to the current configuration file;
(3) searching an element with an id value of element instance id in a PSCAD model file, and recording as: a current element;
(4) for each parameter name, note: current parameter name; and parameter values, noted as: a current parameter value; searching all the sub-elements of the current element, "< param >", and finding the sub-element with the name attribute equal to the current parameter name; setting the value attribute of the subelement as the current parameter value;
(5) completing the processing of each parameter one by one, and then closing the current configuration file;
5) Finishing the operation of each ini configuration file in the file list one by one according to the previous step, and then closing the PSCAD model file;
the ini configuration file is specifically designed as follows:
a: file name of configuration file:
(1) the file base name (name) should be named in the following schema: "< element type > - < element instance id >", the brackets in the file name and the contents therein should be replaced with actual contents;
"element type >" is a description of the type of PSCAD model element, used only by the user himself/herself, and the "PSCAD model element parameter automatic setting" program does not process this field. The user can name by himself according to his habit to prompt himself which model element's parameter list the configuration file stores. Such as: the user may describe the fan model as either a "fan" or a "wind generator". In use, the user replaces his own naming of element types at "< element type >" in the ini filename.
The "< element instance id >" is an id number of a certain element in the PSCAD model file preset by the user, which the user must acquire from the PSCAD model file and then replace at "< element instance id >" in the ini file name. The "automatic parameter setting of PSCAD model element" program reads the id number and searches the PSCAD model file for an element whose id number is the value.
(2) The file extension is: ". ini";
b: file content of the configuration file:
(1) the profile content contains only 1 section, the name of the section is "paramlist";
(2) the "paramlist" section contains a series of "keys" and "values", where "keys" represent parameter names and "values" represent parameter values;
an ini profile of the element as shown in fig. 2: the file name of the ini configuration file is: "element type-element instance id.ini", the content of the ini configuration file contains the "paramlist" section; the section contains a series of parameters and their values in the format: "parameter name=parameter value", each parameter independently occupies one line.
In summary, the beneficial effects of the invention are as follows:
(1) Simplifying the parameter setting process of PSCAD model elements; the user does not need to perform parameter setting operation in the complex parameter panel of the model element, and fills element parameters in a simple ini configuration file instead; the software of PSCAD model element parameter automatic setting automatically completes the rest element parameter setting work;
(2) The parameter setting workload of PSCAD model elements is reduced; the user does not need to search preset parameter positions item by item in the model file, and the software for automatically setting the parameters of the PSCAD model element replaces the user to search the parameters and fill in parameter values;
(3) The parameter setting efficiency of PSCAD model elements is improved; changing the original operation of manually setting the component parameters into automatic setting of the component parameters by software;
(4) The error probability of PSCAD model element parameter setting is reduced; the complicated component parameter setting work is easy to make mistakes when manually set, and the work can not make mistakes when the software is reliably debugged without errors after the software is automatically finished by the PSCAD model component parameter automatic setting software;
(5) The ini configuration file of the element can be conveniently multiplexed, and all parameter values in the current ini configuration file can be quickly set into the new element only by modifying the element instance id in the file name of the ini configuration file to be the id of the new element.
Drawings
Fig. 1 is a flowchart of a method for automatically setting parameters of a PSCAD model element according to the present invention, in which parameters of a doubly-fed fan are automatically set as an example,
figure 2 is an ini-configuration file of the element according to the invention,
fig. 3 is an ini profile of an element doubly-fed wind machine according to the present invention.
Detailed Description
In order to enable a person skilled in the art to better understand the technical solutions of the present invention, the present invention is described in further detail below with reference to the accompanying drawings.
The specific embodiments of the present invention will be described in detail by taking the automatic setting of parameters of a doubly fed fan and other elements as an example:
1) An ini profile of the doubly fed wind machine is prepared.
(1) The user fills all the collected parameters of the doubly-fed fan into the ini configuration file according to the format of parameter name=parameter value, and each parameter is exclusive for 1 line. As shown in fig. 2, a filled doubly fed fan ini configuration file is provided.
(2) And opening the PSCAD model file by a user, finding out the doubly-fed fan element, and checking the id value of the doubly-fed fan element. The "element instance id" field in the file name of the ini configuration file is filled with its id value.
2) An ini profile of the other element is prepared.
The ini configuration file of other elements in the model is prepared in a similar way to the previous step.
3) All the prepared ini configuration files are placed in the same folder.
4) The user uses the "PSCAD model element parameter automatic setting" method.
(1) The user selects the ini profile directory button, designating the folder in which all the ini profiles were placed in the previous step.
(2) The user "selects a preset PSCAD model file", designates a PSCAD model file of preset parameters.
(3) Executing "start setting PSCAD model element parameters", executing element automatic parameter setting process.
5) And the user observes the progress bar of the program of automatically setting the parameters of the PSCAD model elements, and when the progress bar reaches 100%, the automatic setting of all the element parameters is completed.
Taking the automatic setting of parameters of the doubly-fed fan as an example, the process of performing automatic component parameter setting by using the "automatic parameter setting of PSCAD model component" will be described in detail:
1) The software obtains the ini configuration file of the doubly-fed wind machine. The file name is read, and the value of the "element instance id" field (noted: compistid) in the file name is acquired. Taking the ini configuration file of the "doubly-fed wind machine" shown in fig. 3 as an example, the values of the "element instance id" field obtained by the software are as follows: 1968805311.
2) The PSCAD model file is searched for an element whose "id" attribute value is equal to compenstid (noted: tarElement). Taking the model file of "doubly-fed wind machine" as an example, the element searched by the software is a < User > element.
3) And reading the content of the ini configuration file, and obtaining all parameter lists in the [ paramlist ] section. Taking the ini configuration file of the "doubly-fed wind machine" shown in fig. 2 as an example, the list of parameters obtained by the software is:
Name=WTG
Pbase=2.5
Vbase=0.69
OMEG=50.0 [Hz]
TRN=0.3
4) The next parameter in the parameter list is read (parameter name: paramName, parameter values are noted: paramValue). Taking the ini configuration file of the "doubly fed fan" shown in fig. 3 as an example, after reading the first parameter, the paramName is: name, paramValue is: WTG.
5) Searching all the sub-elements < param > of the tarElement element, finding the sub-elements < param > with the Name attribute equal to that of the paramName, and setting the value attribute of the sub-elements < param > as paramValue.
6) Turning to step 4, processing of the next parameter continues until all parameters in the ini profile have been processed.
7) Turning to step 1, processing the next ini configuration file is continued until all the ini configuration files in the configuration folder are processed.
The ini profile of the element can be easily multiplexed. Taking the above-mentioned ini configuration file of the doubly-fed wind turbine as an example, a specific embodiment of multiplexing the ini configuration file will be described in detail. After the ini configuration file of the doubly-fed wind machine is used for setting the model parameters of the doubly-fed wind machine with the id 1968805311 in the PSCAD model file, parameters in the ini configuration file of the doubly-fed wind machine can be set to a new doubly-fed wind machine by replacing 1968805311 in the file name of the ini configuration file of the doubly-fed wind machine with id numbers of other doubly-fed wind machines in the PSCAD model file and then re-executing the method of automatically setting parameters of the PSCAD model element.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative elements and steps are described above generally in terms of functionality in order to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. The software modules may be disposed in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The foregoing is merely a preferred embodiment of the present invention, and it should be noted that, for a person skilled in the art, modifications and variations can be made without departing from the technical principles of the present invention, and these modifications and variations should also be regarded as the protection scope of the present invention.

Claims (1)

1. The automatic setting method of PSCAD model element parameters is characterized in that: the working process is as follows:
1) The user first designates a directory containing configuration files of all elements; then designating a preset PSCAD model file name;
2) Acquiring a file list of all configuration files with the extension name of 'ini' under the directory;
3) Opening a PSCAD model file appointed by a user;
4) For each ini configuration file in the file list, the following operations are performed:
(1) reading the file name of the ini configuration file, and extracting an element instance id in the basic name of the file;
(2) opening an ini configuration file, and recording as: reading all parameter names and parameter values in the section of the paramlist according to the current configuration file;
(3) searching an element with an id value of element instance id in a PSCAD model file, and recording as: a current element;
(4) for each parameter name, note: current parameter name; and parameter values, noted as: a current parameter value; searching all the sub-elements of the current element, "< param >", and finding the sub-element with the name attribute equal to the current parameter name; setting the value attribute of the subelement as the current parameter value;
(5) completing the processing of each parameter one by one, and then closing the current configuration file;
5) Finishing the operation of each ini configuration file in the file list one by one according to the previous step, and then closing the PSCAD model file;
the ini configuration file is specifically designed as follows:
a: file name of configuration file:
(1) the file base name (name) is named in the following schema: "< element type > - < element instance id >", the brackets in the file name and the contents therein should be replaced with actual contents;
the "< element type >" is the description of the element type of the PSCAD model and is only used by the user for mnemonic, and when the PSCAD model is used, the user replaces the naming of the element type by the user at the "< element type >" position in the ini file name;
the "< element instance id >" is the id number of a certain element in the PSCAD model file preset by the user, the user must acquire the id number from the PSCAD model file, and then replace the "< element instance id >" in the ini file name;
(2) the file extension is: ". ini";
b: file content of the configuration file:
(1) the profile content contains only 1 section, the name of the section is "paramlist";
(2) the "paramlist" section contains a series of "keys" and "values", where "keys" represent parameter names and "values" represent parameter values;
the file name of the ini configuration file is: "element type-element instance id.ini", the content of the ini configuration file contains the "paramlist" section; the section contains a series of parameters and their values in the format: "parameter name=parameter value", each parameter independently occupies one line.
CN202111223678.2A 2021-10-21 2021-10-21 Automatic parameter setting method for PSCAD model element Active CN114077787B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111223678.2A CN114077787B (en) 2021-10-21 2021-10-21 Automatic parameter setting method for PSCAD model element

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111223678.2A CN114077787B (en) 2021-10-21 2021-10-21 Automatic parameter setting method for PSCAD model element

Publications (2)

Publication Number Publication Date
CN114077787A CN114077787A (en) 2022-02-22
CN114077787B true CN114077787B (en) 2024-04-16

Family

ID=80283424

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111223678.2A Active CN114077787B (en) 2021-10-21 2021-10-21 Automatic parameter setting method for PSCAD model element

Country Status (1)

Country Link
CN (1) CN114077787B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103838921A (en) * 2014-02-13 2014-06-04 华北电力大学(保定) PSCAD-EMTDC simulation model automatic generation method
CN106407515A (en) * 2016-08-31 2017-02-15 哈尔滨工程大学 Electrical virtual experiment method based on PC platform

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104680424B (en) * 2015-01-30 2018-09-14 国家电网公司 The voltage power situation predictor method in large-sized photovoltaic power station
GB201605347D0 (en) * 2016-03-30 2016-05-11 Consoli Ltd Object model generation

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103838921A (en) * 2014-02-13 2014-06-04 华北电力大学(保定) PSCAD-EMTDC simulation model automatic generation method
CN106407515A (en) * 2016-08-31 2017-02-15 哈尔滨工程大学 Electrical virtual experiment method based on PC platform

Also Published As

Publication number Publication date
CN114077787A (en) 2022-02-22

Similar Documents

Publication Publication Date Title
US20120102390A1 (en) Method and apparatus for generating widget
CN105629180A (en) Test method, test device and controller
CN107145784A (en) A kind of method of vulnerability scanning, device and computer-readable medium
CN114077787B (en) Automatic parameter setting method for PSCAD model element
JP4242361B2 (en) Development support equipment
CN108910642B (en) Elevator debugging information processing method and system, readable storage medium and debugging equipment
CN111125340A (en) Menu information adjusting method and device, storage medium and terminal
JP4888534B2 (en) Program development support apparatus and processing method
CN111211928A (en) Network data acquisition system based on big data processing
EP4002027A1 (en) Control logic diagram analysis device, control logic diagram analysis method, and use of the device
CN110209453A (en) It is multipair as refreshing automatically and display methods and Related product based on driver
JP4630489B2 (en) Log comparison debugging support apparatus, method and program
CN117194501B (en) DCS trend measurement point jump logic configuration method, system, equipment and medium
CN109871214A (en) Program code generation method, device, computer equipment and storage medium
CN105930162B (en) A kind of characteristic positioning method based on subgraph search
CN113094338B (en) Data comparison method, system, device and medium
CN117869196A (en) Assembly test data processing system and method for wind turbine production line
CN112149041B (en) Fault analysis method based on PSD-BPA data and graphical interaction technology
Petzold et al. Tool Support for System-Theoretic Process Analysis
CN115828804A (en) Method for modifying RTL source code file and electronic equipment
CN112491641A (en) Network testing method, device, terminal and storage medium for multiple virtual machines
CN105447216A (en) Method and device for increasing circuit simulation accuracy
CN114036596A (en) Power calculation data post-processing method and device, and evaluation method and system
CN116795416A (en) Diagnostic test method and device based on configuration table, electronic equipment and medium
CN113918470A (en) Software stability testing method based on pyecharts

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant