Method for realizing GOOSE function of energy storage converter based on hard coding and decoding

By using hard-coded and decoding technology in energy storage converters, using text file modeling and independently developing GOOSE functions, the problems of high development costs, low efficiency and insufficient network storm suppression in the existing technology are solved, and efficient and stable GOOSE functions and network environment security are achieved.

CN120075330AActive Publication Date: 2025-05-30FOSHAN HECHU ENERGY TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510226296.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-27
Publication Date
2025-05-30
Estimated Expiration
2045-02-27

AI Technical Summary

Technical Problem

When existing energy storage converters implement GOOSE function, there is a problem that GOOSE and MMS are not completely decoupled, resulting in high development costs, low execution efficiency, poor performance indicators, and lack of network storm suppression functions, which are prone to crash in abnormal network environments.

Method used

Using a hard-coded method, GOOSE and MMS are completely decoupled, GOOSE modeling is used using simple text files, ASN.1 hard-coded GOOSE packets are realized, GOOSE functions are independently developed, and network storm suppression and message filtering are implemented on the hardware platform.

Benefits of technology

It reduces development costs, improves operating efficiency, improves performance indicators, realizes effective suppression of network storms and filters GOOSE packets, and avoids the crash of energy storage power stations in abnormal network environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120075330A_ABST
    Figure CN120075330A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of energy storage control systems, and discloses an energy storage converter GOOSE function implementation method based on hard coding and decoding, and the method comprises the steps: carrying out GOOSE publishing and GOOSE subscription modeling based on a text file; the model file is analyzed, relevant configuration parameters of GOOSE release and GOOSE subscription are obtained respectively, and GOOSE release and GOOSE subscription functions are achieved; the upper-layer application is independent of the GOOSE publishing function and the GOOSE subscribing function respectively; the upper layer application is carried on a hardware platform formed by the ARM and the FPGA. According to the method, GOOSE and MMS are thoroughly decoupled, GOOSE modeling is achieved through a simple text file, GOOSE functions and specific application are independent, software maintenance is extremely convenient, control network storm suppression and GOOSE message effective filtering can be achieved, and the method has the advantages of being low in cost, high in operation efficiency, capable of achieving software modular design, good in performance, stable and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of energy storage control systems, and particularly to a method for implementing the GOOSE function of an energy storage converter based on hard encoding and decoding. Background Art

[0002] The energy storage converter (Power Conversion System, PCS), also known as the power conversion system, is matched with the energy storage battery stack and connected between the battery stack and the power grid. It mainly consists of a converter and its control system. The Energy Management System (EMS), as the brain of the energy storage system operation, is responsible for coordinating and managing the BMS, PCS, and fire control and environmental control systems of the energy storage system to achieve system monitoring, power control, and energy management, ensuring the efficient and stable operation of the energy storage system. The PCS controller receives the control instructions of the EMS through communication and controls the converter to charge or discharge the energy storage battery according to the power instructions. It can either invert the direct current of the energy storage battery into alternating current and transmit it to the power grid or supply it to AC loads, or rectify the alternating current of the power grid into direct current to charge the energy storage battery, realizing the regulation of active power and reactive power of the power grid.

[0003] As a key component of the electrochemical energy storage system, the performance and stability of the PCS have a crucial impact on the operation of the energy storage power station. The national standard GB / T34120-2023 "Technical Requirements for Energy Storage Converters of Electrochemical Energy Storage Systems" has comprehensive and detailed requirements for it. Currently, on the grid side, the power source side, and new energy independent shared energy storage power stations, it is required that the PCS must support DL / T860 (DL / T860 is a power communication protocol formulated by the State Grid Corporation of China and is a subset based on the IEC61850 protocol), that is, it needs to fully support the GOOSE protocol to receive the fast control instructions issued by the EMS coordination controller, and most of the relevant performance indicators are higher than the national standard requirements, which poses high requirements for PCS manufacturers. Currently, PCS manufacturers, especially newly emerging PCS manufacturers, have the following problems when developing the GOOSE function:

[0004] First, there is generally a problem that GOOSE and MMS are not fully decoupled. The two use a commercial software package and the same ASN.1 encoding and decoding library, resulting in high PCS development costs. It is difficult to guarantee the execution efficiency of GOOSE publishing and subscribing, and the performance indicators are only mediocre.

[0005] Second, the GOOSE and MMS models are built in the same CID file, which makes the file parsing complex. After parsing, the GOOSE-related information needs to be extracted before it can be used. If either GOOSE or MMS modifies the model file, it is necessary to inform the software developers of the other party for synchronization, which is inconvenient to operate and prone to errors.

[0006] Thirdly, regarding where the data published by the GOOSE publishing function is retrieved from and how the data after subscription by the GOOSE subscription function is stored, complex associations are generally carried out in the CID file, or the method of manually modifying the code is adopted. Different projects use different codes, making software maintenance extremely inconvenient;

[0007] Finally, the PCS does not add a network storm suppression function. When a multicast message network storm such as GOOSE occurs in the control layer network, it often cannot effectively resist the intrusion of a large number of messages and effectively filter messages, usually resulting in abnormal crashes, seriously affecting the operation safety of the energy storage power station and even the power grid. Summary of the Invention

[0008] The purpose of the present invention is to provide a method for implementing the GOOSE function of an energy storage converter based on hard encoding and decoding, which completely decouples GOOSE and MMS, uses a simple text file to implement GOOSE modeling, makes the GOOSE function independent of specific applications, is extremely convenient for software maintenance, can achieve control network storm suppression and effective filtering of GOOSE messages, and has the advantages of low cost, high operating efficiency, software modular design, good performance and stability.

[0009] To achieve the above object, the present invention provides the following solutions:

[0010] A method for implementing the GOOSE function of an energy storage converter based on hard encoding and decoding includes the following steps:

[0011] Perform GOOSE publishing and GOOSE subscription modeling based on a text file to obtain a GOOSE publishing model file and a GOOSE subscription model file;

[0012] Parse the GOOSE publishing model file and the GOOSE subscription model file to respectively obtain the relevant configuration parameters for GOOSE publishing and GOOSE subscription;

[0013] Based on the relevant configuration parameters for GOOSE publishing and GOOSE subscription, implement the GOOSE publishing and GOOSE subscription functions; among them, implementing the GOOSE publishing function includes:

[0014] Based on the relevant configuration parameters for GOOSE publishing, perform hard encoding of GOOSE messages using the ASN.1 encoding rule;

[0015] Start the GOOSE publishing task. If the GOOSE published data is modified by the upper-layer application, update the GOOSE message and start sending the changed message. If the GOOSE published data remains unchanged, resend the message according to the resending mechanism. Among them, the upper-layer application modifies the GOOSE published data in real time and updates it to the published data cache array. The GOOSE publishing function monitors in real time whether the GOOSE published data has changed, and the two are independent of each other.

[0016] Implement the GOOSE subscription function, including:

[0017] Based on the relevant configuration parameters of GOOSE subscription, perform hard decoding of the GOOSE message based on the ASN.1 decoding rule, and initialize the GOOSE subscription parameters.

[0018] Start the GOOSE subscription task. The GOOSE subscription function stores the GOOSE subscription data in the subscription data cache array. The upper-layer application obtains the latest GOOSE subscription data in the subscription data cache array in real time, and the two are independent of each other.

[0019] The upper-layer application is carried on a hardware platform composed of ARM and FPGA. The hardware platform has a dual-message filtering mechanism based on the network storm suppression function of FPGA and the MAC Hash filtering algorithm of the network driver layer based on ARM.

[0020] Furthermore, parsing the GOOSE publishing model file to obtain the relevant configuration parameters of GOOSE publishing specifically includes:

[0021] Construct the mapping relationship between the GOOSE publishing model file and the published data. Among them, the GOOSE publishing model file includes the destination MAC, source MAC, VLAN identifier, APPID, gocbRef, datSet, goID, confRev, MaxTime, MinTime, numDatSetEntries, and the sending data entry dataEntryMap involved in the GOOSE message. Here, numDatSetEntries represents the number of data entries published by this GOOSE. dataEntryMap defines the data type and data source of each sent data in the order of sending data, and configures the data type and data source of the published data through the GOOSE publishing model file.

[0022] Furthermore, parsing the GOOSE subscription model file to obtain the relevant configuration parameters of GOOSE subscription specifically includes:

[0023] Build the mapping relationship between the GOOSE subscription model file and the subscription data. The GOOSE subscription model file includes the destination MAC, VLAN identifier, APPID, gocbRef, datSet, goID, confRev, twnWire, numDatSetEntries, and subscription data entry dataEntryMap involved in the GOOSE message. Among them, twnWire contains information about whether it is a dual-network subscription, numDatSetEntries represents the number of data entries in this GOOSE subscription, and dataEntryMap defines the data type and data source of each subscription data in the order of the subscription data. The data type of the subscription data is the same as the data type of the sent data. Configure the data type and data source of the subscription through the GOOSE subscription model file.

[0024] Furthermore, for the relevant configuration parameters based on GOOSE publication, perform hard coding of the GOOSE message using the ASN.1 encoding rule, specifically including:

[0025] (1.1) Parse the GOOSE publication model file, obtain the relevant configuration parameters, and define structure variables for storing the encoding values in the subsequent steps;

[0026] (1.2) Calculate the length of the APDU data entry part of the GOOSE message based on the number and type of data entries, complete the TLV encoding of the data entry header allData, and store the encoding value in the structure variable;

[0027] (1.3) Complete the TLV hard coding of the GOOSE control block part of the GOOSE message, including numDatSetEntries, ndsCom, confRev, test, sqNum, StNum, t, goID, datSet, timeAllowedtoLive, gocbRef, and goosePDU, and store the encoding value in the structure variable;

[0028] (1.4) Initialize the structure variables of the fields such as MAC, ethType, APPID, and length in the GOOSE message header;

[0029] (1.5) Based on the latest published data (GooseOutValBool, GooseOutValInt32, GooseOutValFloat, and GooseOutValInt16), complete the TLV encoding of each data in the APDU data entry part of the GOOSE message, store the encoding value in the structure variable, open a buffer area based on the structure variable, and fill each field of the message through the memcpy basic function to finally generate a complete GOOSE message;

[0030] The steps (1.1)-(1.5) are the part called during device startup and only need to be called once when the device starts up.

[0031] Furthermore, for the started GOOSE publishing task, if the GOOSE published data is modified by the upper-layer application, update the GOOSE message and start sending the changed message. If the GOOSE published data remains unchanged, resend the message according to the retransmission mechanism, which specifically includes:

[0032] (1.6) Determine whether the values of the published data (GooseOutValBool, GooseOutValInt32, GooseOutValFloat, and GooseOutValInt16) of the upper-layer application have changed. If changed, update the timeAllowedtoLive, t, stNum, sqNum, and data values of the GOOSE message and immediately send the changed message;

[0033] (1.7) If the values of the published data have not changed, determine whether the GOOSE retransmission time has arrived. When the retransmission time arrives, update the timeAllowedtoLive and sqNum of the message and send the message;

[0034] (1.8) If the retransmission time has not arrived, determine whether the system maintenance status has changed. If the maintenance status has changed, update the test of the message, otherwise continue to execute step (1.6).

[0035] Furthermore, for the relevant configuration parameters based on GOOSE subscription, perform hard decoding of the GOOSE message based on the ASN.1 decoding rule and initialize the GOOSE subscription parameters, which specifically includes:

[0036] (2.1) Parse the GOOSE subscription model file, obtain the relevant configuration parameters, and define structure variables for storing the decoded values of the subsequent steps;

[0037] (2.2) Initialize the message header (dstMac, ethType, APPID, etc.), the GOOSE message APDU GOOSE control block part (including goosePDU, gocbRef, timeAllowedtoLive, datSet, goID, t, StNum, sqNum, test, confRev, ndsCom, and numDatSetEntries, etc.), and the GOOSE message APDU data entry part (including the data and the entry header allData and various data entry types) of the structure variables based on the subscription configuration parameters, and obtain the TLV decoding value;

[0038] (2.3) Send dstMac, ethType, and APPID to the FPGA for GOOSE subscription message filtering and network storm suppression, configure dstMac to the ARM Hash filtering register for MAC filtering of GOOSE subscription messages, and start the dual-message filtering mechanism built by the ARM and FPGA;

[0039] The steps (2.1)-(2.3) are the part called during device startup and only need to be called once when the device starts up.

[0040] Furthermore, for the started GOOSE subscription task, the GOOSE subscription function stores the GOOSE subscription data in the subscription data cache array, and the upper-layer application can obtain the latest GOOSE subscription data in the subscription data cache array in real time, specifically including:

[0041] (2.4) The FPGA implements GOOSE message filtering and network storm suppression based on dstMAc, ethType, and APPID;

[0042] (2.5) The ARM performs Hash filtering at the network driver layer on the GOOSE messages sent from the FPGA based on dstMac to achieve secondary filtering, and the messages passing through the filtering are sent to the ARM upper-layer application;

[0043] (2.6) The ARM upper-layer application verifies the APDU GOOSE control block of the GOOSE subscription message based on the structure variable (including goosePDU, gocbRef, timeAllowedtoLive, datSet, goID, t, StNum, sqNum, test, confRev, ndsCom, and numDatSetEntries, etc.);

[0044] (2.7) The messages passed by the APDU GOOSE control block verification of the ARM upper-layer application continue to be verified for APDU data entries (including allData and various data entry types);

[0045] (2.8) The ARM updates the subscription data passed by the data entry verification to the subscription data cache array for use by the upper-layer application, and all messages that do not pass the verification will be discarded.

[0046] Furthermore, the steps (2.4)-(2.5) specifically include:

[0047] Verify the dstMac, ethType, and APPID of the message. Only messages that are exactly the same are considered subscription messages, otherwise they are directly discarded;

[0048] When it is determined that the message is a subscription message and the previously occurred network storm has not recovered, it is then determined whether there are consecutive M GOOSE messages with the same dstMac, ethType, and APPID parameters and the receiving time interval > T2. If so, the network storm has recovered, and this message is received; otherwise, the message is discarded.

[0049] If the message is a subscription message and there are consecutive N GOOSE messages with the same dstMac, ethType, and APPID parameters and the receiving time interval ≤ T1, it is considered that a network storm has occurred, and the message is directly discarded; where T2 > T1.

[0050] When the FPGA determines that no network storm has occurred and the message is a subscription message, the message will be sent to the ARM network driver layer. The ARM driver layer will perform MAC Hash algorithm filtering for the second - stage filtering. The messages that pass the filtering will be sent to the upper - layer application of the ARM, and the messages that do not pass will be directly discarded.

[0051] Furthermore, the hardware platform composed of the ARM and FPGA includes a multi - core processor, and the multi - core processor includes at least ARM core one, ARM core two, and an FPGA core.

[0052] ARM core one runs in bare - metal mode. The GOOSE publishing function and GOOSE subscription function of the energy storage converter are deployed on ARM core one. ARM core two runs on top of the Linux operating system to complete the external communication, logical processing, and data storage of the energy storage converter.

[0053] The FPGA core undertakes the tasks of GOOSE message filtering and network storm suppression, and is also used for the control and protection functions of the energy storage converter.

[0054] According to the specific embodiments provided by the present invention, the method for implementing the GOOSE function of the energy storage converter based on hard encoding and decoding provided by the present invention discloses the following technical effects:

[0055] First, model GOOSE publishing and GOOSE subscribing based on text files. This process can be manually edited based on CID files or automatically generated by software tools. Compared with complex MMS CID files, the parsing of this model file is simple and direct, convenient to operate and easy to maintain. Secondly, parse the GOOSE model file to implement ASN.1 hard encoding and decoding of GOOSE messages. The present invention completely decouples GOOSE and MMS, and uses the hard encoding and decoding method to implement the ASN.1 encoding and decoding function of GOOSE messages, with lower commercial software development costs, higher software execution efficiency, excellent and stable performance indicators. Thirdly, the GOOSE function is completely independent of the upper-layer application. The upper-layer application will update the data to be sent to the publishing data cache in real time and read the subscribed data cache data in real time. The GOOSE function will send the published data in real time and update the subscribed data to the subscribed data cache in real time. Finally, the present invention uses a high-performance ARM and a large-capacity FPGA hardware platform, with an FPGA-based network storm suppression function and a MAC Hash filtering algorithm based on the ARM network driver layer, to implement a double-insurance measure for abnormal control networks, fundamentally avoiding abnormal crashes of PCS in abnormal network environments and effectively guaranteeing the operation safety of energy storage power stations.

[0056] In summary, the present invention provides a simple method for implementing the GOOSE function, which is completely decoupled from the complex MMS protocol, uses an independent and simple text file for modeling, and implements the encoding and decoding of GOOSE messages through simple C language. The GOOSE function is independent of specific applications, and can implement control network storm suppression and effective filtering of GOOSE messages. For PCS manufacturers, especially newly established manufacturers, it has the advantages of low cost, high operating efficiency, software modular design, good performance and stability. Brief Description of the Drawings

[0057] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the embodiments. Obviously, the following described drawings are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0058] Figure 1 It is a schematic flowchart of the method for implementing the GOOSE function of the energy storage converter based on hard encoding and decoding according to the embodiment of the present invention;

[0059] Figure 2 It is a diagram of the GOOSE publishing modeling and publishing data mapping relationship according to the embodiment of the present invention;

[0060] Figure 3 It is a diagram of the GOOSE subscribing modeling and subscribing data mapping relationship according to the embodiment of the present invention;

[0061] Figure 4 This is the TAG encoding specification for the GOOSE message PDU data item identifier in the embodiments of the present invention;

[0062] Figure 5 This is the definition diagram of the GOOSE message APDU encoding and decoding data structure type in the embodiments of the present invention;

[0063] Figure 6 This is the hard-coded flowchart for GOOSE publication in the embodiments of the present invention;

[0064] Figure 7 This is the decoding flowchart for GOOSE subscription in the embodiments of the present invention;

[0065] Figure 8 This is the structural schematic diagram of the hardware platform in the embodiments of the present invention;

[0066] Figure 9 This is the hardware filtering flowchart for GOOSE subscription messages in the embodiments of the present invention. Detailed implementation manners

[0067] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0068] The object of the present invention is to provide a method for implementing the GOOSE function of an energy storage converter based on hard encoding and decoding. First, GOOSE and MMS are completely decoupled, and the ASN.1 encoding and decoding function of GOOSE messages is implemented by means of hard encoding and decoding, which has lower commercial software development costs, higher software execution efficiency, excellent and stable performance indicators. Second, the present invention uses a simple text file to implement GOOSE modeling. Compared with complex MMS CID files, this model file is simple and direct to parse, convenient to operate and easy to maintain. Third, the present invention completely separates the GOOSE function from specific application services. Through the GOOSE model file, flexible association of GOOSE published data entries, GOOSE subscribed data entries and business applications can be realized, that is, both PCS receiving data (instructions from EMS) and PCS sending data (uploading the operating status of EMS) can be configured arbitrarily. In different engineering applications, the GOOSE function can be realized without modifying the software but only modifying the model file. The entire mapping process is simple and efficient, and software maintenance is extremely convenient. Finally, the present invention adopts a high-performance ARM and a large-capacity FPGA hardware platform, which has an FPGA-based network storm suppression function and a MAC Hash filtering algorithm based on the ARM network driver layer, realizing a double insurance measure for abnormal control networks, fundamentally avoiding abnormal crashes of PCS in abnormal network environments, and effectively ensuring the operation safety of energy storage power stations.

[0069] In order to make the above objects, features and advantages of the present invention more obvious and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0070] As Figure 1 shown, the method for implementing the GOOSE function of an energy storage converter based on hard encoding and decoding provided by the present invention includes the following steps:

[0071] (1) Perform GOOSE publication and GOOSE subscription modeling based on a text file to obtain a GOOSE publication model file and a GOOSE subscription model file; this process can be manually edited based on the CID file or automatically generated through software tools;

[0072] (2) Parse the GOOSE publication model file and the GOOSE subscription model file to obtain the relevant configuration parameters of GOOSE publication and GOOSE subscription respectively;

[0073] (3) Based on the relevant configuration parameters of GOOSE publication and GOOSE subscription, implement GOOSE publication and GOOSE subscription functions:

[0074] (3.1) Implement the GOOSE publication function, including:

[0075] Based on the relevant configuration parameters of GOOSE publication, perform hard encoding of GOOSE messages using the ASN.1 encoding rule;

[0076] Start the GOOSE publication task. If the GOOSE publication data is modified by the upper-layer application, update the GOOSE message and start sending the changed message. If the GOOSE publication data has not changed, resend the message according to the retransmission mechanism. Among them, the upper-layer application modifies the GOOSE publication data in real time and updates it to the publication data cache array. The GOOSE publication function monitors in real time whether the GOOSE publication data has changed, and the two are independent of each other;

[0077] (3.2) Implement the GOOSE subscription function, including:

[0078] Based on the relevant configuration parameters of GOOSE subscription, perform hard decoding of GOOSE messages based on the ASN.1 decoding rule and initialize the GOOSE subscription parameters;

[0079] Start the GOOSE subscription task. The GOOSE subscription function stores the GOOSE subscription data in the subscription data cache array. The upper-layer application obtains the latest GOOSE subscription data in the subscription data cache array in real time, and the two are independent of each other;

[0080] The upper-layer application is carried on the hardware platform composed of ARM and FPGA. The hardware platform has a dual-message filtering mechanism of network storm suppression function based on FPGA and MAC Hash filtering algorithm of network driver layer based on ARM.

[0081] First, the GOOSE publication and GOOSE subscription of the present invention adopt simple text file modeling, completely decouple from the CID model of the MMS service, and the GOOSE function is associated with specific applications using simple data. The model configuration operation is simple, the model parsing is simple, the software is designed based on modularization, the GOOSE function is independent of the MMS service and the upper-layer application, and the system has high maintainability.

[0082] Specifically, in step (2), the parsing of the GOOSE publication model file to obtain the relevant configuration parameters of GOOSE publication specifically includes:

[0083] Such as Figure 2As shown, the mapping relationship between the GOOSE publishing model file and the published data is constructed. The GOOSE publishing model file includes the destination MAC, source MAC, VLAN identifier, APPID, gocbRef, datSet, goID, confRev, MaxTime, MinTime, numDatSetEntries, and the data entry map of the sent data entries involved in the GOOSE publishing message. Among them, numDatSetEntries represents the number of data entries published by this GOOSE. The dataEntryMap defines the type of each sent data and where the data is obtained in the order of sending the data. The present invention defines common data types such as single-point status, double-point status, quality, time, signed integer (16-bit and 32-bit), unsigned integer (16-bit and 32-bit), and floating-point type (other types can be extended if needed), and defines the data arrays corresponding to each data type. Through the GOOSE publishing model file, the published data types and data sources can be flexibly configured. The upper-layer application can update the data in these array buffers such as GooseOutValBool, GooseOutValInt32, GooseOutValFloat, and GooseOutValInt16 at any time according to the actual situation. The GOOSE publishing task constantly judges whether these data have changed. When the change occurs, it is immediately sent out. The GOOSE publishing task and the upper-layer application are completely independent.

[0084] Specifically, in step (2), the parsing of the GOOSE subscription model file to obtain the relevant configuration parameters of the GOOSE subscription specifically includes:

[0085] Build the mapping relationship between the GOOSE subscription model file and the subscription data. The GOOSE subscription model file includes the destination MAC, VLAN identifier, APPID, gocbRef, datSet, goID, confRev, twnWire (whether it is dual-network subscription), numDatSetEntries, and the subscription data entry dataEntryMap involved in the GOOSE message. Among them, numDatSetEntries represents the number of data entries included in this GOOSE, and dataEntryMap defines the type of each subscription data and where the data is placed in the order of the subscription data. The data type is consistent with the GOOSE publication. Through the GOOSE subscription model file, the type and data source of the subscribed data can be flexibly configured. The upper-layer application can obtain array data such as GooseInValBool, GooseInValInt32, GooseInValFloat, and GooseInValInt16 in real time and make corresponding responses. When the GOOSE subscription task receives a changed GOOSE message, it immediately updates the data to arrays such as GooseInValBool, GooseInValInt32, GooseInValFloat, and GooseInValInt16 for the upper-layer application to use. The GOOSE subscription task and the upper-layer application are completely independent.

[0086] If multiple GOOSE publications or GOOSE subscriptions need to be configured, just configure multiple GOOSEs in the GOOSE publication or GOOSE subscription text model file, and the data mapping method remains unchanged.

[0087] Secondly, the present invention implements the ASN.1 encoding and decoding of GOOSE publication and GOOSE subscription in a hard encoding and decoding manner, rather than using an expensive commercial encoding and decoding library, and is completely decoupled from the encoding and decoding of the MMS service, resulting in low product development costs. The GOOSE function is developed based on the bare machine, which is more efficient than that based on the operating system and has better GOOSE communication performance. The software is designed modularly, and the GOOSE function and the MMS service are independent of each other, and the system has high maintainability.

[0088] GOOSE follows the triple format of tag TAG (also called TYPE), length LENGTH, and value VALUE in the ASN.1 basic encoding specification, abbreviated as TLV. All fields (T, L, or V) are a series of octets. If necessary, the value V can construct the TLV triple again. The transfer syntax is based on octets and is "Big Endian (high byte first)", and the length field L defines the length of V in the TLV triple.

[0089] The so-called hard encoding and decoding means developing software functions on a bare CPU through simple manual coding instead of relying on an operating system or third-party function libraries. Since the GOOSE message structure is relatively simple and, considering real-time performance, GOOSE function development often relies on a bare CPU, these provide prerequisites for implementing the GOOSE function through hard encoding and decoding. The following briefly introduces the steps of GOOSE hard encoding and decoding.

[0090] First, determine the T values of each part of the GOOSE message APDU. Figure 4 It is the encoding value of each content identifier TAG of the GOOSE message APDU implemented by the hard encoding and decoding method adopted in this invention patent. The corresponding TAG values can be directly used during the GOOSE encoding and decoding process, which is convenient and fast.

[0091] Second, define dedicated data structure types for each data item of the GOOSE message and APDU. See the specific details in Figure 5 as shown. Among them, TLV_LongHdr, TLV_MiddleHdr, and TLV_Hdr are used for the TL encoding and decoding of goosePDU or allData data with LENGTH ≤ 127, 127 < LENGTH ≤ 255, and 255 < LENGTH respectively. TLV_String is used for the TLV encoding and decoding of goID. TLV_ObjRefString is used for the TLV encoding and decoding of gocbRef. TLV_U8 is used for the TLV encoding and decoding of test, ndsCom, and numDataSetEntries. TLV_U16 is used for the TLV encoding and decoding of numDataSetEntries with the number of entries greater than 127. TLV_U32 is used for the TLV encoding and decoding of timeAllowedtoLive, stNum, sqNum, and confRev. TLV_Time is used for the TLV encoding and decoding of t. TGOOSE_PDU is used for the encoding and decoding of the GOOSE message APDU. TGOOSE_Payload is used for the encoding and decoding of the GOOSE message Ethernet PDU. This invention can automatically adopt the corresponding structure definition according to the length of the encoding object to implement the hard encoding and decoding function of the message.

[0092] Third, define the above structure variables. Define as many such variables as there are GOOSE publications and GOOSE subscriptions. According to the configuration parameters of the GOOSE publication and subscription model file, initialize the TLV values of the structure variables, and then use them for the encoding of GOOSE publication messages and the decoding of GOOSE subscription messages.

[0093] Figure 6 and Figure 7They are the hard encoding and decoding flowcharts of GOOSE publishing and GOOSE subscribing respectively. The ASN.1 encoding and decoding of GOOSE messages can be implemented using simple C language. The encoding and decoding process is simple, easy to implement, highly efficient, and has low commercial costs.

[0094] As Figure 6 shown, the GOOSE publishing hard encoding process is divided into two parts, namely the device startup call part and the periodic call part of the timer interrupt. In the device startup call part, that is, in the step (3.1), based on the relevant configuration parameters of GOOSE publishing, the hard encoding of GOOSE messages is performed using the ASN.1 encoding rule, which can be divided into 5 steps, specifically including:

[0095] (1.1) Parse the GOOSE publishing model file, obtain the relevant configuration parameters, and define structure variables for storing the encoding values of subsequent steps;

[0096] (1.2) Calculate the length of the APDU data entry part of the GOOSE message based on the number and type of data entries, complete the TLV encoding of the data entry header allData, and store the encoding value in the structure variable;

[0097] (1.3) Complete the TLV hard encoding of the GOOSE control block part of the GOOSE message APDU, including numDatSetEntries, ndsCom, confRev, test, sqNum, StNum, t, goID, datSet, timeAllowedtoLive, gocbRef, and goosePDU, and store the encoding value in the structure variable;

[0098] (1.4) Initialize the structure variables of the fields such as MAC, ethType, APPID, and length in the GOOSE message header;

[0099] (1.5) Based on the latest published data (GooseOutValBool, GooseOutValInt32, GooseOutValFloat, and GooseOutValInt16), complete the TLV encoding of each data in the APDU data entry part of the GOOSE message, store the encoding value in the structure variable, allocate a buffer based on the structure variable, and fill each field of the message through the memcpy basic function to finally generate a complete GOOSE message;

[0100] The steps (1.1)-(1.5) are the device startup call part, which is called once when the device starts up.

[0101] The periodic call part of the timing interruption, that is, in step (3.1), when starting the GOOSE publishing task, if the GOOSE published data is modified by the upper-layer application, the GOOSE message is updated and the changed message sending is started. If the GOOSE published data has not changed, the message is retransmitted according to the retransmission mechanism, which specifically includes:

[0102] (1.6) Determine whether the values of the published data (GooseOutValBool, GooseOutValInt32, GooseOutValFloat, and GooseOutValInt16) of the upper-layer application have changed. If they have changed, update the timeAllowedtoLive, t, stNum, sqNum, and data values of the GOOSE message, and immediately send the changed message;

[0103] (1.7) If the values of the published data have not changed, determine whether the GOOSE retransmission time has arrived. When the retransmission time arrives, update the timeAllowedtoLive and sqNum of the message and send the message;

[0104] (1.8) If the retransmission time has not arrived, determine whether the system maintenance status has changed. If the maintenance status has changed, update the test of the message, otherwise continue to execute step (1.6).

[0105] As Figure 7 shown, the GOOSE subscription hard decoding process is divided into two parts, namely the device startup call part and the network interruption call part. The device startup call part, that is, in the aforementioned step (3.2), based on the relevant configuration parameters of the GOOSE subscription, the hard decoding of the GOOSE message is performed based on the ASN.1 decoding rule, and the GOOSE subscription parameters are initialized, which specifically includes:

[0106] (2.1) Analyze the GOOSE subscription model file, obtain the relevant configuration parameters, and define a structure variable for storing the decoded values of the subsequent steps; this structure variable includes two parts: initializing the GOOSE message header and initializing the GOOSE message APDU (including the APDU control block part and the APDU data entry part);

[0107] (2.2) Initialize the message headers (such as dstMac, ethType, and APPID), the GOOSE message APDU GOOSE control block part (including goosePDU, gocbRef, timeAllowedtoLive, datSet, goID, t, StNum, sqNum, test, confRev, ndsCom, and numDatSetEntries, etc.), and the GOOSE message APDU data entry part (including data and entry headers allData and various data entry types) of the structure variables based on the subscription configuration parameters, and obtain the TLV decoding value; among them, the complete GOOSE message includes two parts: the GOOSE message header and the GOOSE message APDU. Among them, the GOOSE message header parameters (such as dstMac, ethType, and APPID) do not require ASN.1 encoding and decoding, and the parameters of the GOOSE message APDU part (including the APDU GOOSE control block part and the APDU data entry part) require ASN.1 encoding and decoding;

[0108] (2.3) Send dstMac, ethType, and APPID to the FPGA for GOOSE subscription message filtering and network storm suppression, configure dstMac to the ARM Hash filtering register for MAC filtering of GOOSE subscription messages, and start the dual-message filtering mechanism constructed by the ARM and the FPGA;

[0109] The steps (2.1)-(2.3) are the device startup call part and only need to be called once when the device starts up.

[0110] The network interruption call part, that is, in the step (3.2), start the GOOSE subscription task. The GOOSE subscription function stores the GOOSE subscription data in the subscription data cache array, and the upper-layer application can obtain the latest GOOSE subscription data in the subscription data cache array in real time, specifically including:

[0111] (2.4) The FPGA realizes the filtering of GOOSE messages and the suppression of network storms based on dstMAc, ethType, and APPID;

[0112] (2.5) The ARM performs Hash filtering at the network driver layer on the GOOSE messages sent from the FPGA based on dstMac to achieve secondary filtering, and the messages passing through the filtering are sent to the ARM upper-layer application;

[0113] (2.6) The upper-layer ARM application verifies the APDU GOOSE control block of the GOOSE subscription message based on the structure variable (including goosePDU, gocbRef, timeAllowedtoLive, datSet, goID, t, StNum, sqNum, test, confRev, ndsCom, numDatSetEntries, etc.);

[0114] (2.7) The upper-layer ARM application continues to verify the APDU data entries of the message passing the verification of the APDU GOOSE control block (including allData and various data entry types);

[0115] (2.8) ARM updates the subscription data passing the data entry verification to the subscription data cache array for the upper-layer application to use, and discards all messages that do not pass the verification.

[0116] Furthermore, a dual protection measure against control network anomalies is implemented by adopting the FPGA hardware network storm suppression function and the MACHash filtering algorithm based on the ARM network driver layer, fundamentally avoiding abnormal crashes of the PCS in an abnormal network environment and effectively ensuring the safe operation of the energy storage power station. For details, see Figure 9 . The steps (2.4)-(2.5) are the hardware filtering steps for GOOSE subscription messages, which specifically include:

[0117] Verify the dstMac, ethType, and APPID of the message. Only messages that are exactly the same are considered subscription messages, otherwise they are directly discarded;

[0118] When it is determined that the message is a subscription message and the previously occurred network storm has not recovered, it is judged whether there are more than M consecutive GOOSE messages with the same dstMac, ethType, and APPID parameters and the receiving time interval > T2. If so, the network storm has recovered and this message is received, otherwise the message is discarded;

[0119] If the message is a subscription message and there are N consecutive GOOSE messages with the same dstMac, ethType, and APPID parameters and the receiving time interval ≤ T1, it is considered that a network storm has occurred and the message is directly discarded; where T2 > T1;

[0120] When the FPGA determines that no network storm has occurred and the message is a subscription message, the message will be sent to the ARM network driver layer. The ARM driver layer will perform MAC Hash algorithm filtering for the second filtering. The messages passing the filtering will be sent to the upper-layer ARM application, and the messages that do not pass will be directly discarded.

[0121] In the embodiment of the present invention, it is default that N is 5, M is 4, T1 is 2 ms, and T2 is 4 ms. The parameters can be manually modified according to the communication condition.

[0122] As Figure 8 shown, the hardware platform composed of the ARM and FPGA includes a multi-core processor, and the multi-core processor at least includes ARM core one, ARM core two and FPGA core;

[0123] ARM core one runs in a bare core manner. The GOOSE publication and GOOSE subscription application functions of the energy storage converter are deployed on ARM core one, which can ensure the high efficiency and high real-time performance of the GOOSE function. ARM core two runs on the Linux operating system and completes the external communication, logic processing, data storage, etc. with low real-time requirements of the energy storage converter;

[0124] The FPGA core undertakes the tasks of GOOSE message filtering and network storm suppression, and is also used for the control and protection functions of the energy storage converter.

[0125] In summary, the method for implementing the GOOSE function of the energy storage converter based on hard encoding and decoding provided by the present invention has the following technical advantages: First, the present invention adopts independent GOOSE publication and GOOSE subscription model files. The simplest text file can be used to model the parameters related to GOOSE publication and subscription. Compared with the complex MMS CID file, the GOOSE model file is simple and direct to parse, convenient to operate and easy to maintain; Second, the present invention completely decouples GOOSE and MMS. The two are independent of each other, and the development of the GOOSE function does not depend on any operating system. The hard encoding and decoding method is directly adopted on the bare board. That is, the ASN.1 encoding and decoding function can be realized by using simple C language statements. The function is no less than that of commercial software, with low development cost, high software efficiency, excellent and stable performance indicators; Third, the present invention completely separates the GOOSE publication function, GOOSE subscription function and specific applications. The GOOSE publication data entries, GOOSE subscription data entries and service applications can be flexibly associated through the GOOSE model file. That is, both the PCS receiving data (instructions from the EMS) and the PCS sending data (uploading the operating status of the EMS) can be configured arbitrarily. In different engineering applications, the GOOSE function can be realized without modifying the software but only modifying the model file. The whole mapping process is simple and efficient, and the software maintenance is extremely convenient; Finally, the present invention adopts a high-performance ARM and a large-capacity FPGA hardware platform, with a dual-message filtering mechanism based on the FPGA network storm suppression function and the MAC Hash filtering algorithm based on the ARM network driver layer, which can effectively suppress the occurrence of network multicast message network storms in the control layer and filter GOOSE messages, fundamentally avoiding abnormal crashes of the PCS in an abnormal network environment and effectively ensuring the operation safety of the energy storage power station.

[0126] In summary, the present invention provides a simple method for implementing the GOOSE function, which is completely decoupled from the complex MMS protocol. It uses an independent and simple text file for modeling, and realizes the encoding and decoding of GOOSE messages through simple C language. The GOOSE function is independent of specific applications, and can achieve the suppression of network storms in the control network and effective filtering of GOOSE messages. For PCS manufacturers, especially newly established manufacturers, it has the advantages of low cost, high operating efficiency, software modular design, good performance and stability, etc.

[0127] In this article, specific examples are used to elaborate on the principle and implementation mode of the present invention. The description of the above embodiments is only used to help understand the method and its core idea of the present invention; at the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation mode and application scope. In summary, the content of this specification should not be construed as a limitation on the present invention.

Claims

1. A method for implementing the GOOSE function of an energy storage converter based on hard coding and decoding, characterized in that: The following steps are involved: GOOSE publishing and GOOSE subscription modeling are performed based on text files to obtain GOOSE publishing model files and GOOSE subscription model files; Parse the GOOSE publishing model file and the GOOSE subscription model file to obtain the relevant configuration parameters of GOOSE publishing and GOOSE subscription respectively; Based on the relevant configuration parameters of GOOSE publishing and GOOSE subscription, GOOSE publishing and GOOSE subscription functions are implemented; among which, the implementation of GOOSE publishing function includes: Based on the relevant configuration parameters published by GOOSE, the GOOSE message is hard-coded using the ASN.1 encoding rules; Start the GOOSE publishing task. If the GOOSE publishing data is modified by the upper-layer application, update the GOOSE message and start sending the change message. If the GOOSE publishing data has not changed, resend the message according to the resending mechanism. The upper-layer application modifies the GOOSE publishing data in real time and updates it to the publishing data cache array. The GOOSE publishing function monitors whether the GOOSE publishing data has changed in real time. The two are independent of each other. Implement GOOSE subscription functions, including: Based on the relevant configuration parameters of GOOSE subscription, perform hard decoding of GOOSE message based on ASN.1 decoding rules and initialize GOOSE subscription parameters; Start the GOOSE subscription task. The GOOSE subscription function stores the GOOSE subscription data into the subscription data cache array. The upper-layer application obtains the latest GOOSE subscription data in the subscription data cache array in real time. The two are independent of each other. The upper layer application is mounted on a hardware platform composed of ARM and FPGA. The hardware platform has a dual message filtering mechanism of a network storm suppression function based on FPGA and a MAC Hash filtering algorithm based on the network driver layer of ARM.

2. The method for realizing the GOOSE function of the energy storage converter based on hard coding and decoding according to claim 1 is characterized in that: The parsing of the GOOSE publishing model file to obtain the relevant configuration parameters published by GOOSE specifically includes: Construct a mapping relationship between the GOOSE publishing model file and the published data, where the GOOSE publishing model file contains the destination MAC, source MAC, VLAN ID, APPID, gocbRef, datSet, goID, confRev, MaxTime, MinTime, numDatSetEntries and sent data entries dataEntryMap involved in the GOOSE message, where numDatSetEntries represents the number of data entries published by this GOOSE, and dataEntryMap defines the data type and data source of each sent data according to the order in which the data is sent, and the published data type and data source are configured through the GOOSE publishing model file.

3. The method for realizing the GOOSE function of the energy storage converter based on hard coding and decoding according to claim 1 is characterized in that: The parsing of the GOOSE subscription model file to obtain the relevant configuration parameters of the GOOSE subscription specifically includes: Construct a mapping relationship between the GOOSE subscription model file and the subscription data, where the GOOSE subscription model file contains the destination MAC, VLAN ID, APPID, gocbRef, datSet, goID, confRev, twnWire, numDatSetEntries and subscription data entries dataEntryMap involved in the GOOSE message, where twnWire contains information on whether it is a dual-network subscription, numDatSetEntries indicates the number of data entries subscribed by this GOOSE, and dataEntryMap defines the data type and data source of each subscription data according to the order of subscription data. The data type of the subscription data is consistent with the data type of the sent data. The subscription data type and data source are configured through the GOOSE subscription model file.

4. The method for realizing the GOOSE function of the energy storage converter based on hard coding and decoding according to claim 2 is characterized in that: The configuration parameters published based on GOOSE are hard-coded using ASN.1 encoding rules for GOOSE messages, specifically including: (1.1) Parse the GOOSE release model file, obtain relevant configuration parameters, and define structure variables to store the encoding values ​​of subsequent steps; (1.2) Calculate the length of the APDU data entry part of the GOOSE message based on the number and type of data entries, complete the TLV encoding of the data entry header allData, and store the encoded value into the structure variable; (1.3) Complete the TLV hard coding of the GOOSE control block part of the GOOSE message APDU, including numDatSetEntries, ndsCom, confRev, test, sqNum, StNum, t, goID, datSet, timeAllowedtoLive, gocbRef and goosePDU, and store the coded value into the structure variable; (1.4) Complete the initialization of the structure variables of the GOOSE message header MAC, ethType, APPID and length fields; (1.5) Based on the latest published data, complete the TLV encoding of each data in the APDU data entry of the GOOSE message, and store the encoded value in the structure variable. Based on the structure variable, a buffer area is opened and each domain segment of the message is filled through the memcpy basic function, and finally a complete GOOSE message is generated; The steps (1.1) to (1.5) are the device startup call part, which only needs to be called once when the device is started.

5. The method for realizing the GOOSE function of the energy storage converter based on hard coding and decoding according to claim 4 is characterized in that: The GOOSE publishing task is started. If the GOOSE publishing data is modified by the upper layer application, the GOOSE message is updated and the change message is started to be sent. If the GOOSE publishing data has not changed, the message is resent according to the resending mechanism, which specifically includes: (1.6) Determine whether the value of the published data (GooseOutValBool, GooseOutValInt32, GooseOutValFloat and GooseOutValInt16) of the upper-layer application has changed. If it has changed, update the timeAllowedtoLive, t, stNum, sqNum and data value of the GOOSE message, and send the change message immediately; (1.7) If the value of the published data does not change, determine whether the GOOSE retransmission time has arrived. If the retransmission time has arrived, update the timeAllowedtoLive and sqNum of the message and send the message; (1.8) If the retransmission time has not arrived, determine whether the system maintenance status has changed. If the maintenance status has changed, update the test of the message, otherwise continue to execute step (1.6).

6. The method for realizing the GOOSE function of the energy storage converter based on hard coding and decoding according to claim 3 is characterized in that: The configuration parameters related to the GOOSE subscription are based on the ASN.1 decoding rules to perform hard decoding of the GOOSE message and initialize the GOOSE subscription parameters, specifically including: (2.1) Parse the GOOSE subscription model file, obtain relevant configuration parameters, and define structure variables to store the decoded values ​​of subsequent steps; (2.2) Initialize the message header, GOOSE message APDU GOOSE control block part and GOOSE message APDU data entry part of the structure variable based on the subscription configuration parameter, and obtain the TLV decoding value; (2.3) Send dstMac, ethType and APPID to FPGA for GOOSE subscription message filtering and network storm suppression, configure dstMac to ARM Hash filter register for MAC filtering of GOOSE subscription message, and start the dual message filtering mechanism constructed by ARM and FPGA; The steps (2.1) to (2.3) are the device startup call part, which only needs to be called once when the device is started.

7. The method for realizing the GOOSE function of the energy storage converter based on hard coding and decoding according to claim 6 is characterized in that: The GOOSE subscription task is started, and the GOOSE subscription function stores the GOOSE subscription data into the subscription data cache array, and the upper layer application obtains the latest GOOSE subscription data in the subscription data cache array in real time, specifically including: (2.4) FPGA implements GOOSE message filtering and network storm suppression based on dstMAc, ethType and APPID; (2.5) ARM performs Hash filtering of the GOOSE message sent from the FPGA at the network driver layer based on dstMac to achieve secondary filtering. The filtered message is sent to the ARM upper-layer application; (2.6) The ARM upper layer application verifies the GOOSE subscription message APDU GOOSE control block based on the structure variable; (2.7) The ARM upper layer application continues to verify the APDU data item through the message verified by the APDU GOOSE control block; (2.8) ARM updates the subscription data that has passed the data entry verification to the subscription data cache array for use by the upper-layer application. All messages that have not passed the verification will be discarded.

8. The method for realizing the GOOSE function of the energy storage converter based on hard coding and decoding according to claim 7 is characterized in that: The steps (2.4)-(2.5) specifically include: Verify the dstMac, ethType, and APPID of the message. Only identical messages are considered as subscription messages. Otherwise, they are discarded directly. When it is determined that the message is a subscription message and the network storm that occurred previously has not recovered, it is determined whether there are M consecutive GOOSE message receiving intervals with the same dstMac, ethType, and APPID parameters>T2. If so, the network storm is recovered and the message is received, otherwise the message is discarded; If the message is a subscription message and the time interval for receiving N consecutive GOOSE messages with the same dstMac, ethType, and APPID parameters is ≤ T1, it is considered that a network storm has occurred and the message is directly discarded; where T2>T1; When the FPGA determines that no network storm has occurred and the message is a subscription message, it will send the message to the ARM network driver layer. The ARM driver layer will perform MAC Hash algorithm filtering and perform the second filtering. The messages that pass the filtering will be sent to the ARM upper-layer application, and the messages that fail will be directly discarded.

9. The method for realizing the GOOSE function of the energy storage converter based on hard coding and decoding according to claim 1 is characterized in that: The hardware platform composed of the ARM and FPGA includes a multi-core processor, and the multi-core processor includes at least an ARM core 1, an ARM core 2 and an FPGA core; ARM core 1 runs as a bare core, and the GOOSE publishing and GOOSE subscription application functions of the energy storage converter are deployed on ARM core 1. ARM core 2 runs on the Linux operating system to complete the external communication, logic processing and data storage of the energy storage converter; The FPGA core is responsible for GOOSE message filtering and network storm suppression, and is also used for energy storage converter control and protection functions.

Citation Information

Patent Citations

  • Network storm resisting method for process layer equipment

    CN105207817A

  • Energy storage system communication method and energy storage system

    CN114785833A