Virtualization automatic modeling and verification method and system for protection control device
By virtualizing the protection control device into an independent process, and realizing the synchronization of multi-board threads and communication of virtual switches, problems such as the inability to effectively reflect the internal functional characteristics and clock synchronization of the device in the prior art are solved, and embedded software simulation scheduling operation on a general PC is realized, which promotes device development and business function verification.
Patent Information
- Application Number
- CN202510089725.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-21
- Publication Date
- 2025-05-13
AI Technical Summary
The existing technology has shortcomings in the functional modeling and virtualization packaging of relay protection systems, which cannot effectively reflect the multi-board and internal functional characteristics of the device. Moreover, the simulation operation on the cloud platform is far from the actual physical device, and it cannot reflect the key technical problems such as clock synchronization, multi-board collaboration, and resource scheduling.
By virtualizing the protection control device into an independent process, multiple boards are used as multiple threads to synchronize and interact with data, and using bus technology and virtual switches to realize business data interaction and external communication between virtual device processes.
It realizes simulation scheduling and operation of embedded software on a general PC, and can virtualize multiple "devices" for development and maintenance personnel in a short time, which promotes device development and business function verification, and solves problems such as the inability to reflect the internal functional characteristics and clock synchronization in the existing technology.
Smart Images

Figure CN119987945A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of relay protection of electric power systems, and more specifically, relates to a virtual automatic modeling and verification method and system for a protection control device. Background Art
[0002] If the protection control device is not available, R&D personnel can quickly build a virtual device with the same architecture on a general-purpose PC with X86 architecture to verify the protection function and configuration modeling. In addition to special hardware performance tests, the protection function and human-machine interface communication function can be tested and verified on the virtual device.
[0003] Prior art document 1 (CN103984546A) discloses a method for functional modeling of a relay protection system based on the IEC 61850 standard. Its shortcoming is that it only performs communication modeling in terms of the external characteristics of the device (external functions), and does not reflect the multi-board and internal functional characteristics of the device.
[0004] Prior art document 2 (CN114995947A) discloses a cloud platform-based relay protection resource virtualization packaging method and device. Its shortcoming is that the main functions of the relay protection device are placed on the cloud platform for simulation operation, which is quite different from the actual physical device. The clock synchronization, multi-board coordination, resource scheduling, etc. that are concerned in the research and development of the actual physical device cannot be reflected. Summary of the invention
[0005] In order to solve the deficiencies in the prior art, the present invention provides a virtual automatic modeling and verification method and system for a protection control device, which virtualizes the protection control device into an independent process, and various boards in the relay protection device, such as CPU boards, communication boards, DIO boards and other boards, are implemented as multiple threads of this process. Virtual multiple devices and internal multiple boards are synchronized through bus technology. The virtual device process uses internal bus technology to realize data interaction and communication between multiple board threads, and virtual device processes provide business layer and external data communication through virtual switches.
[0006] The present invention adopts the following technical solution.
[0007] A first aspect of the present invention provides a protection control device virtualization automatic modeling and verification method, comprising the following steps:
[0008] Step A: Create a system management process as a resident process to provide core system management functions, including: a multi-device process management and daemon module and a virtual device creation and management module;
[0009] Step B: Loading a static configuration model file, the static configuration model file is used as an external configuration model to describe the capabilities of the actual physical device and is used to create a corresponding virtual device process;
[0010] Step C: virtualizing the relay protection device into an independent virtual device process, and implementing multiple boards included in the relay protection device as multiple threads of the virtual device process;
[0011] Step D: Inject dynamic data to assist in verifying and testing the dynamic characteristics and business functions of the virtual device process.
[0012] Preferably, the system management process further includes: a virtual clock synchronization management module and a device debugging and diagnosis module;
[0013] The virtual clock synchronization management module sends time synchronization messages regularly through the virtual switch to maintain clock synchronization between multiple virtual device processes;
[0014] The multi-device process management and guard module is used to register the virtual device process to this module. When an abnormality occurs in the virtual device process, the multi-device process management and guard module automatically restarts the virtual device process.
[0015] The virtual device creation and management module is used to manage the creation, model loading, copying and deletion of virtual devices;
[0016] The device debugging and diagnosis module is used to debug and diagnose the virtual device process and provide a log recording function.
[0017] Preferably, in step C, different processes are constructed in the form of independent functional units according to the type of relay protection device;
[0018] The virtual device process includes: a virtual protection process and / or a virtual measurement and control process.
[0019] Preferably, the virtual device process includes: a main thread, a data management module, a task scheduling thread and a plurality of virtual board threads;
[0020] The data management module includes: an SDB memory database and a virtual SDM bare package protocol; the data management module executes data exchange between threads based on the SDB memory database and the virtual SDM bare package protocol of the physical device.
[0021] Preferably, the plurality of virtual board threads are used to virtualize a plurality of functional boards of an actual physical device, including: a CPU thread, a communication board thread and a DIO board thread.
[0022] Preferably, for a relay protection device with dual redundant CPU boards, the consistency of the running program is ensured by thread duplication and is independently addressed in the virtual internal bus.
[0023] Preferably, deploying multiple threads within the virtual device process specifically includes:
[0024] Create SDB memory object database: Create SDB memory object database by loading external input SDC / ESDC files. All virtual injection output data are operated and read in this memory object database. The intermediate results and final results of thread and task execution are also written back to this memory object database.
[0025] Generate board thread: Create board thread by porting the embedded program of the actual physical device to the PC with X86 architecture;
[0026] Configure analog and switch data buffers: Inject data sources into analog and switch data buffers through external COMTRADE recording files for the board thread to call for data processing.
[0027] Preferably, data interaction and communication between multiple board threads are implemented through virtual CAN Ethernet, all instructions refer to the CAN network protocol of the actual physical device, and the link layer protocol adopts naked packet transmission and reception, specifically including:
[0028] Virtual CAN network 0xF1, 0xF9 messages realize the sending of DI and DO positions;
[0029] Virtual CAN network 0xF6, 0xF7 messages realize the virtual issuance of protection actions and reset commands;
[0030] Other CAN network message functions are implemented by referring to the CAN network protocol of the actual physical device.
[0031] Preferably, the business data interaction and external communication between virtual device processes are implemented through a virtual switch.
[0032] Adopt standard IEC61850 communication protocol and simulate the real GOOSE / SV network and MMS network environment of substation based on SCD file;
[0033] Process layer simulation: by parsing the intelligent terminal and merging unit in the SCD file, simulate the GOOSE and SV message sending;
[0034] Bay layer simulation: By parsing other measurement and control equipment in the SCD file, simulate the bay layer GOOSE message sending;
[0035] Station control layer simulation: By loading SCD or reading online, enable the 61850 client and simulate the minimum monitoring system.
[0036] The second aspect of the present invention provides a virtual automatic modeling and verification system for a protection control device, including: a device process virtual simulation operation management module, a static configuration loading module and a dynamic data injection module:
[0037] The device process virtual simulation operation management module includes: a system management process and multiple virtual device processes. The business data interaction and external communication between the processes are realized through a virtual switch. The virtual device process is an independent process formed by the virtualization of the relay protection device. The multiple boards included in the relay protection device are realized as multiple threads of the virtual device process.
[0038] The static configuration loading module is used to load a static configuration model file, which is used as an external configuration model to describe the capabilities of the actual physical device and to create a corresponding virtual device process;
[0039] The dynamic data injection module is used to inject dynamic data to assist in verifying and testing the dynamic characteristics and business functions of the virtual device process.
[0040] Compared with the prior art, the beneficial effects of the present invention include at least: the present invention provides a virtual automatic modeling and verification method for protection control devices in view of the characteristics of protection control and similar embedded devices, and realizes the simulation scheduling and operation of embedded software on a general PC. Taking full account of the characteristics of embedded software of protection control devices, through abstract modeling of hardware capabilities and the construction method of virtual data bus, a large number of virtual "devices" can be created in a short time for use by development and maintenance personnel, which is of great help to device development, business function verification, etc. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 is a schematic diagram of a system architecture provided according to an embodiment of the present invention;
[0042] Figure 2 It is a schematic diagram of multi-thread deployment in a virtual device provided according to an embodiment of the present invention. DETAILED DESCRIPTION
[0043] In order to make the purpose, technical scheme and advantages of the present invention clearer, the technical scheme of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. The described embodiments are only embodiments of a part of the present invention, not all embodiments. Based on the spirit of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work belong to the protection scope of the present invention.
[0044] like Figure 1 , 2As shown, embodiment 1 of the present invention provides a virtual automatic modeling and verification method for a protection control device, comprising the following steps:
[0045] Step A: Create a system management process as a resident process to provide core system management functions, including: a virtual clock synchronization management module, a multi-device process management and daemon module, a virtual device creation and management module, and a device debugging and diagnosis module.
[0046] Preferably but not restrictively, the virtual clock synchronization management module sends time synchronization messages regularly through the virtual switch to maintain clock synchronization between multiple virtual device processes;
[0047] The multi-device process management and guard module is used to register the virtual device process to the management module. When an exception occurs in the virtual device process, the multi-device process management and guard module automatically restarts the virtual device process, similar to the automatic restart of an actual physical device.
[0048] The virtual device creation and management module is used to manage the creation, model loading, copying, and deletion of virtual devices;
[0049] The device debugging and diagnosis module is used to debug and diagnose the virtual device process and provide a log recording function.
[0050] Step B: Loading a static configuration model file, wherein the static configuration model file serves as an external configuration model, describes the capabilities of an actual physical device, and is used to create a corresponding virtual device process.
[0051] Preferably, but not limited to, the static configuration model files include but are not limited to: EXTLIB external library, SF file, SDC / ESDC file and other internal model file formats.
[0052] Step C: virtualizing the relay protection device into an independent virtual device process, and implementing multiple boards included in the relay protection device as multiple threads of the virtual device process.
[0053] Preferably, but not limited to, different processes are constructed in the form of independent functional units according to the type of relay protection device; for example, but not limited to, Figure 1 As shown, the virtual device process includes: a virtual protection process, a virtual measurement and control process, etc.
[0054] Preferably but not limitatively, the virtual device process includes: a main thread, a data management module, a task scheduling thread and a plurality of virtual board threads.
[0055] Specifically, the main thread is used for data source input, external output display and thread management;
[0056] The data management module includes: an SDB memory database and a virtual SDM bare package protocol; the data management module executes data exchange between threads based on the SDB memory database and the virtual SDM bare package protocol of the physical device, which corresponds to data interaction between multiple boards of the actual physical device through the bare package protocol, that is, the Ethernet link layer protocol. It can be understood that the SDB memory database is a memory database based on object data, and the virtual SDM bare package protocol is an Ethernet link layer data transmission protocol based on object data.
[0057] The task scheduling thread is used to perform task scheduling similar to that of a physical device.
[0058] Multiple virtual board threads are used to virtualize multiple functional boards of the actual physical device, including but not limited to CPU threads, communication board threads, DIO board threads, and other board threads; wherein there may be multiple CPU threads, such as but not limited to Figure 1 The CPU1 thread and CPU2 thread in the communication board are the Master thread.
[0059] Further preferably but not restrictively, for a relay protection device with dual redundant CPU boards, the consistency of the running program is ensured by thread replication, and is independently addressed in the virtual internal bus, such as but not limited to addresses 81 and 82, to form a CPU group, such as but not limited to group address 80, which is consistent with the internal CAN bus characteristics of the actual physical device.
[0060] Preferably but not limiting, deploying multiple threads within the virtual device process specifically includes:
[0061] Create an SDB memory object database: Create an SDB memory object database by loading external input SDC / ESDC and other capability files. All virtual injection output data are operated and read in this memory object database. The intermediate and final results of thread and task execution are also written back to this memory object database.
[0062] Generate board threads: Create board threads by porting the embedded program of the actual physical device to the PC with X86 architecture. This includes but is not limited to CPU board threads and communication Master board threads. Other boards need to rely on CPU board threads to complete virtual functions. For example, DIO board threads complete the virtualization of input and output data and then inject them into the SDB memory database for the CPU board to perform logical calculations.
[0063] Configure analog and switch data buffers: Inject data sources into analog and switch data buffers through external COMTRADE recording files for the board thread to call for data processing.
[0064] Further preferably but not restrictively, the multi-threaded deployment generally follows the unified rules of the operating system, and the main thread and the thread with high priority need to be prioritized, that is, the main thread has the highest priority, the CPU thread is second, and other threads have low priority. If conditions permit, different threads can be fixedly assigned to different cores of the PC CPU to improve execution efficiency.
[0065] Further preferably but not restrictively, data interaction and communication between multiple board threads are realized through virtual CAN Ethernet, all instructions refer to the CAN network protocol of the actual physical device, and the link layer protocol adopts naked packet transmission and reception, specifically including:
[0066] Virtual CAN network 0xF1, 0xF9 messages realize the sending of DI and DO positions;
[0067] Virtual CAN network 0xF6, 0xF7 messages realize the virtual issuance of protection actions and reset commands;
[0068] Other CAN network message functions are implemented by referring to the CAN network protocol of the actual physical device.
[0069] Further preferably but not restrictively, the business data interaction and external communication between virtual device processes are realized through a virtual switch, which can support common power protocols, MQTT protocols, and TCP / IP private protocols of manufacturers to realize data interaction between virtual device processes. The protocols and protocols refer to the actual physical device protocols, specifically including:
[0070] Adopt standard IEC61850 communication protocol and simulate the real GOOSE / SV network and MMS network environment of substation based on SCD file;
[0071] Process layer simulation: by parsing the intelligent terminal and merging unit in the SCD file, simulate the GOOSE and SV message sending;
[0072] Bay layer simulation: By parsing other measurement and control equipment in the SCD file, simulate the bay layer GOOSE message sending;
[0073] Station control layer simulation: By loading SCD or reading online, enable the 61850 client and simulate the minimum monitoring system.
[0074] Step D: As an external input data source, dynamic data is injected to assist in verifying and testing the dynamic characteristics and business functions of the virtual device process.
[0075] Preferably but not restrictively, the injected dynamic data include but are not limited to: fixed value solidification files, COMTRADE recordings, data CSV files exported by simulation software such as Simulink / PSCAD, etc.
[0076] It is worth noting that the descriptions of steps A, B, C and D in the present invention are merely exemplary numbers used for the purpose of clearly describing the technical solution, and the letters are not a limitation on the order of the steps.
[0077] Embodiment 2 of the present invention provides a protection control device virtualization automatic modeling and verification system, which runs a protection control device virtualization automatic modeling and verification method described in embodiment 1, including: a device process virtual simulation operation management module, a static configuration loading module and a dynamic data injection module:
[0078] The device process virtual simulation operation management module includes: a system management process and multiple virtual device processes. The business data interaction and external communication between the processes are realized through a virtual switch. The virtual device process is an independent process formed by the virtualization of the relay protection device. The multiple boards included in the relay protection device are realized as multiple threads of the virtual device process.
[0079] The static configuration loading module is used to load a static configuration model file, which is used as an external configuration model to describe the capabilities of the actual physical device and to create a corresponding virtual device process;
[0080] The dynamic data injection module is used to inject dynamic data to assist in verifying and testing the dynamic characteristics and business functions of the virtual device process.
[0081] It is worth noting that the prior art only performs communication modeling in terms of the external characteristics of the device (external functions), does not reflect the multi-board and internal functional characteristics of the device, and the simulation operation on the cloud platform is quite different from the actual physical device, and cannot reflect the technical difficulties of clock synchronization, multi-board coordination, and resource scheduling in the research and development of physical devices. As a prominent substantive feature that distinguishes the present invention from the prior art, the present invention focuses on the automatic modeling and verification method of the board granularity inside the device, and provides a means of virtual communication between boards, which greatly promotes R&D personnel to conduct software algorithm and function research without actual physical devices.
[0082] The present disclosure may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.
[0083] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents, and any modifications or equivalent replacements that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A virtual automatic modeling and verification method for a protection control device, characterized in that: The following steps are involved: Step A: Create a system management process as a resident process to provide core system management functions, including: a multi-device process management and daemon module and a virtual device creation and management module; Step B: Loading a static configuration model file, the static configuration model file is used as an external configuration model to describe the capabilities of the actual physical device and is used to create a corresponding virtual device process; Step C: virtualizing the relay protection device into an independent virtual device process, and implementing multiple boards included in the relay protection device as multiple threads of the virtual device process; Step D: Inject dynamic data to assist in verifying and testing the dynamic characteristics and business functions of the virtual device process.
2. A virtual automatic modeling and verification method for a protection control device according to claim 1, characterized in that: The system management process also includes: a virtual clock synchronization management module and a device debugging and diagnosis module; The virtual clock synchronization management module sends time synchronization messages regularly through the virtual switch to maintain clock synchronization between multiple virtual device processes; The multi-device process management and guard module is used to register the virtual device process to this module. When an abnormality occurs in the virtual device process, the multi-device process management and guard module automatically restarts the virtual device process. The virtual device creation and management module is used to manage the creation, model loading, copying and deletion of virtual devices; The device debugging and diagnosis module is used to debug and diagnose the virtual device process and provide a log recording function.
3. The method for virtual automatic modeling and verification of a protection control device according to claim 1, characterized in that: In step C, different processes are constructed in the form of independent functional units according to the type of relay protection device; The virtual device process includes: a virtual protection process and / or a virtual measurement and control process.
4. A virtual automatic modeling and verification method for a protection and control device according to any one of claims 1 to 3, characterized in that: The virtual device process includes: a main thread, a data management module, a task scheduling thread and multiple virtual board threads; The data management module includes: an SDB memory database and a virtual SDM bare package protocol; the data management module executes data exchange between threads based on the SDB memory database and the virtual SDM bare package protocol of the physical device.
5. A virtual automatic modeling and verification method for a protection control device according to claim 4, characterized in that: The multiple virtual board threads are used to virtualize multiple functional boards of an actual physical device, including: a CPU thread, a communication board thread and a DIO board thread.
6. A virtual automatic modeling and verification method for a protection control device according to claim 5, characterized in that: For relay protection devices with dual redundant CPU boards, the consistency of the running program is ensured by thread replication and independent addressing in the virtual internal bus.
7. A virtual automatic modeling and verification method for a protection control device according to claim 4, characterized in that: The multiple threads within the deployment virtual device process specifically include: Create SDB memory object database: Create SDB memory object database by loading external input SDC / ESDC files. All virtual injection output data are operated and read in this memory object database. The intermediate results and final results of thread and task execution are also written back to this memory object database. Generate board thread: Create board thread by porting the embedded program of the actual physical device to the PC with X86 architecture; Configure analog and switch data buffers: Inject data sources into analog and switch data buffers through external COMTRADE recording files for the board thread to call for data processing.
8. A virtual automatic modeling and verification method for a protection control device according to claim 4, characterized in that: Data interaction and communication between multiple board threads are realized through virtual CAN Ethernet. All instructions refer to the CAN network protocol of the actual physical device. The link layer protocol uses bare packet transmission and reception, including: Virtual CAN network 0xF1, 0xF9 messages realize the sending of DI and DO positions; Virtual CAN network 0xF6, 0xF7 messages realize the virtual issuance of protection actions and reset commands; Other CAN network message functions are implemented by referring to the CAN network protocol of the actual physical device.
9. A virtual automatic modeling and verification method for a protection control device according to claim 4, characterized in that: Business data interaction and external communication between virtual device processes are realized through virtual switches. Adopt standard IEC61850 communication protocol and simulate the real GOOSE / SV network and MMS network environment of substation based on SCD file; Process layer simulation: by parsing the intelligent terminal and merging unit in the SCD file, simulate the GOOSE and SV message sending; Bay layer simulation: By parsing other measurement and control equipment in the SCD file, simulate the bay layer GOOSE message sending; Station control layer simulation: By loading SCD or reading online, enable the 61850 client and simulate the minimum monitoring system.
10. A virtual automatic modeling and verification system for protection and control devices, characterized in that: include: Device process virtual simulation operation management module, static configuration loading module and dynamic data injection module: The device process virtual simulation operation management module includes: a system management process and multiple virtual device processes. The business data interaction and external communication between the processes are realized through a virtual switch. The virtual device process is an independent process formed by the virtualization of the relay protection device. The multiple boards included in the relay protection device are realized as multiple threads of the virtual device process. The static configuration loading module is used to load a static configuration model file, which is used as an external configuration model to describe the capabilities of the actual physical device and to create a corresponding virtual device process; The dynamic data injection module is used to inject dynamic data to assist in verifying and testing the dynamic characteristics and business functions of the virtual device process.
Citation Information
Patent Citations
Relay protection system functional modeling method based on IEC61850 standard
CN103984546A
Relay protection resource virtualization packaging method and device based on cloud platform
CN114995947A
Cited By
Relay protection algorithm development method based on virtual platform, medium and system
CN121348801A