CN111460635A - Simulation test method, electronic device and storage medium - Google Patents

Simulation test method, electronic device and storage medium Download PDF

Info

Publication number
CN111460635A
CN111460635A CN202010196885.2A CN202010196885A CN111460635A CN 111460635 A CN111460635 A CN 111460635A CN 202010196885 A CN202010196885 A CN 202010196885A CN 111460635 A CN111460635 A CN 111460635A
Authority
CN
China
Prior art keywords
simulation
address
data point
point
shared memory
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.)
Granted
Application number
CN202010196885.2A
Other languages
Chinese (zh)
Other versions
CN111460635B (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.)
NR Electric Co Ltd
NR Engineering Co Ltd
Original Assignee
NR Electric Co Ltd
NR Engineering Co Ltd
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 NR Electric Co Ltd, NR Engineering Co Ltd filed Critical NR Electric Co Ltd
Priority to CN202010196885.2A priority Critical patent/CN111460635B/en
Publication of CN111460635A publication Critical patent/CN111460635A/en
Application granted granted Critical
Publication of CN111460635B publication Critical patent/CN111460635B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/06Energy or water supply

Landscapes

  • Business, Economics & Management (AREA)
  • Health & Medical Sciences (AREA)
  • Engineering & Computer Science (AREA)
  • Economics (AREA)
  • Public Health (AREA)
  • Water Supply & Treatment (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Resources & Organizations (AREA)
  • Marketing (AREA)
  • Primary Health Care (AREA)
  • Strategic Management (AREA)
  • Tourism & Hospitality (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Testing And Monitoring For Control Systems (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the invention is suitable for the technical field of simulation and provides a simulation test method, a simulation test device, electronic equipment and a storage medium, wherein the simulation test method comprises the following steps: generating a second point table of the simulation main process based on the first point table of each simulation subprocess in the at least two simulation subprocesses; the simulation main process consists of the at least two simulation sub-processes; respectively determining the mapping relation corresponding to each data point in the second point table; the mapping relation is the mapping relation of the first address and the second address; creating a shared memory; during the process of executing the simulation task, the simulation main process writes the numerical values of the data points into the shared memory according to the second address corresponding to each data point in the second point table; and reading the numerical value of the data point from the shared memory based on the mapping relation, and sending simulation test information to a monitoring end based on the reading result.

Description

Simulation test method, electronic device and storage medium
Technical Field
The present invention relates to the field of simulation technologies, and in particular, to a simulation test method, an electronic device, and a storage medium.
Background
In the field of power systems, it is often necessary to perform simulation tests on power systems in order to monitor faults of the power systems. At present, in the related art, when simulation software is used for simulation testing, technicians can only monitor simulation test results output by the whole power system to the outside of the system, and the interactivity of the simulation test is poor.
Disclosure of Invention
In order to solve the above problem, embodiments of the present invention provide a simulation test method, an electronic device, and a storage medium, so as to at least solve the problem of poor interactivity of the simulation test in the related art.
The technical scheme of the invention is realized as follows:
in a first aspect, an embodiment of the present invention provides a simulation test method, where the method includes:
generating a second point table of the simulation main process based on the first point table of each simulation subprocess in the at least two simulation subprocesses; the simulation main process consists of the at least two simulation sub-processes;
respectively determining the mapping relation corresponding to each data point in the second point table; the mapping relation is the mapping relation of the first address and the second address; the first address is the global number of the corresponding data point in the second point table; the second address represents a set memory address of a corresponding data point;
creating a shared memory; during the process of executing the simulation task, the simulation main process writes the numerical values of the data points into the shared memory according to the second address corresponding to each data point in the second point table;
and reading the numerical value of the data point from the shared memory based on the mapping relation, and sending simulation test information to a monitoring end based on the reading result.
In the above scheme, the method further comprises:
receiving a first instruction sent by the monitoring end; the first instruction is used for indicating the numerical value of a first data point in the second point table to be modified;
analyzing the first instruction to obtain a first address of the first data point and a corresponding modified value;
modifying the value stored in the corresponding second address into the modified value in the shared memory based on the mapping relation and the first address of the first data point; and modifying the value of the first data point in the simulation main process into the modified value.
In the above scheme, the reading the value of the data point from the shared memory based on the mapping relationship includes:
reading the second point table;
determining a first address of a data point to be read;
determining a second address corresponding to the first address of the data point needing to be read in the second point table according to the mapping relation;
reading the value of the data point from a second address of the shared memory.
In the foregoing solution, the determining the mapping relationship corresponding to each data point in the second point table respectively includes:
acquiring a first address and a second address corresponding to each data point in the second point table respectively;
and binding the first address and the second address respectively corresponding to each data point in the second point table.
In the foregoing scheme, the generating the second point table of the emulation host process further includes:
receiving a setting instruction sent by the monitoring end according to the second point table; wherein the content of the first and second substances,
the set instruction is used for indicating a data point needing to be read from the shared memory.
In the above scheme, the reading the value of the data point from the shared memory includes:
and reading the numerical value of the data point from the shared memory when the set triggering condition is met.
In the foregoing solution, the reading the value of the data point from the shared memory when the set trigger condition is satisfied includes:
and reading the value of the data point from the shared memory when the value of the set data point changes.
In a second aspect, an embodiment of the present invention provides a simulation test apparatus, including:
the generating module is used for generating a second point table of the simulation main process based on the first point table of each simulation subprocess in the at least two simulation subprocesses; the simulation main process consists of the at least two simulation sub-processes;
a determining module, configured to determine a mapping relationship corresponding to each data point in the second point table respectively; the mapping relation is the mapping relation of the first address and the second address; the first address is the global number of the corresponding data point in the second point table; the second address represents a set memory address of a corresponding data point;
the creation module is used for creating a shared memory; during the process of executing the simulation task, the simulation main process writes the numerical values of the data points into the shared memory according to the second address corresponding to each data point in the second point table;
and the sending module is used for reading the numerical value of the data point from the shared memory based on the mapping relation and sending simulation test information to the monitoring end based on the reading result.
In a third aspect, an embodiment of the present invention provides an electronic device, including a processor and a memory, where the processor and the memory are connected to each other, where the memory is used to store a computer program, and the computer program includes program instructions, and the processor is configured to call the program instructions to execute the steps of the simulation test method provided in the first aspect of the embodiment of the present invention.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, including: the computer-readable storage medium stores a computer program. The computer program, when executed by a processor, implements the steps of the simulation testing method as provided by the first aspect of an embodiment of the present invention.
In the process of executing the simulation task by the simulation main process, the embodiment of the invention writes the numerical value of the data point into the shared memory, reads the numerical value of the data point from the shared memory based on the mapping relation between the first address and the second address, and sends the simulation test information to the monitoring end based on the reading result. The embodiment of the invention can realize real-time monitoring of the externally output simulation test results of all the electric power subsystems under the electric power system, and the interactivity of the simulation test is strong.
Drawings
FIG. 1 is a schematic structural diagram of a simulation test system according to an embodiment of the present invention;
FIG. 2 is a circuit diagram of a one-time simulation wiring diagram provided by an embodiment of the present invention;
fig. 3 is a schematic flow chart illustrating an implementation of a simulation testing method according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of an implementation flow of another simulation testing method provided in the embodiment of the present invention;
FIG. 5 is a schematic diagram of an implementation flow of another simulation testing method provided in the embodiment of the present invention;
FIG. 6 is a schematic diagram of an implementation flow of another simulation testing method provided in the embodiment of the present invention;
FIG. 7 is a schematic diagram of an implementation flow of a simulation testing method according to an embodiment of the present invention
FIG. 8 is a diagram of a simulation interaction module of an apparatus provided in an embodiment of the present invention;
FIG. 9 is a schematic diagram of a simulation testing apparatus according to an embodiment of the present invention;
fig. 10 is a schematic diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
The technical means described in the embodiments of the present invention may be arbitrarily combined without conflict.
In addition, in the embodiments of the present invention, "first", "second", and the like are used for distinguishing similar objects, and are not necessarily used for describing a specific order or a sequential order.
The simulation test is carried out on the power system, namely, the simulation technology is applied to a power station to construct a power simulation system, and the power simulation system can be used for detecting faults of the power system and training personnel. In the related art, a simulation system is usually constructed by running a visualization library in electromagnetic transient simulation software (PSCAD). However, the simulation system constructed in this way can only complete the simulation test of the protection main logic, and lacks the interaction function with the monitoring end, for example, the event cannot be displayed on the monitoring end, the operations such as remote control and remote jump cannot be performed on the monitoring end, and the simulation test of the switching field control program cannot be performed.
In view of the above disadvantages of the related art, embodiments of the present invention provide a simulation testing method, which can implement data interaction with a monitoring end. In order to explain the technical means of the present invention, the following description will be given by way of specific examples.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a simulation test system according to an embodiment of the present invention, where the simulation test system includes: electronic equipment and control end.
The electronic device is provided with simulation software and visual programming software, and in practical application, the simulation software can be PSCAD. The simulation object takes a power system as an example, and visual programming software is used for editing a point table and a binary program forming the power system for use by the simulation software, and the power system may include a plurality of subsystems, for example, if the power system is a converter station, the subsystems of the power system may be an electric ac/dc protection control device. The visual programming software compiles binary programs and interface functions of all subsystems of the power system into a program library through a compiler, and the program library is a lib file. Lib, a binary program is compiled into protection engineering prb.
In practical application, the example name of the electrical ac/dc protection control device can be formed by splicing a station number, a pole number, a system number and a subsystem name, to which the electrical ac/dc protection control device belongs, wherein the station refers to a converter station, the pole refers to the positive pole and the negative pole of dc power transmission in the converter station, and the system number refers to the number of the electrical ac/dc protection control device. Lib, for example, where S1 is station number, P1 is pole number, M1 is system number, and PPR is the name of the power subsystem.
In practical application, the interface function includes a variable registration function, a task management function, an event registration function, a six-remote registration interface function, a shared memory creation interface function, an initialization interface function, a variable value refresh interface function, and the like. Simulation software needs to register a variable when a variable (signal) is added into the electric alternating current and direct current protection control equipment, and the variable data cannot be sent out as a six-remote signal unless the simulation process does not know the variable. In the power system, six remote refers to remote measurement, remote control, remote signaling, remote regulation, remote vision and remote sensing. Task management is task organization and management of different levels, all programs in the electric alternating current and direct current protection control equipment are operated by a chip, the chip has fixed frequency (interruption), the device needs to execute a plurality of tasks simultaneously, and some tasks have high real-time requirements and some tasks have low real-time requirements, so the tasks have different levels. The event is a special variable, when the variable changes, an event report (change value, time and the like) is formed and sent out actively, and the event registration is to tell the electronic device that the variable is an event, and a report needs to be formed and sent out actively. In practical application, the page task functions of all levels can be added into a task queue through an addTask interface function; and registering events and variables through interface functions such as defineEvent, defineRemoteControl, defineRemoteSignal and the like. AddTask is an interface function that can be called to add a task to a task queue.
The simulation software is used for simulation test of each subsystem in the power system, and the binary program of one subsystem can be reused for multiple times. The simulation software comprises a simulation main process, the simulation main process is composed of at least two simulation subprocesses, and each simulation subprocess corresponds to a subsystem of the power system. In practical application, firstly, a simulation project is created in the PSCAD, a program library needing to be linked is introduced, a primary simulation wiring diagram is drawn, analog quantity and state quantity data are defined, and functions of visualization of the program and primary simulation of reading of current and voltage data, state setting and the like are achieved. And then writing a Fortran code, setting simulation time and step length, and calling an initialization interface function of each power subsystem. Referring to fig. 2, fig. 2 is a circuit diagram of a primary simulation wiring diagram according to an embodiment of the present invention, where the primary simulation wiring diagram corresponds to a primary simulation process, and simulated data is stored in a storage space set by PSCAD software.
The electronic equipment is also used for creating a shared memory, the simulation main process counts the number of the external output variables of all the electric power subsystems after calling the initialization interface function of each electric power subsystem, calls the shared memory creating function of the interface library and creates the shared memory. The shared memory records information of variables output by the power subsystem, such as global variable names, memory addresses in the simulation main process, variable operation values and the like. And the simulation main process periodically runs the task function, and writes the information of the external output variables of all the electric power subsystems into the shared memory. When the binary codes of the power subsystem are generated, the memory addresses of the external output variables of the power subsystem in the simulation main process are automatically generated, and one external output variable corresponds to one unique memory address.
The electronic device is further configured to add global numbers to data points (variables) in the point table of each power subsystem to form a global point table. Specifically, a point table of each power subsystem is imported into point table configuration software, a global number of each data point is configured in the point table, the global number of each data point is bound with a memory address, and the global number of each data point and the memory address are ensured to be in one-to-one correspondence and unique. The peer table group ethernet software is a small tool of the emulation software, and is used for configuring forwarding related parameters of the communication server, such as Internet Protocol (IP) addresses of the monitoring terminal and the communication server. One communication service end can establish connection with a plurality of monitoring ends, each connection is called a channel, and data forwarded by each channel is called a channel variable. In practical application, the point table includes a global variable name, a variable type and a variable description corresponding to the variable. For example, an example of one variable in the point table is:
< DataSet name ═ action element type ═ GSDT _ TRIP:2 >
< Item sAddr ═ s1p1m1ppr.b01. L cd.rec _ manual _ trig _ flag "group ═ 101" entry ═ 1 "desc ═ manual trigger recording," "GAddr ═ v >
< Item sAddr ═ s1p1m1ppr.b01.wave.bi _ trigger _ DFR "group ═ 101" entry ═ 2 "desc ═" open triggered recording "" "GAddr ═" "/>"
</DataSet>
Wherein GAddr is the global number of the data point, and sAddr is the memory address of the data point.
A communication server is installed in an electronic device, and is a dedicated system that provides communication services to users on a network that need to transfer files over a telecommunication link or access a remote system. The communication server establishes communication link connection with the monitoring terminal through a communication protocol, reads the point table, acquires the memory address of the data point according to the global number, reads data from the data sharing memory according to the memory address and sends the data to the monitoring terminal. In practical application, the communication protocol between the communication service end and the monitoring end is only required to be modified, so that the simulation interaction function of multiple protocols can be realized, for example, the communication protocol may be IEC104 (telecommunications and systems-Part 5-104).
In an embodiment of the present invention, the monitoring end is a single server, and the library, the simulation software, the shared memory, and the communication server are all disposed on the same electronic device. The monitoring end establishes connection with the communication server end through the communication client end to acquire data in the shared memory. Before simulation, a monitoring terminal creates a monitoring picture and draws pictures of a direct current field, a switching field and the like. And the import point table is associated with the remote control point and configures an event message storage library. After the simulation is started, the communication service end reads the numerical value of the data point from the shared memory and sends the numerical value to the monitoring end. The monitoring end can also send a remote control instruction to the communication server end, the communication server end analyzes the remote control instruction, the numerical value of the data point in the shared memory is modified, and the simulation software reads the modified value of the data point from the shared memory, so that the numerical value of the data point in the data storage space of the simulation software is modified. For example, if the value of a data point corresponds to a switch in the power system, a value of 0 corresponds to the switch being off, and a value of 1 corresponds to the switch being on. The monitoring end changes the value of a corresponding data point in the simulation software from 0 to 1 by sending a remote control instruction, so that the on-off state is changed from off to on, and the monitoring end remotely controls the power system. The monitoring end is also used for actively configuring a point table corresponding to the global point table, according to the standard of IEC1O4 communication protocol, the monitoring end needs to configure a point table file which is the same as the front-end global point table file in the background, and determines the signal respectively according to the information body address of the signal during communication, each signal in the point table has a fixed information body address, and each information body address corresponds to a global address.
Fig. 3 is a schematic flow chart illustrating an implementation process of a simulation testing method according to an embodiment of the present invention, where an execution subject of the method is the electronic device in fig. 1. As shown in fig. 3, the simulation test method includes:
s301, generating a second point table of the simulation main process based on the first point table of each simulation subprocess in at least two simulation subprocesses; the simulation main process is composed of the at least two simulation sub-processes.
The simulation software comprises a simulation main process, and the simulation main process is composed of at least two simulation sub-processes. In the embodiment of the present invention, the simulation object is an example of a power system. In the power system, each simulation sub-process corresponds to one power subsystem in the power system, each power subsystem has a first point table, but the whole power system only has a second point table. The point table represents a signal table to be forwarded, the data points of the power subsystem have tens of thousands or even hundreds of thousands, when the signal needs to be output, only the needed data points need to be selected from the data points, and the data points are called six remote in the electrical field (remote signaling/remote measuring/remote controlling/remote pulse/remote regulating). It should be understood that the data points are synonymous with the variables in the embodiment shown in FIG. 1.
In practical application, the first point table of each power subsystem is imported into the point table configuration software, the global number of each data point in the first point table is configured, and all the first point tables are fused into one second point table. The dot table group Ethernet software is a small tool of simulation software and is used for configuring forwarding related parameters of the communication service end, such as IP addresses of the monitoring end and the communication service end.
S302, respectively determining the mapping relation corresponding to each data point in the second point table; the mapping relation is the mapping relation of the first address and the second address; the first address is the global number of the corresponding data point in the second point table; the second address represents a set memory address of a corresponding data point.
Referring to fig. 4, which shows a schematic flow chart of another simulation testing method provided by the embodiment of the present invention, the determining the mapping relationship corresponding to each data point in the second point table respectively includes:
s401, acquiring a first address and a second address corresponding to each data point in the second point table.
Upon generation of the binary code for the power subsystem, second addresses of data points of the power subsystem have been automatically generated, one data point corresponding to a unique second address. When the second point table is generated, the first address corresponding to each data point is configured. That is, the first address and the second address corresponding to each data point can be directly obtained from the second point table file. The first address is the global number of the corresponding data point in the second point table, and the second address is the set memory address of the corresponding data point.
S402, binding the first address and the second address respectively corresponding to each data point in the second point table.
And binding the first address and the second address of each data point in the second point table to form a mapping relation between the first address and the second address, and ensuring that the first address and the second address of the data point are in one-to-one correspondence and unique.
S303, establishing a shared memory; and writing the numerical values of the data points into the shared memory according to the second address corresponding to each data point in the second point table in the process of executing the simulation task by the simulation main process.
The simulation main process initializes the program interfaces of all the electric power subsystems, counts the number of data points of all the electric power subsystems, calls a shared memory creating function in an interface program library and creates a shared memory.
And writing the numerical value of the data point into the shared memory according to the second address of the data point in the process of executing the simulation task by the simulation main process.
S304, reading the numerical value of the data point from the shared memory based on the mapping relation, and sending simulation test information to the monitoring terminal based on the reading result.
The step is executed by the communication server in fig. 1, and the communication server is installed in the electronic device. A communication service is a dedicated system that provides communication services to users on a network that need to transfer files over a telecommunication link or access a remote system.
Referring to fig. 5, a schematic flow chart of another simulation testing method according to an embodiment of the present invention is shown, where, when reading a value of a data point from the shared memory based on the mapping relationship, the simulation testing method includes:
s501, reading the second point table.
S502, determining a first address of a data point needing to be read.
In the second point table, the corresponding first address can be found according to the name of the data point to be read.
S503, according to the mapping relation, determining a second address corresponding to the first address of the data point needing to be read in the second point table.
And determining a second address corresponding to the first address of the data point needing to be read in the second point table according to the mapping relation between the first address and the second address.
S504, reading the numerical value of the data point from the second address of the shared memory.
And reading the value of the data point to be read from the shared memory according to the second address.
And the communication server side sends the numerical value of the read data point to the monitoring side, so that the process of remote monitoring simulation is realized.
Further, the reading the value of the data point from the shared memory includes:
and reading the numerical value of the data point from the shared memory when the set triggering condition is met.
The set trigger condition may be that the value of the data point changes, or may be a set time period, for example, the value of the data point is read once every set time.
Further, the reading the value of the data point from the shared memory when the set trigger condition is met includes:
and reading the value of the data point from the shared memory when the value of the set data point changes.
The value of the data point is read from the shared memory not only when the value of any data point changes, but also when the value of the set data point changes.
Further, the generating the second point table of the simulation host process further includes:
receiving a setting instruction sent by the monitoring end according to the second point table; wherein the set instruction is used for indicating a data point which needs to be read from the shared memory.
The electronic equipment can select the numerical value of the data point by itself and send the numerical value to the monitoring end, and the monitoring end can also select the numerical value of the data point to be monitored. And the monitoring end sends a setting instruction to the electronic equipment, and the electronic equipment reads the setting instruction to indicate that the numerical value of the data point needing to be read from the shared memory is sent to the monitoring end.
In the process of executing the simulation task by the simulation main process, the embodiment of the invention writes the numerical value of the data point into the shared memory, reads the numerical value of the data point from the shared memory based on the mapping relation between the first address and the second address, and sends the simulation test information to the monitoring end based on the reading result. The embodiment of the invention can realize real-time monitoring of the externally output simulation test results of all the electric power subsystems under the electric power system, and the interactivity of the simulation test is strong. In addition, the embodiment of the invention simulates the operation of the entity device in a pure software form, combines each communication process, realizes the real-time processing and forwarding of signals in a simulation time domain, can finish the joint debugging of application test and simulation by separating from the entity device, reduces the test cost, and can improve the research and development and test efficiency in the aspects of in-plant test, simulation and scientific research and training.
Referring to fig. 6, a schematic flow chart of another simulation testing method provided in the embodiment of the present invention is shown, where the simulation testing method further includes:
s601, receiving a first instruction sent by the monitoring end; the first instruction is for instructing to modify a numerical value of a first data point in the second point table.
The monitoring end can monitor the simulation process of the electronic equipment and can remotely interact with the electronic equipment. Four-remote, four-remote-finger remote measurement, remote signaling, remote control and remote regulation are realized. Telemetry (telemetry information), among others: and (4) remote measurement. And collecting and transmitting operation parameters including various electrical quantities (such as voltage, current, power and the like on a line), load flow and the like. Remote signaling (remote signaling information): a remote signal. Various protection and switching value information is collected and transmitted. Remote control (remote control information): and (5) remote control. And receiving and executing remote control instructions, mainly switching on and off, and remotely controlling some remote switch control devices. Remote tuning (remote tuning information): and (4) remote adjustment. And receiving and executing a remote adjusting instruction, and performing remote adjustment on remote controlled equipment, such as adjusting the output power of the generator.
And the monitoring end sends a first instruction to the electronic equipment, wherein the first instruction is used for instructing the electronic equipment to modify the numerical value of the first data point in the second point table. The first instruction includes a first address of the first data point and a corresponding modified value.
S602, the first instruction is analyzed to obtain a first address of the first data point and a corresponding modified value.
S603, modifying the numerical value stored in the corresponding second address into the modified value in the shared memory based on the mapping relation and the first address of the first data point; and modifying the value of the first data point in the simulation main process into the modified value.
The communication server side obtains a second address corresponding to the first address based on the mapping relation between the first address and the second address, and modifies the numerical value stored in the corresponding second address into the modified value in the shared memory.
After the value in the shared memory is modified by the communication server, the electronic device obtains the value of the modified data point from the shared memory, and correspondingly modifies the value of the first data point in the simulation main process into the modified value.
For example, if the value of a data point corresponds to a switch in the power system, a value of 0 corresponds to the switch being off, and a value of 1 corresponds to the switch being on. The monitoring end changes the numerical value of a corresponding data point in the simulation main process from 0 to 1 by sending a first instruction, so that the on-off state is changed from off to on, and the monitoring end remotely controls the power system.
The embodiment of the invention can display the simulation process at the monitoring end, carry out remote control, remote jump and other operations on the simulation object, not only can finish the protection main logic test, but also can carry out the switch field control process sequence test simulation, and the interactivity of the simulation test is strong.
Referring to fig. 7, it shows a schematic flow chart of a simulation testing method provided in an application embodiment of the present invention, where the simulation testing flow includes:
s701, visual programming software forms each device code and a first point table, and a compiler is called to compile each device code and platform interface function into a device program library.
In an application embodiment of the invention, the device is an electric alternating current and direct current protection control device, the electric alternating current and direct current protection control device is an entity device, and visual programming software is used for editing and forming a first point table and a binary program of the device for the device to use and operate.
S702, importing the first point table of each device into the point table configuration software, configuring the global number of each data point, and forming 1 second point table.
Respectively determining the mapping relation corresponding to each data point in the second point table; the mapping relation is the mapping relation of the first address and the second address; the first address is the global number of the corresponding data point in the second point table; the second address represents a set memory address of a corresponding data point.
S703, creating a primary wiring simulation diagram of the actual engineering and an analog quantity and state quantity array in PSCAD simulation software; writing Fortran code and calling device program library.
S704, a monitoring picture is created at the monitoring end, a second point table is imported, and remote control, remote adjustment and remote measurement points are associated.
And the monitoring end selects the set data points in the second point table as remote control, remote regulation and remote measurement points.
S705, starting a simulation main process in the PSCAD, and creating a shared memory by the simulation main process.
S706, simulating the main process to periodically run the task function, and refreshing the numerical value of the data point to the shared memory.
S707, starting an IEC104 server, reading a global point list file, and establishing a mapping relation through a variable name and a shared memory; and the monitoring terminal and the IEC104 server terminal establish communication link connection.
And S708, reading the numerical value of the data point from the shared memory by the IEC104 server, and sending the numerical value to the monitoring end.
And S709, the monitoring end sends a first instruction to the communication server, and the communication server analyzes the first instruction to obtain a first address of the first data point and a corresponding modification value.
S710, modifying a numerical value stored in a corresponding second address into a modified value in the shared memory based on the mapping relation and the first address of the first data point; and modifying the value of the first data point in the simulation main process into a modified value.
The embodiment of the invention can display the simulation process at the monitoring end, realize the monitoring of the simulation process, carry out remote control, remote jump and other operations on the simulation object, not only can finish the protection main logic test, but also can carry out the switch field control process test simulation, and the interactivity of the simulation test is strong.
Fig. 8 is a schematic diagram of a simulation interaction module of an apparatus according to an embodiment of the present invention, where, as shown in fig. 8, the apparatus includes a plurality of plug-ins, each plug-in includes a plurality of applications, each application includes a plurality of task chains, and each task chain includes a plurality of pages.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
Referring to fig. 9, fig. 9 is a schematic diagram of a simulation testing apparatus according to an embodiment of the present invention, as shown in fig. 9, the apparatus includes: the device comprises a generating module, a determining module, a creating module and a sending module.
The generating module is used for generating a second point table of the simulation main process based on the first point table of each simulation subprocess in the at least two simulation subprocesses; the simulation main process consists of the at least two simulation sub-processes;
a determining module, configured to determine a mapping relationship corresponding to each data point in the second point table respectively; the mapping relation is the mapping relation of the first address and the second address; the first address is the global number of the corresponding data point in the second point table; the second address represents a set memory address of a corresponding data point;
the creation module is used for creating a shared memory; during the process of executing the simulation task, the simulation main process writes the numerical values of the data points into the shared memory according to the second address corresponding to each data point in the second point table;
and the sending module is used for reading the numerical value of the data point from the shared memory based on the mapping relation and sending simulation test information to the monitoring end based on the reading result.
The device further comprises:
the modification module is used for receiving a first instruction sent by the monitoring end; the first instruction is used for indicating the numerical value of a first data point in the second point table to be modified;
analyzing the first instruction to obtain a first address of the first data point and a corresponding modified value;
modifying the value stored in the corresponding second address into the modified value in the shared memory based on the mapping relation and the first address of the first data point; and modifying the value of the first data point in the simulation main process into the modified value.
The sending module is specifically configured to:
reading the second point table;
determining a first address of a data point to be read;
determining a second address corresponding to the first address of the data point needing to be read in the second point table according to the mapping relation;
reading the value of the data point from a second address of the shared memory.
The determining module is specifically configured to:
acquiring a first address and a second address corresponding to each data point in the second point table respectively;
and binding the first address and the second address respectively corresponding to each data point in the second point table.
The device further comprises:
the receiving module is used for receiving a setting instruction sent by the monitoring end according to the second point table; wherein the set instruction is used for indicating a data point which needs to be read from the shared memory.
The sending module is specifically configured to:
and reading the numerical value of the data point from the shared memory when the set triggering condition is met.
The sending module is specifically configured to:
and reading the value of the data point from the shared memory when the value of the set data point changes.
It should be noted that: in the simulation test apparatus provided in the above embodiment, only the division of the above modules is used for illustration when performing the simulation test, and in practical applications, the above processing may be distributed to different modules as needed, that is, the internal structure of the apparatus may be divided into different modules to complete all or part of the above described processing. In addition, the simulation test apparatus and the simulation test method provided by the above embodiments belong to the same concept, and specific implementation processes thereof are detailed in the method embodiments and are not described herein again.
Fig. 10 is a schematic diagram of an electronic device according to an embodiment of the present invention. The electronic device includes: cell phones, tablets, servers, etc. As shown in fig. 10, the electronic apparatus of this embodiment includes: a processor, a memory, and a computer program stored in the memory and executable on the processor. The processor, when executing the computer program, implements the steps in the various method embodiments described above, such as steps 101 to 104 shown in fig. 1. Alternatively, the processor, when executing the computer program, implements the functions of the modules in the above-described device embodiments, such as the functions of the generation module, the determination module, the creation module, and the transmission module shown in fig. 9.
Illustratively, the computer program may be partitioned into one or more modules that are stored in the memory and executed by the processor to implement the invention. The one or more modules may be a series of computer program instruction segments capable of performing certain functions, which are used to describe the execution of the computer program in the electronic device.
The electronic device may include, but is not limited to, a processor, a memory. Those skilled in the art will appreciate that fig. 10 is merely an example of an electronic device and is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or different components, e.g., the electronic device may also include input-output devices, network access devices, buses, etc.
The Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory may be an internal storage module of the electronic device, such as a hard disk or a memory of the electronic device. The memory may also be an external storage device of the electronic device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a flash memory Card (FlashCard), and the like, which are provided on the electronic device. Further, the memory may also include both an internal storage module and an external storage device of the electronic device. The memory is used for storing the computer program and other programs and data required by the electronic device. The memory may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned functional modules and modules are illustrated as examples, and in practical applications, the above-mentioned functional allocation may be performed by different functional modules and modules according to requirements, that is, the internal structure of the apparatus is divided into different functional modules or modules to perform all or part of the above-mentioned functions. In the embodiments, each functional module and each module may be integrated into one processing module, or each module may exist alone physically, or two or more modules are integrated into one module, and the integrated modules may be implemented in a form of hardware or a form of software functional modules. In addition, specific names of the functional modules and modules are only used for distinguishing the functional modules and the modules from each other, and are not used for limiting the protection scope of the present application. The modules and the specific working processes of the modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative modules and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. 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.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus/electronic device and method may be implemented in other ways. For example, the above-described apparatus/electronic device embodiments are merely illustrative, and for example, the modules or the division of modules are merely one logical division, and there may be other divisions when actually implemented, for example, a plurality of modules or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or modules, and may be in an electrical, mechanical or other form.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.
The integrated modules/modules, if implemented in the form of software functional modules and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.

Claims (10)

1. A simulation test method, the method comprising:
generating a second point table of the simulation main process based on the first point table of each simulation subprocess in the at least two simulation subprocesses; the simulation main process consists of the at least two simulation sub-processes;
respectively determining the mapping relation corresponding to each data point in the second point table; the mapping relation is the mapping relation of the first address and the second address; the first address is the global number of the corresponding data point in the second point table; the second address represents a set memory address of a corresponding data point;
creating a shared memory; during the process of executing the simulation task, the simulation main process writes the numerical values of the data points into the shared memory according to the second address corresponding to each data point in the second point table;
and reading the numerical value of the data point from the shared memory based on the mapping relation, and sending simulation test information to a monitoring end based on the reading result.
2. The method of claim 1, further comprising:
receiving a first instruction sent by the monitoring end; the first instruction is used for indicating the numerical value of a first data point in the second point table to be modified;
analyzing the first instruction to obtain a first address of the first data point and a corresponding modified value;
modifying the value stored in the corresponding second address into the modified value in the shared memory based on the mapping relation and the first address of the first data point; and modifying the value of the first data point in the simulation main process into the modified value.
3. The method of claim 1, wherein reading the value of the data point from the shared memory based on the mapping comprises:
reading the second point table;
determining a first address of a data point to be read;
determining a second address corresponding to the first address of the data point needing to be read in the second point table according to the mapping relation;
reading the value of the data point from a second address of the shared memory.
4. The method of claim 1, wherein the separately determining the mapping relationship corresponding to each data point in the second point table comprises:
acquiring a first address and a second address corresponding to each data point in the second point table respectively;
and binding the first address and the second address respectively corresponding to each data point in the second point table.
5. The method of claim 1, wherein generating the second point table of the emulation host process further comprises:
receiving a setting instruction sent by the monitoring end according to the second point table; wherein the content of the first and second substances,
the set instruction is used for indicating a data point needing to be read from the shared memory.
6. The method of claim 1, wherein reading the value of the data point from the shared memory comprises:
and reading the numerical value of the data point from the shared memory when the set triggering condition is met.
7. The method of claim 6, wherein reading the value of the data point from the shared memory when the set trigger condition is satisfied comprises:
and reading the value of the data point from the shared memory when the value of the set data point changes.
8. A simulation test apparatus, comprising:
the generating module is used for generating a second point table of the simulation main process based on the first point table of each simulation subprocess in the at least two simulation subprocesses; the simulation main process consists of the at least two simulation sub-processes;
a determining module, configured to determine a mapping relationship corresponding to each data point in the second point table respectively; the mapping relation is the mapping relation of the first address and the second address; the first address is the global number of the corresponding data point in the second point table; the second address represents a set memory address of a corresponding data point;
the creation module is used for creating a shared memory; during the process of executing the simulation task, the simulation main process writes the numerical values of the data points into the shared memory according to the second address corresponding to each data point in the second point table;
and the sending module is used for reading the numerical value of the data point from the shared memory based on the mapping relation and sending simulation test information to the monitoring end based on the reading result.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the simulation test method of any of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program comprising program instructions that, when executed by a processor, cause the processor to carry out the simulation testing method of any of claims 1 to 7.
CN202010196885.2A 2020-03-19 2020-03-19 Simulation test method, electronic device and storage medium Active CN111460635B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010196885.2A CN111460635B (en) 2020-03-19 2020-03-19 Simulation test method, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010196885.2A CN111460635B (en) 2020-03-19 2020-03-19 Simulation test method, electronic device and storage medium

Publications (2)

Publication Number Publication Date
CN111460635A true CN111460635A (en) 2020-07-28
CN111460635B CN111460635B (en) 2022-07-22

Family

ID=71683562

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010196885.2A Active CN111460635B (en) 2020-03-19 2020-03-19 Simulation test method, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN111460635B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113535588A (en) * 2021-08-09 2021-10-22 北京烁科精微电子装备有限公司 CMP equipment simulation test method and test system
CN113705004A (en) * 2021-08-30 2021-11-26 中国电子科技集团公司第三十八研究所 Real-time system behavior level software simulation method suitable for DSP
CN115203977A (en) * 2022-08-24 2022-10-18 国网信息通信产业集团有限公司 Power grid simulation system

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105718305A (en) * 2016-03-15 2016-06-29 南京南瑞继保电气有限公司 Simulation task parallel scheduling method based on progress
CN105868441A (en) * 2016-03-23 2016-08-17 南京南瑞集团公司 Multi-source data-based test platform for integrating WAMS application system data

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105718305A (en) * 2016-03-15 2016-06-29 南京南瑞继保电气有限公司 Simulation task parallel scheduling method based on progress
CN105868441A (en) * 2016-03-23 2016-08-17 南京南瑞集团公司 Multi-source data-based test platform for integrating WAMS application system data

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113535588A (en) * 2021-08-09 2021-10-22 北京烁科精微电子装备有限公司 CMP equipment simulation test method and test system
CN113705004A (en) * 2021-08-30 2021-11-26 中国电子科技集团公司第三十八研究所 Real-time system behavior level software simulation method suitable for DSP
CN113705004B (en) * 2021-08-30 2023-06-13 中国电子科技集团公司第三十八研究所 Real-time system behavior level software simulation method suitable for DSP
CN115203977A (en) * 2022-08-24 2022-10-18 国网信息通信产业集团有限公司 Power grid simulation system

Also Published As

Publication number Publication date
CN111460635B (en) 2022-07-22

Similar Documents

Publication Publication Date Title
CN111460635B (en) Simulation test method, electronic device and storage medium
CN110096420A (en) A kind of data processing method, system and device
CN103078765A (en) Test method and device of network element equipment performance
CN110463138B (en) Network structure information generation method
CN110913362B (en) Method and device for realizing wireless signal test through client and test equipment
CN114661535A (en) Operation and maintenance management method and device for Internet of things equipment, electronic equipment and storage medium
CN112564772B (en) Satellite data acquisition system
CN111123728A (en) Unmanned vehicle simulation method, device, equipment and computer readable medium
CN113535586A (en) Test environment switching method, device, equipment and readable storage medium
CN111459795A (en) Cluster pressure testing method and device, computer equipment and storage medium
EA013317B1 (en) Method and apparatus for control of a network in hvac and other applications
CN116319492A (en) Switch testing method and device, storage medium and electronic equipment
CN116540038A (en) Insulation state monitoring method and device for capacitor bank
CN107181644B (en) Method and apparatus for monitoring the network performance of network application
CN114125024A (en) Audio transmission method, electronic device and readable storage medium
CN112182073A (en) Electric power measurement data display method and system
JPH05312884A (en) Connection information method and device for information wiring facility
JPH01186117A (en) Automatic connection system for electric circuit network simulator
CN112445198A (en) Vehicle-mounted controller testing method, device and system
CN109725216A (en) The data interactive method and device of charging pile detection device
CN105676738A (en) Data simulation system and method and data monitoring system and method for monitored object
CN116359716B (en) Method, system and medium for dynamic allocation of test resources in IC tester
CN117313189B (en) Visual analysis method, system, terminal and storage medium for optical fiber secondary circuit
CN113434410A (en) Data testing method and device, storage medium and electronic device
CN117806259A (en) Switching method and device of equipment channels

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