Method, control device and storage medium for configuration of EPA network
By automatically calculating the configuration parameters of the EPA network, the problem of time-consuming and labor-intensive manual configuration in the existing technology is solved, efficient and accurate configuration is achieved, and labor costs are reduced.
Patent Information
- Application Number
- CN202311791277.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-25
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2043-12-25
AI Technical Summary
In the existing technology, the configuration of the EPA network mainly relies on manual calculations, which requires a lot of labor costs and is prone to errors when the network topology or the number of nodes changes.
Provide an automated method to obtain the number of nodes and the amount of user data in the EPA network, determine configuration parameters such as macro cycle length, cycle time period length and transmission offset time, and then perform configuration configuration. The method includes calculating the periodic period length, non-periodic time length and macro periodic length based on the number of nodes and the amount of user data, and setting an independent sending offset time for each EPA node.
It realizes the automatic configuration of the EPA network, reduces manual intervention, improves configuration efficiency and accuracy, reduces labor costs, and significantly saves configuration time, especially when the network scale is large.
Smart Images

Figure CN117478501B_ABST
Abstract
Description
Technical Field
[0001] The present invention generally relates to the field of industrial control, and more specifically, to a method, a control device and a computer-readable storage medium for configuring an EPA network. Background Art
[0002] In recent years, with the rapid transformation of control systems towards digitalization and intelligence, various automation systems and information systems are applied in control systems, resulting in higher and higher requirements for communication in control systems.
[0003] EPA (Ethernet for Plant Automation) is a real-time Ethernet technology for control systems independently developed by China. It has been included in the fieldbus international standard IEC61158 and the real-time Ethernet standard IEC61784. At present, EPA has been widely used in many fields such as electricity, chemical industry, machinery, mining, and petroleum. In order to adapt to different application scenarios in the EPA network, the connection between EPA device nodes will have different network topologies. Correspondingly, under different network topologies, different numbers of nodes, and different control requirements, the configuration parameters including macrocycles and cycles in each EPA device node will be different.
[0004] It can be seen that in the prior art, the EPA devices in the EPA network can only be configured manually one by one, which will generate a huge workload and easily cause errors when there are many device nodes in the network. The present invention provides an automated configuration solution for the EPA network. Summary of the invention
[0005] In view of the above problems, the present invention provides a method for automatically determining various configuration parameters of an EPA network to configure the EPA network.
[0006] According to one aspect of the present invention, a method for configuring an EPA network is provided. The method includes: obtaining the number of EPA nodes included in the EPA network and the amount of user data of each EPA node; determining the configuration parameters of the EPA network based on the number of EPA nodes included in the EPA network and the amount of user data of each EPA node, wherein the configuration parameters at least include the macrocycle length, the period time period length and the sending offset time of each EPA node in the macrocycle of the EPA network; and configuring the EPA network based on the configuration parameters.
[0007] In some implementations, determining the configuration parameters of the EPA network includes: determining the length of the periodic time period based on the number of EPA nodes included in the EPA network and the amount of user data of each EPA node; determining the macrocycle length of the EPA network based on the periodic time period length and the non-periodic time length; and for each EPA node in the EPA network, determining the send offset time of the EPA node based on the send offset time of the previous EPA node of the EPA node and the total time occupied by the previous EPA node.
[0008] In some implementations, determining the length of the periodic time period includes: for each EPA node, determining the message occupancy time of the EPA node based on the amount of user data of the EPA node; determining the periodic time slice length of the EPA node based on the message occupancy time, transmission shaping time and message reservation time of the EPA node; and summing the periodic time slice lengths of all EPA nodes of the EPA network to determine the periodic time period length of the EPA network.
[0009] In some implementations, determining the macrocycle length of the EPA network includes: determining the non-periodic time length based on a preset non-periodic reserved time slice and a clock synchronization error; and summing the periodic time period length and the non-periodic time length to determine the macrocycle length of the EPA network.
[0010] In some implementations, determining the send offset time of the EPA node includes: for the first EPA node in the EPA network, setting the send offset time of the first EPA node to 0; for each EPA node other than the first EPA node in the EPA network, determining the transmission shaping time of the EPA node based at least on the inter-node line delay, node forwarding delay and clock synchronization error of a previous EPA node of the EPA node; determining the total time occupied by the previous EPA node based on the transmission shaping time of the EPA node, the message occupancy time and the message reservation time of the previous EPA node of the EPA node; and determining the send offset time of the EPA node based on the send offset time of the previous EPA node of the EPA node and the total time occupied by the previous EPA node.
[0011] In some implementations, the topology of the EPA network includes a ring structure, a linear structure, or a star structure.
[0012] In some implementations, determining the transmission shaping time of the EPA node includes determining the transmission shaping time of the EPA node based on the inter-node line delay, node forwarding delay, clock synchronization error and frame interval of a previous EPA node of the EPA node.
[0013] In some implementations, the total time occupied by each EPA node is determined as follows: t4 = t1+t2+t3+t5+t6+t7, where t4 represents the total time occupied by the previous EPA node of the EPA node, t1 represents the inter-node line delay from the previous EPA node or switch of the EPA node to the EPA node, t2 represents the node forwarding delay of the previous EPA node or switch, t3 represents the message occupancy time of the previous EPA node, t5 represents the frame interval, t6 represents the message reservation time of the EPA node, and t7 represents the clock synchronization error of the EPA network.
[0014] In some implementations, the sending offset time includes a forward sending offset time and a reverse sending offset time, and the forward sending offset time and the reverse sending offset time are set independently.
[0015] In some implementations, determining the transmission shaping time of the EPA node includes: determining the transmission shaping time of the EPA node based on inter-node line delay, node forwarding delay, clock synchronization error, and the number of EPA nodes included in the EPA network.
[0016] In some implementations, the total time occupied by the i-th EPA node is determined as follows: , where t1_i is the node-to-node line delay from the i-th EPA node to the i+1-th EPA node or switch, t2_i is the node forwarding delay of the i-th EPA node, t3_i is the message occupancy time of the i-th EPA node, t4_i is the total time occupied by the i-th EPA node, t6 is the message reservation time, t7 represents the clock synchronization error of the EPA network, and when the EPA network is a ring structure, n is the number of EPA nodes contained in the EPA network.
[0017] In some implementations, the total time occupied by the i-th EPA node is determined as follows: , where t1_i is the inter-node line delay from the i-th EPA node to the i+1-th EPA node, t2_i is the node forwarding delay of the i-th EPA node, t3_i is the message occupancy time of the i-th EPA node, t4_i is the total time occupied by the i-th EPA node, t6 is the message reservation time, t7 represents the clock synchronization error of the EPA network, and when the EPA network is a linear structure, n is the number of EPA nodes contained in the EPA network, and when the EPA network is a star structure, n is the number of longest link devices in the EPA network.
[0018] In some implementations, the sending offset time includes a forward sending offset time and a reverse sending offset time, and the forward sending offset time is set to be equal to the reverse sending offset time.
[0019] According to another aspect of the present invention, a control device is provided, comprising: a processor and a memory, wherein the memory comprises instructions executable by the processor, and the processor is configured to enable the node device to execute any one of the methods described above.
[0020] According to another aspect of the present invention, a computer-readable storage medium is provided, on which a computer program code is stored. When the computer program code is executed, the method described above is executed. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The present invention will be better understood and other objects, details, features and advantages of the present invention will become more apparent through the following description of specific embodiments of the present invention given with reference to the accompanying drawings.
[0022] Figures 1A to 1D Schematic diagrams of exemplary EPA networks of different topological structures according to embodiments of the present invention are respectively shown.
[0023] Figure 2 A schematic diagram of a macrocycle of an EPA network according to an embodiment of the present invention is shown.
[0024] Figure 3 An exemplary flow chart of a method for configuring an EPA network according to some embodiments of the present invention is shown.
[0025] Figure 4 An exemplary flow chart of a process for determining configuration parameters of an EPA network according to an embodiment of the present invention is shown.
[0026] Figure 5 A further detailed flow chart of a process for determining the cycle time period length of a macrocycle according to some embodiments of the present invention is shown.
[0027] Fig. 6A A schematic diagram showing the periodic time slices of all EPA nodes in the EPA network.
[0028] Figure 6B An exemplary schematic diagram of a cycle time slice is shown.
[0029] Fig. 7A A schematic diagram of transmission of periodic messages of various EPA nodes according to some embodiments of the present invention is shown.
[0030] Figure 7BA schematic diagram of transmission of periodic messages of various EPA nodes according to other embodiments of the present invention is shown.
[0031] Figure 7C Shown with Figure 7B Correspondingly, a schematic diagram of transmission of periodic messages of each EPA node 110 according to some other embodiments of the present invention.
[0032] Fig.7D and Fig. 7E Schematic diagrams of transmission of periodic messages of various EPA nodes according to some further embodiments of the present invention are respectively shown.
[0033] Figure 8 A more detailed flow chart of the process for determining the transmit offset time of an EPA node is shown.
[0034] Fig. 9 A block diagram of a control device suitable for implementing embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0035] The preferred embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although the preferred embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided to make the present invention more thorough and complete, and to fully convey the scope of the present invention to those skilled in the art.
[0036] In the following description, certain specific details are set forth for the purpose of illustrating various embodiments of the invention to provide a thorough understanding of the various embodiments of the invention. However, those skilled in the relevant art will recognize that the embodiments may be practiced without one or more of these specific details. In other cases, well-known devices, structures, and techniques associated with the present application may not be shown or described in detail to avoid unnecessarily obscuring the description of the embodiments.
[0037] Unless the context requires otherwise, throughout the specification and claims, the word "comprise" and variations such as "include" and "have" should be construed in an open, inclusive sense, ie, should be interpreted as "including, but not limited to."
[0038] References throughout the specification to "one embodiment" or "some embodiments" indicate that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment. Thus, the appearance of "in one embodiment" or "some embodiments" in various places throughout the specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any manner in one or more embodiments.
[0039] In addition, the terms "first", "second", "third", etc. used in the specification and claims are only used to distinguish each object for the sake of clarity of description, and do not limit the size or other order of the objects described, unless otherwise specified.
[0040] In an EPA network, each node of the network uses time division multiplexing to communicate periodically, that is, under the premise of working on the same time base, a communication cycle of a specified time length is formulated according to the specific application scenario of the system, also known as a macrocycle, and the start and end time of the communication cycle of all nodes in the system are consistent. Usually, a macrocycle can be divided into a periodic time period and a non-periodic time period, where the periodic time period can be used to transmit the periodic data of each node (that is, data sent periodically at a fixed frequency), and the non-periodic time period can be declared by each node to send some burst data or send system messages generated by the system itself.
[0041] Figures 1A to 1D Schematic diagrams of exemplary EPA networks 100 of different topological structures according to embodiments of the present invention are shown respectively. The EPA network 100 may include a plurality of EPA nodes 110 ( Figures 1A to 1D Schematically shows four EPA nodes 110-1, 110-2, 110-3 and 110-4). Among them, Figure 1A The EPA network 100 is a ring topology structure, and four EPA nodes 110-1, 110-2, 110-3 and 110-4 are connected in sequence to form a ring structure. Figure 1B The EPA network 100 is a linear topology, where four EPA nodes 110-1, 110-2, 110-3 and 110-4 are connected in sequence, but the last EPA node 110-4 is no longer connected to the first EPA node 110-1. Figure 1C and Figure 1D The EPA network 100 of FIG. 1 is a star topology structure, and each EPA node 110 is connected through a switch 120. The difference is that Figure 1C In the EPA network 100, a switch 120 is connected to four EPA nodes 110-1, 110-2, 110-3 and 110-4 respectively, and Figure 1D In the EPA network 100, four EPA nodes 110-1, 110-2, 110-3 and 110-4 are connected through three (or two or more) switches 120 (i.e., switch 120-1, switch 120-2 and switch 120-3). The EPA nodes 110 communicate with each other (and with the switches 120) through an EPA bus based on the EPA protocol.
[0042] Each EPA node 110 has one or more transmit (TX) ports ( Figures 1A to 1D exemplarily shows one transmit port (ie, transmit ports 1A, 2A, 3A, and 4A) and one or more receive (RX) ports ( Figure 1A and Figure 1B exemplarily shows one receiving port for each EPA node 110, namely, receiving ports 1B, 2B, 3B and 4B). Those skilled in the art will appreciate that the sending ports 1A, 2A, 3A and 4A and the receiving ports 1B, 2B, 3B and 4B may be bidirectional ports, or corresponding receiving ports (not shown in the figure) are additionally provided at the sending ports 1A, 2A, 3A and 4A and corresponding sending ports (not shown in the figure) are additionally provided at the receiving ports 1B, 2B, 3B and 4B, so that the EPA network 100 supports both forward transmission ( Figure 1A Clockwise or Figures 1B to 1D direction from EPA node 110-1 to EPA node 110-4) and in the reverse direction ( Figure 1A counterclockwise or Figures 1B to 1D direction from EPA node 110 - 4 to EPA node 110 - 1 ).
[0043] In the EPA network 100, each EPA node 110 performs periodic communication in the same macrocycle.
[0044] also, Figures 1A to 1D The control device 20 is also shown in the figure, and the control device 20 can be connected to the EPA network 100 via Ethernet to control the EPA network 100, such as configuring. Note that in the case where the control device 20 is an Ethernet device, a conversion device (not shown in the figure) is also required between the control device 20 and the EPA network 100 to convert the Ethernet message sent by the control device 20 into an EPA message.
[0045] Figure 2 FIG. 1 is a schematic diagram showing a macrocycle T of an EPA network 100 according to an embodiment of the present invention. Figure 2 As shown in , each macrocycle T may include a periodic time period Tp and a non-periodic time period Tnp.
[0046] The periodic time period Tp of each macrocycle T is used for each EPA node 110 to send periodic messages. Among them, under a given communication mode, each EPA node 110 in the EPA network 100 is allocated a fixed periodic time slice during the periodic time period Tp to send the periodic message of the EPA node 110, and the start time (i.e., the sending offset time relative to the start time of the macrocycle) and the length of the periodic time slice are unique for each EPA node 110, and will not overlap or conflict with other EPA nodes 110. The periodic time period Tp is mainly used to transmit the user data of each EPA node 110, which is the main data transmission time of the macrocycle. In this article, the EPA node 110 in the EPA network 100 that first sends a periodic message in the macrocycle T can be specified, and this EPA node 110 is also called the first EPA node of the EPA network 100. For example, Figure 1A and Figure 1B The EPA node 110-1 connected to the control device 20 is designated as the first EPA node of the EPA network 100. Figure 1C and Figure 1D The EPA node 110 - 1 connected to the switch 120 or the switch 120 - 1 is designated as the first EPA node of the EPA network 100 .
[0047] In the following description, forward transmission is taken as an example. For example, assuming that each EPA node 110 follows Figures 1A to 1D The EPA nodes 110-1→EPA node 110-2→EPA node 110-3→EPA node 110-4 shown in the figure send their respective periodic messages P1, P2, P3 and P4 in sequence, that is, each periodic message is received by the receiving port of an EPA node 110 in turn, and then forwarded to the next EPA node 110 (or switch 120) through the sending port of the EPA node 110.
[0048] The non-periodic time period Tnp of the macrocycle T is a time period shared by all EPA nodes 110, and each EPA node 110 can declare different transmission time slices according to actual needs (for example, declare in the periodic message of the periodic time period Tp), for example, declare different transmission start time points and / or durations, etc. During the non-periodic time period Tnp, the transmission time slices of all EPA nodes 110 still cannot overlap. In this way, during the non-periodic time period Tnp, each EPA node 110 can be used to send various control messages of unequal length or a small amount of key information.
[0049] For the EPA network 100, various operating parameters need to be configured in advance, such as the above-mentioned macrocycle length, cycle time period length, and the sending offset time of each EPA node 110, which is called configuration configuration, and these parameters are also called configuration configuration parameters. Currently, the configuration configuration of the EPA network is mainly calculated and configured manually. In particular, when the network topology or the number of nodes changes, each EPA node needs to be recalculated and updated one by one, which requires a lot of manpower costs.
[0050] In response to the above problems, in this article, before the EPA network starts running or when a change occurs, a control device (also called a host computer) connected to the EPA network automatically calculates one or more groups of configuration parameters for the EPA network based on information of the EPA network (such as topology, number of EPA nodes, amount of user data, etc.), and the control device can configure the EPA network based on the determined or selected configuration parameters through Ethernet transmission (for example, in the form of UDP packets) between the control device and the EPA network.
[0051] Figure 3 FIG. 1 is an exemplary flow chart of a method 300 for configuring an EPA network 100 according to some embodiments of the present invention. The method 300 may be performed by, for example Figure 1A and Figure 1B This is achieved by the control device 20 shown in FIG.
[0052] In step 310 , the control device 20 obtains the number of EPA nodes included in the EPA network 100 and the amount of user data of each EPA node 110 .
[0053] As described above, the topology of the EPA network 100 of this invention can be as follows: Figure 1A The annular structure, such as Figure 1B The linear structure shown or Figure 1C and 1D In addition, those skilled in the art can understand that, in addition to some specific descriptions below (such as the specific calculation method of the sending offset time), other ideas of the present invention can also be equally applied to other topological structures.
[0054] The amount of user data of each EPA node 110 may be the amount of data that each EPA node 110 is to send during the periodic time period of each macrocycle during this configuration adjustment, such as the amount of data periodically sensed by a sensor (not shown) connected to the EPA node 110 to be sent. When the amount of data sent by the EPA node 110 during the periodic time period of each macrocycle changes, the method 300 described herein may be re-executed to reconfigure the configuration.
[0055] In addition, in some embodiments, in step 310, the control device 20 may also obtain the topology of the EPA network 100 for calculation of the configuration parameters of the EPA network, that is, different configuration parameters are calculated for different topologies. However, those skilled in the art will appreciate that the topology of the EPA network 100 may be fixed, or may be known in advance by the control device 20, or the control device 20 may uniformly calculate one or more groups of configuration parameters without considering the topology.
[0056] In addition, as described below, for the star-structured EPA network 100, the configuration parameters (more specifically, the cycle time slice length or transmission shaping time of each EPA node 110) not only depend on the number of EPA nodes 110 included in the EPA network 100, but also need to consider the number of switches 120 included in the EPA network 100, that is, the configuration parameters also depend on the number of the longest link devices in the EPA network 100, as described in detail below. The number of the longest link devices can also be obtained by the control device 20 in advance through link detection or the like or configured in the control device 20 by the user in advance.
[0057] In step 320, the control device 20 may determine the configuration parameters of the EPA network 100 based on the number of EPA nodes 110 included in the EPA network 100 and the amount of user data of each EPA node 110 obtained in step 310. Herein, a set of corresponding configuration parameters may be configured for the EPA network 100 according to the user requirements of the EPA network 100 (e.g., whether the EPA network 100 needs to independently configure forward transmission and reverse transmission), or multiple sets of configuration parameters may be configured for the EPA network 100 so that the user can select a set of configuration parameters for the EPA network 100 according to the user requirements for configuration. For example, the minimum transmission offset time under different transmission modes (such as the first transmission mode and the second transmission mode described below) may be configured for at least each EPA node 110 of the EPA network 100, thereby respectively calculating a set of configuration parameters, and the control device 20 may select a set of configuration parameters from them according to the user requirements for configuration configuration.
[0058] As described above, the configuration parameters include the length of the macrocycle (T) of the EPA network 100, the length of the periodic time period (Tp), and the sending offset time of each EPA node 110 in the macrocycle T. In some specific examples, the configuration parameters may include the minimum value of the sending offset time of each EPA node 110 in different transmission modes (i.e., the minimum sending offset time). In addition, in some embodiments, the configuration parameters may also include the message reservation time Tr of each EPA node 110 in the periodic time period Tp of the macrocycle. Note that the message reservation time Tr may be configured individually or uniformly for each EPA node 110 by the control device 20, or may be pre-stored in each EPA node 110 (and the control device 20) when it is a predetermined value. The function of the message reservation time Tr is to prevent the message sent by the EPA node 110 from conflicting with the messages sent by other EPA nodes 110 when the message is transmitted in the network.
[0059] In step 330, the control device 20 may configure the EPA network 100 based on the configuration parameters determined in step 320. For example, the control device 20 may package the determined configuration parameters or the selected configuration parameters into a UDP message, and send it to the EPA network 100 via the Ethernet link between the control device 20 and the EPA network 100. More specifically, the control device 20 may send the UDP message to a conversion device (not shown in the figure) so that the conversion device converts the UDP message into an EPA message through protocol conversion, and sends the EPA message to each EPA node 110 to configure these EPA nodes 110. Here, the conversion device may be a separate device, or it may be integrated in the first EPA node 110 (such as EPA node 110-1) of the EPA network 100.
[0060] The following will be combined Figures 4 to 8 The process for determining the configuration parameters of the EPA network 100 according to an embodiment of the present invention (step 320) is described in detail. Figure 4 An exemplary flow chart of a process (step 320 ) for determining configuration parameters of the EPA network 100 according to an embodiment of the present invention is shown.
[0061] like Figure 4 As shown in , step 320 may include step 322 , in which the control device 20 may determine the length of the cycle time period (Tp) of the macro cycle T based on the number of EPA nodes 110 included in the EPA network 100 and the amount of user data of each EPA node 110 .
[0062] like Figure 2 As shown in and the following combination Fig. 6AAs described in detail, the periodic time period Tp of the macro cycle T is composed of a periodic time slice Tpi (i=1, 2, ..., m, where m is the number of EPA nodes 110 included in the EPA network 100) allocated to each EPA node 110, and the length of the periodic time slice Tpi allocated to each EPA node 110 mainly depends on the amount of user data of the EPA node 110.
[0063] In addition, in order to ensure that there is no conflict in the transmission between all EPA nodes 110 in the EPA network 100, the periodic time slice length of each EPA node 110 should also include the message shaping time Tm. Depending on different transmission modes, the message shaping time Tm can be determined in different ways, as described in detail below.
[0064] In addition, the periodic time slice length of each EPA node 110 may also include a message reservation time Tr preset for the EPA node 110. The message reservation time Tr may be the same or different time intervals individually set by the control device 20 for each EPA node 110, or may be the same or different time intervals pre-stored in each EPA node 110 or in the protocol stack space of the EPA network 100.
[0065] Figure 5 A further detailed flow chart of the process of determining the length of the cycle time period (Tp) of the macrocycle T (step 322) according to some embodiments of the present invention is shown. Fig. 6A A schematic diagram showing the periodic time slices (Tp1, Tp2, Tp3, Tp4) of all EPA nodes 110 in the EPA network 100 is shown, and Figure 6B An exemplary schematic diagram of a cycle time slice (eg, Tp1) is shown.
[0066] like Figure 5 As shown in , in step 3222 , for each EPA node 110 (eg, EPA node 110 - 1 ), the control device 20 may determine the message occupancy time Ts1 of the EPA node 110 - 1 based on the amount of user data of the EPA node 110 .
[0067] The message occupation time Ts1 may include one or more periodic messages P1, which are used to carry the user data volume of the EPA node 110. In this paper, it is assumed that the periodic message P1 is a FRT (Fast Real Time) message suitable for the EPA protocol. Figure 6B Multiple periodic messages P1 are also marked as FRT0, FRT1, ... respectively.
[0068] When calculating the message occupancy time Ts1 of the EPA node 110-1, the total number of bytes required to transmit the corresponding amount of user data can be determined based on the maximum frame length of the Ethernet, and then the time required to transmit the total number of bytes can be calculated based on the total number of bytes and the network transmission speed (for example, the network transmission speed of Gigabit Ethernet is 125MB / s) as the message occupancy time of the EPA node.
[0069] Specifically, Figure 6B As shown in , each FRT message includes an FRT message header, a user data segment, an FCS (Frame Check Sequence) field, and a frame interval, wherein the user data segment is used to carry the user data amount mentioned above.
[0070] For example, assuming that the amount of user data of the EPA node 110-1 is 5000B, each FRT message of the EPA node 110-1 can be designed according to the following Table 1:
[0071]
[0072] Among them, the message header length of FRT0 includes a 28B Ethernet message header and a 14B MAC field, the FCS field length is fixed to 4B, and the frame interval is fixed to 12B. Therefore, according to the user data volume of EPA node 110-1 of 5000B, considering the maximum frame length of Ethernet, FRT0, FRT1 and FRT2 can be set to 1530B respectively, and the user data segments allocated to them are 1472B, 1476B and 1476B respectively, and the user data segment of FRT4 is 5000B-1472B-1476B-1476B=576B. Therefore, under the above assumptions, the four periodic messages P1 used to transmit the user data segment of EPA node 110-1 are 1530B, 1530B, 1530B and 618B respectively, as shown in Table 1.
[0073] Thus, the total number of bytes that the EPA node 110 - 1 needs to transmit 5000B of user data is 5208B. In Gigabit Ethernet, it takes 8ns to transmit 1B, so the message occupancy time Ts1 is 5208*8=41664ns.
[0074] In step 3224 , the control device 20 may determine the length of the periodic time slice (Tp1 ) of the EPA node 110 - 1 based on the message occupation time Ts1 , transmission shaping time Tm1 , and message reservation time Tr1 of the EPA node 110 - 1 calculated in step 3222 .
[0075] In some embodiments, the control device 20 may set the transmission shaping time Tm for each EPA node 110. More specifically, before step 3224, the control device 20 may also determine the transmission shaping time of each EPA node 110 based at least on the inter-node line delay and the node forwarding delay of the EPA node 110.
[0076] Here, the transmission shaping time Tm of the EPA node 110 can be determined as follows: Figure 8 described.
[0077] Therefore, in step 3224 , the periodic time slice (Tpi) length of each EPA node 110 may be determined as the sum of the message occupation time Ts, the transmission shaping time Tm, and the message reservation time Tr of the EPA node 110 .
[0078] continue Figure 5 In step 3226, the control device 20 may sum the lengths of the periodic time slices Tpi of all EPA nodes 110 of the EPA network 100 to determine the length of the periodic time period (Tp) of the EPA network 100. That is, Tp=ΣTpi.
[0079] continue Figure 4 , at step 324 , the control device 20 may determine a macrocycle length T of the EPA network 100 based on the cycle time period length (Tp) and the non-cycle time length (Tnp).
[0080] Specifically, the control device 20 may determine the non-periodic time length Tnp of the macrocycle based on a preset non-periodic reserved time slice and a clock synchronization error.
[0081] For example, the non-periodic time Tnp can be determined as follows:
[0082] Non-periodic time Tnp = non-periodic reserved time slice + clock synchronization error
[0083] In addition, in some embodiments, a synchronization field may also be set in the non-periodic time Tnp. In this case, the non-periodic time may be determined as follows:
[0084] Non-periodic time Tnp = synchronization field occupied time + non-periodic reserved time slice + clock synchronization error
[0085] Here, the synchronization field occupied time, the non-periodic reserved time slice and the clock synchronization error are all pre-set or measured values. For example, the synchronization field occupied time can be directly specified or calculated based on the required synchronization field length and bandwidth. The synchronization field length can be, for example, a fixed 64 bytes, so the calculation of the non-periodic time Tnp is not repeated here. In addition, the clock synchronization error of each EPA node 110 may be different. In this article, in the configuration parameter calculation process, the maximum value of the clock synchronization errors of all EPA nodes 110 is used as the clock synchronization error.
[0086] The periodic time period length Tp and the non-periodic time length Tnp may then be summed to determine a macrocycle length T of the EPA network 100 .
[0087] continue Figure 4 In step 326, for each EPA node 110 in the EPA network 100, the control device 20 may determine the sending offset time of the EPA node 110 based on the sending offset time of the previous EPA node of the EPA node 110 and the total time occupied by the previous EPA node.
[0088] Fig. 7A FIG. 1 shows a schematic diagram of the transmission of periodic messages of each EPA node 110 according to some embodiments of the present invention. Fig. 7A A schematic diagram of the transmission offset time of each EPA node 110 in the first transmission mode of the EPA network 100 is shown in FIG. In the first transmission mode, each EPA node sends its own periodic message only after the periodic message of the previous EPA node has completed transmission in the entire EPA network, and forward transmission and reverse transmission need to be considered, so it is also called a loose mode. The periodic messages for forward transmission are marked as N1, N2, N3, and N4, and the periodic messages for reverse transmission are marked as N1', N2', N3', and N4'. Note that the periodic messages N1, N2, N3, and N4 here are combined with the above Fig. 6A and Figure 6B The periodic messages P1, P2, P3, P4 or FRT messages are different. The periodic messages N1, N2, N3, N4 are equivalent to the user data of each EPA node 110. The time occupied by the periodic messages N1, N2, N3, N4 is the time taken by the above combined Fig. 6A The message takes up time Ts.
[0089] like Fig. 7A As shown in , it is assumed that the periodic messages of each EPA node 110 are transmitted in a clockwise direction, and EPA node 110-1, EPA node 110-2, EPA node 110-3, and EPA node 110-4 send messages in sequence, thus it can be obtained as follows Fig. 7A The scheduled transmission results are shown. Fig. 7AIn the figure, T1 is the sending offset time of EPA node 110-1 (when EPA node 110-1 is the first EPA node in EPA network 100, its sending offset time may also be set to 0), and T2 is the sending offset time of EPA node 110-2. t1_i is the inter-node line delay from the i-th EPA node to the i+1-th EPA node, t2_i is the node forwarding delay of the i-th EPA node, t3_i is the message occupying time of the i-th EPA node (i.e., the message occupying time ts mentioned above), and t4_i is the total time occupied by the i-th EPA node.
[0090] The following is an explanation of the forward transmission process of the EPA node 110-1:
[0091] The periodic message N1 sent by the sending port 1A of the EPA node 110-1 at time T1 arrives at the receiving port 2B of the EPA node 110-2 after time t1_1;
[0092] After receiving the periodic message N1, the receiving port 2B of the EPA node 110-2 forwards it from the sending port 2A of the EPA node 110-2 after t2_2;
[0093] The periodic message N1 forwarded by the sending port 2A of the EPA node 110-2 arrives at the receiving port 3B of the EPA node 110-3 after t1_2 time;
[0094] After receiving the periodic message N1, the receiving port 3B of the EPA node 110-3 forwards it from the sending port 3A of the EPA node 110-3 after t2_3 time;
[0095] The periodic message N1 forwarded by the sending port 3A of the EPA node 110-3 arrives at the receiving port 4B of the EPA node 110-4 after t1_3 time;
[0096] After receiving the periodic message N1, the receiving port 4B of the EPA node 110-4 forwards it from the sending port 4A of the EPA node 110-4 after t2_4 time;
[0097] The periodic message N1 forwarded by the sending port 4A of the EPA node 110 - 4 arrives at the receiving port 1B of the EPA node 110 - 1 after time t1_4.
[0098] Therefore, it can be seen that the total time t4_1 occupied by the EPA node 110-1 includes the message occupied time t3_1 of the EPA node 110-1, the sum of the line delay t1_i between nodes, and the sum of the node forwarding delay t2_i. In addition, the total time t4_1 occupied by the EPA node 110-1 can also include the message reservation time t6 (here, the message reservation time t6 can be the message reservation time Tr set separately or jointly for each EPA node 110 as described above) and the clock synchronization error t7 of the EPA network 100. That is,
[0099] (1)
[0100] Among them, t1_i is the inter-node line delay from the i-th EPA node to the i+1-th EPA node, t2_i is the node forwarding delay of the i-th EPA node, t3_i is the message occupancy time of the i-th EPA node (that is, the message occupancy time ts mentioned above), t4_i is the total time occupied by the i-th EPA node, t6 is the message reservation time, t7 is the clock synchronization error of the EPA network 100, and when the EPA network 100 is a ring structure, n is the number of EPA nodes 110 contained in the EPA network 100.
[0101] More generally, for the i-th EPA node 110, the total time t4_i occupied by the i-th EPA node can be determined based on the inter-node line delay from the i-th EPA node to the i+1-th EPA node, the node forwarding delay t2_i of the i-th EPA node, the message occupying time t3_i of the i-th EPA node (i.e., the message occupying time tsi mentioned above), the message reservation time t6, and the clock synchronization error t7 of the EPA network 100, which can be expressed as:
[0102] (2)
[0103] Among them, t1_i is the inter-node line delay from the i-th EPA node to the i+1-th EPA node, t2_i is the node forwarding delay of the i-th EPA node, t3_i is the message occupancy time of the i-th EPA node (that is, the message occupancy time ts mentioned above), t4_i is the total time occupied by the i-th EPA node, t6 is the message reservation time, t7 is the clock synchronization error of the EPA network 100, and when the EPA network 100 is a ring structure, n is the number of EPA nodes 110 contained in the EPA network 100.
[0104] To avoid conflicts between the periodic messages of other EPA nodes 110 and the periodic message N1 of EPA node 110-1, other EPA nodes 110 should send periodic messages at least at or after time T1+t4. Therefore, the sending offset time of the next EPA node 110-2 is:
[0105] T2=T1+t4 (3)
[0106] To summarize, when configuring the sending offset time in a ring network, if other nodes have occupied the time slice before this node occupies it, the sending offset time of this node = the sending offset time of the previous node + the message occupying time of the previous node + transmission shaping time + message reservation time.
[0107] Similarly, for Figure 1B In the linear topology EPA network 100 shown, after the periodic message N1 reaches the last EPA node 110-4 and is processed, it does not need to be sent through the sending port 4A of the EPA node 110-4 and received by the receiving port 1B of the first EPA node 110-1. Therefore, in this case, the total time occupied by the EPA node 110-1 can be expressed as:
[0108] (4)
[0109] Wherein, t1_i is the inter-node line delay from the i-th EPA node to the i+1-th EPA node, t2_i is the node forwarding delay of the i-th EPA node, t3_i is the message occupancy time of the i-th EPA node (i.e., the message occupancy time ts mentioned above), t4_i is the total time occupied by the i-th EPA node, t6 is the message reservation time, t7 is the clock synchronization error of the EPA network 100, and when the EPA network 100 is a linear structure, n is the number of EPA nodes 110 included in the EPA network 100, and when the EPA network 100 is a star structure, n is the number of longest link devices in the EPA network 100.
[0110] More generally, for the i-th EPA node 110, the total time t4_i occupied by the i-th EPA node can be determined based on the inter-node line delay from the i-th EPA node to the i+1-th EPA node, the node forwarding delay t2_i of the i-th EPA node, the message occupying time t3_i of the i-th EPA node (i.e., the message occupying time tsi mentioned above), the message reservation time t6, and the clock synchronization error t7 of the EPA network 100, which can be expressed as:
[0111] (5)
[0112] for Figure 1Cand Figure 1D For a star network, the total time occupied by the i-th EPA node can be determined in a similar manner to the above formula (5).
[0113] Wherein, t1_i is the inter-node line delay from the i-th EPA node to the i+1-th EPA node, t2_i is the node forwarding delay of the i-th EPA node, t3_i is the message occupancy time of the i-th EPA node (i.e., the message occupancy time ts mentioned above), t4_i is the total time occupied by the i-th EPA node, t6 is the message reservation time, t7 is the clock synchronization error of the EPA network 100, and when the EPA network 100 is a linear structure, n is the number of EPA nodes 110 included in the EPA network 100, and when the EPA network 100 is a star structure, n is the number of longest link devices in the EPA network 100.
[0114] Here, n has different meanings depending on the topological structure of the EPA network 100. For example, for the EPA network 100 with a ring structure represented by the above formulas (1) and (2), n is the number of EPA nodes 110 included in the EPA network 100, and n=m. For the EPA network 100 with a linear structure and a star structure represented by the above formulas (4) and (5), n is the number of EPA nodes 110 included in the EPA network 100 with a linear structure, and n=m, or n is the number of the longest link devices of the EPA network 100 with a star structure.
[0115] The number of devices in the longest link of the EPA network 100 is the number of devices (including the EPA nodes 110 and the switches 120) included in the longest link in the EPA network 100. Figure 1C In the example, the longest link of the EPA network 100 is the link from the EPA node 110-1 to the switch 120 and then to any one of the EPA nodes 110-2 and 110-4. The corresponding longest link device number is 3. Figure 1D In the figure, the longest link of the EPA network 100 is the link of EPA node 110-1→switch 120-1→switch 120-2→switch 120-3→EPA node 110-4, and the corresponding number of longest link devices is 5. That is, when determining the total time occupied by each EPA node 110, the delays of all links and devices on the maximum transmission path of the EPA node 110 need to be considered.
[0116] exist Fig. 7AIn the first transmission mode (relaxed mode) shown, a forward transmission offset time for forward transmission and a reverse transmission offset time for reverse transmission can be set for each EPA node 110, and the forward transmission offset time and the reverse transmission offset time are set equal. For example, the parameters in the above formulas (1) to (5) (such as the message reservation time t6) can be configured to make the forward transmission offset time equal to the reverse transmission offset time.
[0117] Figure 7B FIG. 1 shows a schematic diagram of the transmission of periodic messages of each EPA node 110 according to some other embodiments of the present invention. Figure 7B FIG. 1 is a schematic diagram of the transmission offset time of each EPA node 110 in the second transmission mode of the EPA network 100. In the second transmission mode, the transmission offset time of the forward transmission of the EPA node 110 and the transmission offset time of the reverse transmission are configured independently, and there is no correlation between the two, so it is also called the compact mode. Figure 7B The figure shows a one-way scheduling diagram in compact mode. After each EPA node completes forwarding the previous periodic message, it immediately sends the periodic message of this node. Figure 7B In the example, T1 is the sending offset time of EPA node 110-1, and T2 is the sending offset time of EPA node 110-2. Fig. 7A Similarly, t1_i is the inter-node line delay from the i-th EPA node to the i+1-th EPA node, t2_i is the node forwarding delay of the i-th EPA node, t3_i is the message occupancy time of the i-th EPA node (i.e., the message occupancy time ts mentioned above), and t4_i is the total time occupied by the i-th EPA node.
[0118] Depend on Figure 7B It can be seen that the total time t4 occupied by the EPA node 110-1 can be expressed as:
[0119] t4= t1+t2+t3+t5+t6+t7 (6)
[0120] That is, for the i-th EPA node 110, the total time t4_i occupied by the i-th EPA node can be determined by the node-to-node line delay t1 from the i-1-th EPA node to the i-th EPA node, the node forwarding delay t2 of the i-1-th EPA node, the message occupancy time t3 of the i-1-th EPA node (i.e., the message occupancy time ts mentioned above), the preset frame interval t5 (for example, the frame interval 12B shown in Table 1), the message reservation time t6, and the clock synchronization error t7 of the EPA network 100.
[0121] If the periodic message N1 forwarded by EPA node 110-2 does not conflict with the periodic message N2 sent by EPA node 110-1, EPA node 110-2 will send the periodic message N2 of this node at least at time T2 after the interval t4 from T1, that is,
[0122] T2=T1+t1+t2+t3+t5+t6+t7. (7)
[0123] In summary, the sending offset time configured by the current EPA node 110 = the sending offset time of the previous EPA node + the line delay between nodes t1 + the node forwarding delay t2 + the message occupying time t3 of the previous EPA node + the frame interval t5 + the message reservation time t6 + the clock synchronization error t7.
[0124] It can be seen that, compared with the loose mode, in the compact mode, the interval between the sending offset times of two adjacent EPA nodes is smaller, so that the bandwidth utilization is high.
[0125] At the same time, it should be noted that when the compact mode is used to configure the sending offset time, the order of configuring the sending offset time should be consistent with the order in which the EPA nodes 110 are connected. Figure 1A Taking the ring topology shown in as an example, when configuring the sending offset time of forward transmission, only the following four sequences can be used: EPA node 110-1→EPA node 110-2→EPA node 110-3→EPA node 110-4, EPA node 110-2→EPA node 110-3→EPA node 110-4→EPA node 110-1, EPA node 110-3→EPA node 110-4→EPA node 110-1→EPA node 110-2, and EPA node 110-4→EPA node 110-1→EPA node 110-2→EPA node 110-3.
[0126] Figure 7C Shown with Figure 7B Correspondingly, a schematic diagram of the transmission of periodic messages of each EPA node 110 according to other embodiments of the present invention. Figure 7B The difference is that Figure 7C The figure shows a schematic diagram of bidirectional scheduling in compact mode, wherein periodic messages for forward transmission are marked as N1, N2, N3, and N4, and periodic messages for reverse transmission are marked as N1', N2', N3', and N4'.
[0127] by Figure 1AAs an example, the EPA network 100 of the ring topology structure shown in FIG. 1 is assumed to be transmitted in the clockwise direction as forward transmission and in the counterclockwise direction as reverse transmission. Assuming that the forward transmission is transmitted in the manner of EPA node 110-1→EPA node 110-2→EPA node 110-3→EPA node 110-4, and the reverse transmission is transmitted in the manner of EPA node 110-1→EPA node 110-4→EPA node 110-3→EPA node 110-2, then according to the above combination Figure 7B A similar approach as described can be used to obtain Figure 7C The scheduled transmission results are shown.
[0128] exist Figure 7C In the second transmission mode (compact mode) shown, a forward transmission offset time for forward transmission and a reverse transmission offset time for reverse transmission can be set for each EPA node 110, and the forward transmission offset time and the reverse transmission offset time can be set independently. That is, the forward transmission offset time and the reverse transmission offset time can be the same or different. For example, the parameters in the above formulas (6) and (7) (such as the message reservation time t6) can be configured to set the same or different forward transmission offset time and reverse transmission offset time.
[0129] Fig.7D and Fig. 7E The following are schematic diagrams showing the transmission of periodic messages of various EPA nodes 110 according to some further embodiments of the present invention. Fig.7D Shown according to Figure 1C The transmission diagram of each EPA node 110 in the star-structured EPA network 100 in the first transmission mode (relaxed mode) is shown; Fig. 7E Shown according to Figure 1D The transmission diagram of each EPA node 110 in the star-shaped EPA network 100 in the first transmission mode (loose mode) is shown. Fig.7D and Fig. 7E , which can be combined with the above Figure 7B The transmission shaping time Tm and the sending offset time of each EPA node are determined similarly.
[0130] In summary, a more detailed flowchart of the process of determining the transmission offset time of the EPA node 110 (step 326) can be summarized as follows: Figure 8 as shown in .
[0131] exist Figure 8 In step 3262, for the first EPA node 110 (such as EPA node 110-1) in the EPA network 100, the sending offset of the first EPA node 110 is set to 0.
[0132] Next, in step 3264, for each EPA node 110 in the EPA network 100 except the first EPA node 110, the transmission shaping time Tm of the EPA node 110 can be determined based at least on the inter-node line delay t1 of the previous EPA node of the EPA node 110, the node forwarding delay t2, and the clock synchronization error t7 of the EPA network 100.
[0133] In the second transmission mode described above, each EPA node immediately sends its own periodic message after completing forwarding the previous periodic message. Therefore, in order to avoid interference between adjacent periodic messages, the transmission shaping time Tm may also include a frame interval t5 (for example, the 12B frame interval described in Table 1). Referring to the above formula (6), it can be seen that:
[0134] Tm=t1+t2+t5+t7 (8)
[0135] In the first transmission mode described above, each EPA node sends its own periodic message only after the periodic message of the previous EPA node has completed transmission in the entire EPA network. Therefore, the transmission shaping time Tm should include the transmission delay of the periodic message of the node in the entire network minus the forwarding delay of its own node. For the ring-structured EPA network, referring to the above formula (6), it can be known that:
[0136] (9)
[0137] Wherein, n is the number of EPA nodes 110 included in the EPA network 100, and in this case n=m.
[0138] For a linear or star-shaped EPA network, referring to the above formula (2), we can know that:
[0139] (10)
[0140] Wherein, n is the number of EPA nodes 110 included in the linear EPA network 100, in which case n=m, or n is the number of the longest link devices in the star EPA network 100.
[0141] In step 3266, the total time t4 occupied by the previous EPA node can be determined based on the transmission shaping time Tm of the EPA node 110, the message occupation time t3 of the previous EPA node and the message reservation time t6.
[0142] In some embodiments, for example, in combination with Fig. 7AIn the described relaxed mode, the total time occupied by the previous EPA node can be determined based on the line delay between nodes, the node forwarding delay, the number of EPA nodes 110 included in the EPA network 100, and the message occupation time of the previous EPA node.
[0143] For example, in the above combination Fig. 7A In the example shown, in the case of a ring topology, the total time taken by the previous EPA node 110 can be expressed as:
[0144] (11)
[0145] In the case of a linear or star topology, the total time taken by the previous EPA node 110 can be expressed as:
[0146] (12)
[0147] Among them, when the EPA network 100 is a linear structure, n is the number of EPA nodes 110 included in the EPA network 100, that is, n=m; when the EPA network 100 is a star structure, n is the number of the longest link devices of the EPA network 100.
[0148] Those skilled in the art will appreciate that, when actually calculating the sending offset time, it is possible to configure the EPA network 100 according to the above-mentioned ring topology regardless of the topology structure. This is because the total node occupancy time calculated in the ring topology is sufficient to ensure that the size of the sending offset time will not cause a conflict in periodic messages.
[0149] In other embodiments, for example, Figure 7B In the described compact mode, the total time occupied by the previous EPA node can be determined by summing the line delay between nodes, the node forwarding delay and the message occupying time of the previous EPA node of the current EPA node.
[0150] For example, in the above combination Figure 7B In the example shown, the total time t4 occupied by the previous EPA node 110 can be expressed as:
[0151] t4=t1+t2+t3+t5+t6+t7 (13)
[0152] Finally, in step 3268, the sending offset time of the EPA node 110 can be determined based on the sending offset time of the previous EPA node 110 of the EPA node 110 and the message occupancy time of the previous EPA node 110.
[0153] For example, for the above combination 7A to 7EThe total time t4 occupied by the previous EPA node determined in the loose mode and the compact mode described respectively can be summed with the sending offset of the previous EPA node of the EPA node to respectively determine the minimum value of the sending offset time of the EPA node in the two transmission modes.
[0154] On this basis, the control device 20 can also adjust the sending offset time of each EPA node 110 by setting different message reservation times t6, so that different configuration parameters can be set according to user needs.
[0155] Fig. 9 FIG. 9 is a block diagram of a control device 900 suitable for implementing an embodiment of the present disclosure. The control device 900 may be used to implement the following embodiments: Figures 1A to 1D The control device 20 shown in FIG.
[0156] like Fig. 9 As shown in , the control device 900 may include a processor 910. The processor 910 controls the operation and functions of the control device 900. For example, in some embodiments, the processor 910 may perform various operations with the help of instructions 930 stored in a memory 920 coupled thereto. The memory 920 may be of any suitable type suitable for the local technical environment and may be implemented using any suitable data storage technology, including but not limited to semiconductor-based memory devices, magnetic memory devices and systems, and optical memory devices and systems. Although Fig. 9 Only one memory 920 is shown in the figure, but those skilled in the art will appreciate that the control device 900 may include more physically different memories 920 .
[0157] The processor 910 may be of any suitable type suitable for the local technical environment, and may include, but is not limited to, one or more of a general-purpose computer, a special-purpose computer, a microprocessor, a digital signal processor (DSP), and a processor-based multi-core processor architecture. The control device 900 may also include multiple processors 910. The processor 910 is coupled to the transceiver 940, which can receive and send information with the help of one or more communication components. Figures 1A to 8 All the features described are applicable to the control device 900 and will not be described in detail here.
[0158] By utilizing the solution of the present invention, before the EPA network starts to operate or when a change occurs, a control device (also referred to as a host computer) connected to the EPA network can automatically calculate one or more groups of configuration parameters for the EPA network based on information of the EPA network (such as topology, number of nodes, amount of user data, etc.), each group of configuration parameters at least including a sending offset time of each EPA node, and the control device can configure the EPA network based on the determined configuration parameters or the configuration parameters selected according to user needs through Ethernet transmission (for example, in the form of UDP packets) between the control device and the EPA network, thereby greatly saving the manpower cost required for configuring the EPA network.
[0159] The present invention may be implemented as a method, an apparatus, a system and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for executing various aspects of the present invention.
[0160] In one or more exemplary designs, the functions described in the present invention may be implemented using hardware, software, firmware, or any combination thereof. For example, if implemented using software, the functions may be stored as one or more instructions or codes on a computer-readable medium, or transmitted as one or more instructions or codes on a computer-readable medium.
[0161] The various units of the apparatus disclosed herein may be implemented using discrete hardware components or may be integrated on a hardware component, such as a processor. For example, the various exemplary logic blocks, modules, and circuits described in conjunction with the present invention may be implemented or executed using a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof for performing the functions described herein.
[0162] Those skilled in the art should also understand that the various illustrative logical blocks, modules, circuits, and algorithm steps described in conjunction with the embodiments of the present invention may be implemented as electronic hardware, computer software, or a combination of the two.
[0163] The above description of the present invention is intended to enable any person of ordinary skill in the art to implement or use the present invention. Various modifications of the present invention are apparent to those of ordinary skill in the art, and the general principles defined herein may also be applied to other variations without departing from the spirit and scope of the present invention. Therefore, the present invention is not limited to the examples and designs described herein, but is consistent with the broadest range of principles and novel features disclosed herein.
Claims
1. A method for configuring an EPA network, comprising: before the EPA network starts to operate or when a change occurs, by a control device connected to the EPA network: Obtaining the number of EPA nodes included in the EPA network and the amount of user data of each EPA node; Determine the configuration parameters of the EPA network based on the number of EPA nodes included in the EPA network and the amount of user data of each EPA node, wherein the configuration parameters at least include the macrocycle length, the period time period length and the sending offset time of each EPA node in the macrocycle of the EPA network; as well as Based on the configuration parameters, the EPA network is configured through Ethernet transmission between the control device and the EPA network. Determining the configuration parameters of the EPA network includes: Determining the length of the periodic time period based on the number of EPA nodes included in the EPA network and the amount of user data of each EPA node; Determining a macrocycle length of the EPA network based on the periodic time period length and the non-periodic time period length; and For each EPA node in the EPA network, determining a sending offset time of the EPA node based on a sending offset time of a previous EPA node of the EPA node and a total time occupied by the previous EPA node, and In a transmission mode where the sending offset time of the forward transmission and the sending offset time of the reverse transmission of each EPA node of the EPA network are independently configured, the total time occupied by each EPA node is determined as follows: t4= t1+t2+t3+t5+t6+t7, Wherein t4 represents the total time occupied by the previous EPA node of the EPA node, t1 represents the inter-node line delay from the previous EPA node or switch of the EPA node to the EPA node, t2 represents the node forwarding delay of the previous EPA node or switch, t3 represents the message occupying time of the previous EPA node, t5 represents the frame interval, t6 represents the message reservation time of the EPA node, and t7 represents the clock synchronization error of the EPA network; In the transmission mode where each EPA node sends its own periodic message only after the periodic message of the previous EPA node has completed transmission in the entire EPA network, For a ring-structured EPA network, the total time occupied by the i-th EPA node is determined as follows: , Wherein, t1_i is the node line delay from the i-th EPA node to the i+1-th EPA node or switch, t2_i is the node forwarding delay of the i-th EPA node, t3_i is the message occupation time of the i-th EPA node, t4_i is the total time occupied by the i-th EPA node, t6 is the message reservation time, t7 represents the clock synchronization error of the EPA network, and when the EPA network is a ring structure, n is the number of EPA nodes contained in the EPA network; For a linear or star-structured EPA network, the total time occupied by the i-th EPA node is determined as follows: , Among them, t1_i is the inter-node line delay from the i-th EPA node to the i+1-th EPA node, t2_i is the node forwarding delay of the i-th EPA node, t3_i is the message occupancy time of the i-th EPA node, t4_i is the total time occupied by the i-th EPA node, t6 is the message reservation time, t7 represents the clock synchronization error of the EPA network, when the EPA network is a linear structure, n is the number of EPA nodes contained in the EPA network, when the EPA network is a star structure, n is the number of longest link devices in the EPA network.
2. The method of claim 1, wherein determining the periodic time period length comprises: For each EPA node, determining a message occupancy time of the EPA node based on the amount of user data of the EPA node; Determine the periodic time slice length of the EPA node based on the message occupancy time, transmission shaping time and message reservation time of the EPA node; as well as The periodic time slice lengths of all EPA nodes of the EPA network are summed to determine the periodic time period length of the EPA network.
3. The method of claim 1 , wherein determining the macrocycle length of the EPA network comprises: Determining the non-periodic time length based on a preset non-periodic reserved time slice and a clock synchronization error; as well as The periodic time period length and the non-periodic time period length are summed to determine a macrocycle length of the EPA network.
4. The method of claim 1, wherein determining the transmission offset time of the EPA node comprises: For a first EPA node in the EPA network, setting a sending offset time of the first EPA node to 0; For each EPA node other than the first EPA node in the EPA network, determining a transmission shaping time of the EPA node based at least on an inter-node line delay, a node forwarding delay, and a clock synchronization error of a previous EPA node of the EPA node; Determine the total time occupied by the previous EPA node based on the transmission shaping time of the EPA node, the message occupation time and the message reservation time of the previous EPA node of the EPA node; and The sending offset time of the EPA node is determined based on the sending offset time of the previous EPA node of the EPA node and the total time occupied by the previous EPA node.
5. The method as claimed in claim 1, wherein in a transmission mode in which each EPA node sends the periodic message of this node only after the periodic message of the previous EPA node has completed transmission in the entire EPA network, the sending offset time includes a forward sending offset time and a reverse sending offset time, and the forward sending offset time is set to be equal to the reverse sending offset time.
6. A control device comprising: A processor and a memory, wherein the memory includes instructions executable by the processor, and the processor is configured to cause the node device to execute the method according to any one of claims 1 to 5.
7. A computer-readable storage medium having a computer program code stored thereon, wherein the computer program code executes the method according to any one of claims 1 to 5 when executed.
