A direct current protection modeling and direct current protection function implementation method based on description language

CN116956714BActive Publication Date: 2026-10-30STATE GRID JIANGSU ELECTRIC POWER CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310789792.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-29
Publication Date
2026-10-30
Estimated Expiration
2043-06-29

AI Technical Summary

Technical Problem

[0003]然而图形化语言及程序代码仅能在保护装置的平台上运行,无法轻易在其他功能软件上复用,更无法用简洁通用的语言表示,不利于不同算法平台、系统软件和保护逻辑之间的交互,不利于研发人员、工程人员和保护专业人员查看、理解和分析,语言的通用性、直观性和可解释性不佳

Benefits of technology

[0031]本发明将直流保护的功能原理逻辑框图用描述语言实现,对各类功能单元、联络线、沟通脚、输入、输出等均设计基于描述语言的模型,同时支持自定义功能单元,方便复用保护功能逻辑,大大提高了直流保护功能原理表示的简洁性,并在描述执行前,依据功能单元类型和沟通脚联络关系生成各模型的描述执行顺序,通过组合循环编号与染色步骤,可实现复杂的功能单元逻辑图功能语言的正确解释执行顺序生成,依照符合该生成过程生成的不同执行顺序均可正确执行,可有效防止产生执行异常错误,为保护原理的表示和程序解析、计算提供了极大便利,方便了保护动作行为的分析,提升了保护动作特性分析的效率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116956714B_ABST
    Figure CN116956714B_ABST
Patent Text Reader

Abstract

The application discloses a DC protection modeling and DC protection function implementation method based on a description language, and comprises the following steps: constructing various DC protection function unit models and reuse function unit models by using the description language; constructing an intermediate variable representing a tie line between communication pins of function units; constructing a tie model representing a tie line between communication pins of function units and a communication pin tie relationship of connected function units; generating a description execution sequence of each model according to a function unit type and a communication pin tie relationship; and performing a communication pin-by-communication pin and function unit-by-function unit protection logic calculation on the DC protection function unit model, the reuse function unit model, the intermediate variable and the tie model based on the execution sequence, so as to realize the DC protection function. The method greatly improves the conciseness of a DC protection function principle representation, provides great convenience for representation and program analysis and calculation of the DC protection function principle, and improves the efficiency of DC protection action characteristic analysis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of power system protection modeling technology, and relates to a method for DC protection modeling and DC protection function implementation based on a description language. Background Technology

[0002] Relay protection devices implement specific protection and control functions through logical calculations on acquired and received data. These devices are typically programmed using assembly language or C language and burned into flash memory, making the logic unalterable. With the further development of computer technology, graphical protection logic development has emerged. This graphical approach uses logic diagrams to replace programming languages, effectively separating software expertise from relay protection. The platform software executes the entire protection program by parsing the logic diagram and configuring resources. The platform software program on the device side parses different graphical elements through a logic engine and executes the corresponding algorithms according to a preset element order. It can also automatically generate C language code based on the device's logic diagram, reducing device-side development and code space.

[0003] However, graphical languages ​​and program code can only run on the protection device platform and cannot be easily reused on other functional software. Furthermore, they cannot be expressed in a concise and universal language, hindering interaction between different algorithm platforms, system software, and protection logic. This also makes it difficult for R&D personnel, engineers, and protection professionals to view, understand, and analyze the code; the language's universality, intuitiveness, and interpretability are poor. This significantly limits the widespread exchange and in-depth research of DC relay protection logic models and hinders the development of analytical capabilities for DC protection actions. Summary of the Invention

[0004] To address the shortcomings of existing technologies, this invention provides a DC protection modeling and DC protection function implementation method based on a description language. According to the requirements for modeling the functional principle of DC protection devices, the protection logic block diagram is fully mapped through description, which facilitates the association and viewing of data and views, facilitates program parsing and calculation, and improves the efficiency of protection action behavior analysis.

[0005] The present invention adopts the following technical solution.

[0006] A method for DC protection modeling and DC protection function implementation based on a description language includes the following steps:

[0007] Step 1: Classify the DC protection functional units and construct various DC protection functional unit models and reuse functional unit models using a description language;

[0008] Step 2: Use a description language to construct intermediate variables representing the communication lines between functional units;

[0009] Step 3: Based on the DC protection functional unit model, the reuse functional unit model, and intermediate variables, a connection model is constructed using a description language to represent a connection line between the communication pins of functional units and the connection relationship between the communication pins of connected functional units.

[0010] Step 4: Based on the functional unit type and communication pin connection relationship, the description execution order of each model is generated by cyclic numbering and coloring. Based on the execution order, the DC protection functional unit model, reused functional unit model, intermediate variable and connection model are subjected to communication pin-by-communication pin and functional unit protection logic calculation to realize the DC protection function.

[0011] Preferably, in step 1, the DC protection function unit is divided into the following categories according to its function: Boolean function unit, arithmetic function unit, comparison element limiter, timer, counter, trigger, analog quantity expansion function unit, input / output function unit, encoding / decoding function unit, and protection basic function unit.

[0012] Preferably, in step 1, for Boolean functional units, arithmetic functional units, and comparison-defined functional units, the DC protection functional unit model constructed using a description language includes the functional unit number, functional unit type, and related operational communication pins.

[0013] Preferably, in step 1, for timer, counter, trigger, and analog quantity expansion functional units, the model constructed using the description language includes the functional unit number, functional unit type, and related parameters.

[0014] For input / output functional units and encoding / decoding functional units, the model constructed using a description language includes the functional unit number, functional unit type, and related variables or parameters;

[0015] For protecting basic functional units, the model constructed using a description language includes the functional unit number, functional unit type, and related variables or parameters, or includes the functional unit number and functional unit type.

[0016] Preferably, in step 1, a multiplexing functional unit model is constructed based on the multiplexing logic. The multiplexing functional unit model has at least one input and one output, and uses function call pointers to pass parameters and only uses the pass-by-address method to read and write data through pointers and address offsets.

[0017] Preferably, the reused functional unit model reuses the names of the functional units and their inputs and outputs.

[0018] Preferably, the intermediate variables constructed in step 2 include the serial number of the communication pin connection start functional unit and the serial number of the communication pin connection end functional unit.

[0019] Preferably, the communication model constructed in step 3 includes intermediate variables, input functional units, and input or control communication pins of functional units that communicate with the input functional units through intermediate variables.

[0020] Preferably, in step 4, the protection logic calculation process is as follows:

[0021] The DC protection functional unit model and the multiplexing functional unit model read inputs from global variables and input intermediate variables, calculate and write output intermediate variables, and use the output intermediate variables as input intermediate variables for the next DC protection functional unit model and multiplexing functional unit model through the interconnection model. The calculation is carried out iteratively and finally output to the global variables.

[0022] Preferably, in step 4, the process of generating the execution order is described as follows:

[0023] (1) According to the functional unit type, the DC protection functional unit model and the multiplexing functional unit model are divided into constant functional unit, input functional unit, ordinary functional unit and output functional unit model, among which the ordinary functional unit is the functional unit other than the constant functional unit, input functional unit and output functional unit.

[0024] (2) Describe the execution order numbering for the constant functional unit model and the input functional unit model;

[0025] (3) Divide all functional unit models into two sets: numbered set A and unnumbered set B. The numbered set A contains constant functional unit models and input functional unit models, and the unnumbered set B contains ordinary functional units and output functional unit models.

[0026] (4) Divide all connection models into two sets: colored connection set C and uncolored connection set D, where the colored connection set C is an empty set and the uncolored connection set D contains all connection models;

[0027] (5) Determine whether the write communication foot of the communication model in the uncolored communication set D is in the model of the numbered set A. If so, color the write communication foot and transfer the corresponding communication model to the colored communication set C.

[0028] (6) For models in the unnumbered functional unit set B where all input communication pins are in the colored contact set C, assign an execution sequence number and transfer the model to the numbered set A;

[0029] (7) Repeat steps (5) and (6) until the unnumbered set B is empty. Adjust the execution order of the description according to the execution sequence number.

[0030] The beneficial effects of this invention are that, compared with the prior art,

[0031] This invention implements the functional principle logic block diagram of DC protection using a description language. Models based on this description language are designed for various functional units, interconnections, communication pins, inputs, and outputs. It also supports custom functional units, facilitating the reuse of protection function logic and significantly improving the simplicity of the DC protection functional principle representation. Before description execution, the execution order of each model is generated based on the functional unit type and communication pin connection relationship. By combining cyclic numbering and coloring steps, the correct interpretation and execution order of complex functional unit logic diagrams can be generated. Different execution orders generated according to this process can all be executed correctly, effectively preventing execution errors. This provides great convenience for the representation of protection principles and program parsing and calculation, facilitating the analysis of protection action behavior and improving the efficiency of protection action characteristic analysis. Attached Figure Description

[0032] Figure 1 This is a schematic diagram of the communication pin connection of one write communication pin and multiple read communication pins in this invention;

[0033] Figure 2 This is an example diagram of the definition of a custom functional unit in this invention;

[0034] Figure 3 This is an example diagram illustrating the use of custom functional units in this invention;

[0035] Figure 4 This is an example diagram of the functional unit definition in this invention;

[0036] Figure 5 This is an example diagram illustrating the connection definition in this invention;

[0037] Figure 6 This is a flowchart of the DC protection modeling and DC protection function implementation method based on description language of the present invention. Detailed Implementation

[0038] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of this invention. The embodiments described in this application are merely some embodiments of this invention, and not all embodiments. Based on the spirit of this invention, other embodiments obtained by those skilled in the art without creative effort are all within the protection scope of this invention.

[0039] This invention provides a method for DC protection modeling and DC protection function implementation based on a description language, such as... Figure 6 As shown, in a preferred but non-limiting embodiment of the present invention, the method includes the following steps:

[0040] Step 1: Classify the DC protection functional units according to their functions, and use a description language to construct models of various DC protection functional units and reuse functional units.

[0041] More preferably, the DC protection function unit is divided into the following categories according to its function: Boolean function unit, arithmetic function unit, comparison limiting function unit, timer, counter, trigger, analog quantity expansion function unit, input / output function unit, encoding / decoding function unit, and protection basic function unit.

[0042] For DC protection functional units such as Boolean functional units, arithmetic functional units, and comparison-limited functional units, the model constructed using the description language includes the functional unit number, functional unit type, and related operation communication pins.

[0043] For timers, counters, flip-flops, and analog extended function units, the model constructed using the description language includes the function unit number and function unit type, or includes the function unit number, function unit type, and related parameters.

[0044] For input / output functional units and encoding / decoding functional units, the model constructed using a description language includes the functional unit number, functional unit type-related variables or parameters;

[0045] For protecting basic functional units, the model constructed using a description language includes the functional unit number, functional unit type, and related parameters.

[0046] This embodiment defines the various logic gates, comparators, inputs, outputs, etc. on the protection schematic diagram as a Functional Unit Model (FUT) using a design description language. An example of a FUT definition is shown below. Figure 4 As shown;

[0047] Preferably, the functional unit can be represented by the description language FUT(ID, TYPE, P1, ..., Pn), where ID represents the functional unit number, TYPE represents the functional unit type, P1, ..., Pn represent the related operation communication pins, and ! Px represents the negation of the x communication pin value before the operation.

[0048] The various DC protection functional units are described in detail and modeled as follows:

[0049] (1) Boolean functional units, including but not limited to logical AND, logical OR, logical XOR, and logical NOT, as shown in Table 1.

[0050] Table 1

[0051]

[0052]

[0053] Among them: expandable means that the number of communication pins can be changed; Boolean function unit inputs and outputs can be inverted.

[0054] (2) Arithmetic function units, including but not limited to addition, subtraction, multiplication, division, remainder, absolute value, data type conversion, and square root, as shown in Table 2.

[0055] Table 2

[0056]

[0057] Among them, the addition and multiplication function units are expandable, that is, the number of communication pins is variable.

[0058] (3) Comparison and limitation function units, including but not limited to greater than or equal to, greater than, less than or equal to, less than, equal to, limit, maximum value, minimum value, selection, hysteresis comparator, minimum channel selection, maximum channel selection, as shown in Table 3.

[0059] Table 3

[0060]

[0061]

[0062] Timers, counters, flip-flops, and analog quantity broadening, including but not limited to pulse, delay-on, delay-off, reset-priority RS flip-flops, sampling delay, maximum value broadening, minimum value broadening, up counters, and down counters, are shown in Table 4.

[0063] Table 4

[0064]

[0065]

[0066] (5) Inputs and outputs, including but not limited to waveform data, custom data, custom functional unit parameters, global environment parameters, global variables, and constants, as shown in Table 5.

[0067] Table 5

[0068]

[0069] (6) Encoding and decoding functional units, including but not limited to encoding and decoding, as shown in Table 6.

[0070] Table 6

[0071]

[0072] (7) Protect basic functional units, including but not limited to difference, differentiation, effective value, Fourier transform, dot product, complex number to amplitude and phase angle, amplitude and phase angle to real and imaginary parts, as shown in Table 7.

[0073] Table 7

[0074]

[0075] More preferably, step 1 further constructs a multiplexing functional unit model based on the multiplexing logic. The multiplexing functional unit model has at least one input and one output, and uses function call pointers to pass parameters and only uses the pass-by-address method to read and write data through pointers and address offsets.

[0076] For reuse, a portion of the logic can be defined as an independent functional unit and placed in a separate file; this is called a custom functional unit (reusable functional unit model). It is also required that the reusable functional unit model has at least one input and one output to facilitate determining the execution order. An example of defining a custom functional unit (reusable functional unit model) is shown below. Figure 2 As shown, the multiplexing functional unit model constructed based on the multiplexing logic can be represented as FUT_LIB(DEF,P1:X1,……,Pm:Xm,Q1:Y1), where DEF is the name of the multiplexing functional unit, Pm is the m-th input, Xm is the name of input m, Q1 is the first output, and Y1 is the name of the first output.

[0077] In this invention, a group of functional units coordinate to complete a task, and these functions are often reused, similar to functions and procedures in high-level languages. A custom functional unit is a combination of functional units used to complete a specific function, and is equivalent to a basic component in use.

[0078] To use a custom functional unit, simply include the definition file; the usage is the same as a regular functional unit. For example... Figure 3 As shown.

[0079] Custom functional units are equivalent to functions, and the parameter passing mechanism is the same as function calls in high-level languages ​​(SP stack pointer, FP frame pointer).

[0080] The following is a C++ example code.

[0081]

[0082] The addresses of intermediate variables and parameters are based on a fixed offset of FP.

[0083] Custom functional units only use the pass-by-address method, which reads and writes data through the "parent" FP pointer and address offset.

[0084] Step 2: Use a description language to construct intermediate variables representing the communication lines between functional units;

[0085] More preferably, the functional unit has several input, output, and control communication pins, which are connected by a tie line. The tie line is designed and described by a language, and is defined as an intermediate variable m_n, where m represents the starting functional unit number of the tie line and n represents the ending functional unit number of the tie line.

[0086] Step 3: Based on the DC protection functional unit model, the reuse functional unit model, and intermediate variables, a connection model is constructed using a description language to represent a connection line between the communication pins of functional units and the connection relationship between the communication pins of connected functional units.

[0087] A connection model (CTC) is defined using a design description language to describe the connection between communication pins of functional units and the connection relationships between communication pins of connected functional units. An example of a connection definition is shown below. Figure 5 As shown; that is, the constructed communication model is CTC(m_n, FUTm, FUTn.Px), where FUTm represents the input functional unit m, and FUTn.Px represents the input or control communication pin x of functional unit n;

[0088] The custom functional unit connection definition is the same as the basic functional unit, except that FUT is changed to FUT_LIB.

[0089] Preferably, the communication model CTC is not directly connected to the functional unit, but only to the communication pin, i.e., communication pin to communication pin. That is, the output communication pin of the FUTm functional unit is connected to the Px input or control communication pin of the FUTn functional unit.

[0090] Preferably, the contactless communication model (CTC) has only one write communication pin and is connected to one or more read communication pins, such as... Figure 1 As shown, Figure 1 The left and right images in the middle represent incorrect and correct communication steps, respectively.

[0091] Step 4: Generate the description execution order of each model according to the functional unit type and communication pin connection relationship. Based on the execution order, the DC protection functional unit model, reused functional unit model, intermediate variable and connection model perform protection logic calculations for each communication pin and each functional unit to realize the DC protection model description.

[0092] The process of generating the execution order includes:

[0093] (1) According to the functional unit type, the DC protection functional unit model and the multiplexing functional unit model are divided into constant functional unit, input functional unit, ordinary functional unit and output functional unit model, among which the ordinary functional unit is the functional unit other than the constant functional unit, input functional unit and output functional unit.

[0094] (2) Describe the execution order number for the constant functional unit model and the input functional unit model; here, the constant and the input functional units are both inputs and have no input-output relationship with each other. The execution order number is arbitrary, that is, the order of execution does not affect the result.

[0095] (3) Divide all functional unit models into two sets: numbered set A (constants, inputs) and unnumbered set B (ordinary functional units, outputs). The numbered set A contains constant functional unit models and input functional unit models, and the unnumbered set B contains ordinary functional units and output functional unit models.

[0096] (4) Divide all connection models into two sets: colored connection set C (empty set) and uncolored connection set D (all connection models), where colored connection set C is empty set and uncolored connection set D contains all connection models;

[0097] (5) Determine whether the write communication foot of the communication model in the uncolored communication set D is in the model of the numbered set A. If so, color the write communication foot and transfer the corresponding communication model to the colored communication set C.

[0098] (6) For models in the unnumbered functional unit set B where all input communication pins are in the colored contact set C, assign an execution sequence number and transfer the model to the numbered set A; as in (2), since there is no input-output relationship between them, the order can be arbitrary.

[0099] (7) Repeat steps (5) and (6) until the unnumbered set B is empty. Adjust the execution order of the description according to the execution sequence number.

[0100] The protection logic calculation process is as follows:

[0101] Functional units read input from intermediate variables, then calculate and write the data to the intermediate variables; input functional units read data from the global area and write it to intermediate variables; output functional units read data from the intermediate variable area and write it to the global area, where the global area contains global inputs, external variables, or parameter information. Inputs can be divided into global input variables and intermediate variables.

[0102] That is, the DC protection functional unit model and the multiplexing functional unit model read input from global variables and input intermediate variables, calculate and write the output intermediate variables, and use the output intermediate variables as input intermediate variables for the next DC protection functional unit model and multiplexing functional unit model through the interconnection model. The calculation is iterated in this way, and finally output to the global variables.

[0103] More preferably, the description language of the present invention is a generic description language.

[0104] Generics mean that the input of a functional unit is not type-sensitive; integers and floating-point numbers are both acceptable, such as:

[0105] FUT(1,INPUT,UDL)

[0106] FUT(2,CONST,FLOAT,0)

[0107] FUT(3,LE,P1,P2)

[0108] FUT(4,OUTPUT,TRIPVAR,D)

[0109] CTC(1_3,FUT1,FUT3.P1)

[0110] CTC(2_3,FUT2,FUT3.P2)

[0111] CTC(3_4,FUT3,FUT4.P1)

[0112] Whether UDL is a floating-point number or an integer does not affect the calculation.

[0113] Embodiment 2 of the present invention provides a DC protection modeling and DC protection function implementation system based on a description language, comprising:

[0114] The functional unit model building module is used to classify DC protection functional units according to their functions, and to build various DC protection functional unit models and reused functional unit models using a description language.

[0115] The intermediate variable construction module is used to construct intermediate variables that represent the communication lines between functional unit feet using a description language.

[0116] The communication model module is used to construct a communication model based on the DC protection functional unit model, the reuse functional unit model, and intermediate variables, using a description language to represent a communication line between communication pins of functional units and the communication relationship between communication pins of connected functional units.

[0117] The DC protection module is used to generate the description execution order of each model according to the functional unit type and communication pin connection relationship. Based on the execution order, the DC protection functional unit model, reused functional unit model, intermediate variables and connection model perform protection logic calculations for each communication pin and each functional unit to realize the DC protection function.

[0118] Embodiment 3 of the present invention provides a terminal, including a processor and a storage medium; characterized in that:

[0119] The storage medium is used to store instructions;

[0120] The processor is configured to operate according to the instructions to perform the steps of the method according to Embodiment 1.

[0121] Embodiment 4 of the present invention provides a computer-readable storage medium having a computer program stored thereon, characterized in that the program, when executed by a processor, implements the steps of the method described in Embodiment 1.

[0122] The beneficial effects of this invention are that, compared with the prior art,

[0123] This invention implements the functional principle logic block diagram of DC protection using a description language. Models based on this description language are designed for various functional units, interconnections, communication pins, inputs, and outputs. It also supports custom functional units, facilitating the reuse of protection function logic and significantly improving the simplicity of the DC protection functional principle representation. Before description execution, the execution order of each model is generated based on the functional unit type and communication pin connection relationship. By combining cyclic numbering and coloring steps, the correct interpretation and execution order of complex functional unit logic diagrams can be generated. Different execution orders generated according to this process can all be executed correctly, effectively preventing execution errors. This provides great convenience for the representation of protection principles and program parsing and calculation, facilitating the analysis of protection action behavior and improving the efficiency of protection action characteristic analysis.

[0124] This disclosure can be a system, method, and / or computer program product. A computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for causing a processor to implement various aspects of this disclosure.

[0125] Computer-readable storage media can be tangible devices capable of holding and storing instructions for use by an instruction execution device. Computer-readable storage media can be, for example—but not limited to—electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination of the foregoing. The computer-readable storage media used herein are not to be construed as transient signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.

[0126] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.

[0127] Computer program instructions used to perform the operations of this disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Smalltalk, C++, etc., and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing status information from the computer-readable program instructions. This electronic circuitry can execute the computer-readable program instructions to implement various aspects of this disclosure.

[0128] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the protection scope of the claims of the present invention.

Claims

1. A method for DC protection modeling and DC protection function implementation based on a description language, characterized in that: The method includes the following steps: Step 1: Classify the DC protection functional units and construct various DC protection functional unit models and reuse functional unit models using a description language; Step 2: Use a description language to construct intermediate variables representing the communication lines between functional units; Step 3: Based on the DC protection functional unit model, the reuse functional unit model, and intermediate variables, a connection model is constructed using a description language to represent a connection line between the communication pins of functional units and the connection relationship between the communication pins of connected functional units. Step 4: Based on the functional unit type and communication pin relationships, the description execution order of each model is generated through cyclic numbering and coloring. Based on the execution order, the DC protection functional unit model, reused functional unit model, intermediate variable, and connection model undergo pin-by-pin and functional unit-by-functional unit protection logic calculations to realize the DC protection function. The description execution order generation process is as follows: (1) According to the type of functional unit, the DC protection functional unit model and the multiplexing functional unit model are divided into constant functional unit, input functional unit, ordinary functional unit and output functional unit model, among which the ordinary functional unit is the functional unit other than the constant functional unit, input functional unit and output functional unit; (2) Describe the execution order numbering for the constant functional unit model and the input functional unit model; (3) Divide all functional unit models into two sets: numbered set A and unnumbered set B. The numbered set A contains constant functional unit models and input functional unit models, and the unnumbered set B contains ordinary functional units and output functional unit models. (4) Divide all connection models into two sets: colored connection set C and uncolored connection set D, where colored connection set C is an empty set and uncolored connection set D contains all connection models; (5) Determine whether the write communication foot of the communication model in the uncolored communication set D is in the model of the numbered set A. If so, color the write communication foot and transfer the corresponding communication model to the colored communication set C. (6) For models in the unnumbered functional unit set B where all input communication pins are in the colored contact set C, assign an execution sequence number and transfer the model to the numbered set A; (7) Repeat steps (5) and (6) until the unnumbered set B is empty. Adjust the execution order of the description according to the execution sequence number.

2. The method for DC protection modeling and DC protection function implementation based on a description language according to claim 1, characterized in that: In step 1, the DC protection function units are divided into the following categories according to their functions: Boolean function unit, arithmetic function unit, comparison element limiter, timer, counter, trigger, analog quantity extension function unit, input / output function unit, encoding / decoding function unit, and basic protection function unit.

3. The method for DC protection modeling and DC protection function implementation based on a description language according to claim 2, characterized in that: In step 1, for Boolean functional units, arithmetic functional units, and comparison-limited functional units, the DC protection functional unit model constructed using the description language includes the functional unit number, functional unit type, and related operation communication pins.

4. The method for DC protection modeling and DC protection function implementation based on a description language according to claim 2, characterized in that: In step 1, for timer, counter, trigger, and analog quantity expansion functional units, the model constructed using the description language includes the functional unit number, functional unit type, and related parameters. For input / output functional units and encoding / decoding functional units, the model constructed using a description language includes the functional unit number, functional unit type, and related variables or parameters; For protecting basic functional units, the model constructed using a description language includes the functional unit number, functional unit type, and related variables or parameters, or includes the functional unit number and functional unit type.

5. The method for DC protection modeling and DC protection function implementation based on a description language according to claim 1, characterized in that: In step 1, a reused functional unit model is constructed based on the reuse logic. The reused functional unit model has at least one input and one output, and uses function call pointers to pass parameters and only uses the pass-by-address method. Data is read and written through pointers and address offsets.

6. The method for DC protection modeling and DC protection function implementation based on a description language according to claim 1, characterized in that: The reused functional unit model reuses the names of the functional units and their inputs and outputs.

7. The method for DC protection modeling and DC protection function implementation based on a description language according to claim 1, characterized in that: The intermediate variables constructed in step 2 include the serial number of the starting functional unit of the communication pin and the serial number of the ending functional unit of the communication pin.

8. The method for DC protection modeling and DC protection function implementation based on a description language according to claim 1, characterized in that: The communication model constructed in step 3 includes intermediate variables, input functional units, and input or control communication pins of functional units that communicate with input functional units through intermediate variables.

9. The method for DC protection modeling and DC protection function implementation based on a description language according to claim 1, characterized in that: In step 4, the protection logic calculation process is as follows: The DC protection functional unit model and the multiplexing functional unit model read inputs from global variables and input intermediate variables, calculate and write output intermediate variables, and use the output intermediate variables as input intermediate variables for the next DC protection functional unit model and multiplexing functional unit model through the interconnection model. The calculation is carried out iteratively and finally output to the global variables.

Citation Information

Patent Citations

  • Visual modeling method for capability description file of direct-current protection control device

    CN102646112A

  • Modeling method of DC control protecting model based on RTDS and equipment thereof

    CN108964107A