Deterministic time delay scheduling method for POWERLINK and TSN heterogeneous network
By formulating data priority division rules and dynamic calculation of delay allocation ratios in POWERLINK and TSN heterogeneous networks, combining the traffic information model and the generation of TSN gating lists, the deterministic and real-time requirements of data flows across network transmission in industrial networks are solved, and efficient data scheduling and load balancing in heterogeneous network environments are realized.
Patent Information
- Application Number
- CN202510241660.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-03
- Publication Date
- 2025-06-03
AI Technical Summary
In industrial networks, there are problems that deterministic and real-time requirements are difficult to meet in the cross-network transmission of multiple data streams, especially in POWERLINK and TSN heterogeneous network environments.
A deterministic delay scheduling method for heterogeneous networks of POWERLINK and TSN is proposed. By formulating data priority division rules, the priority of POWERLINK is mapped to the priority of TSN. Combined with the dynamic calculation of CNC, the allocation ratio of end-to-end total delay is allocated. By establishing a POWERLINK traffic information model and mapping it into the TSN network, a TSN gated list is generated to realize the optimized scheduling of data flow.
This method optimizes the data scheduling performance in heterogeneous network environment, meets the needs of real-time collaborative control tasks in industrial production, realizes load balancing and efficient data transmission, and supports the efficient development of smart factories.
Smart Images

Figure CN120090991A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of industrial networks and relates to a deterministic delay scheduling method for POWERLINK and TSN heterogeneous networks. Background Art
[0002] With the rapid development of the industrial Internet of Things and the in-depth promotion of intelligent manufacturing, emerging technologies such as 5G and Time-Sensitive Networking (TSN) are deeply integrating with industrial network technologies, driving the development of industrial networks towards high efficiency and intelligence. However, under the trend of the accelerating integration of operational technology (OT) and information technology (IT) in industrial fields, the networking, configuration, and scheduling of heterogeneous networks have become research hotspots in the academic and industrial communities. Especially in the face of diverse industrial field requirements, traditional industrial networks face many challenges in aspects such as coexistence of multiple standards, complex network topologies, obvious differences in data characteristics, and interconnection, making it difficult to fully support the requirements of real-time collaborative control tasks in industrial production, thus restricting the efficient development of intelligent factories.
[0003] In industrial networks, data streams, control streams, video streams, and management streams coexist, and the priority, real-time requirements, and deterministic requirements of various types of traffic are different. Due to the significant differences in the communication requirements of industrial devices in terms of data rate, latency, and reliability, how to achieve efficient data scheduling in the context of the integration of OT and IT has become a key issue. In this context, Time-Sensitive Networking (TSN), with its advantages of time synchronization, low latency, and high-deterministic data transmission, has gradually become the focus of industrial network research and application. By introducing a unified network transmission mode for periodic and aperiodic data, TSN not only improves bandwidth utilization but also significantly improves the transmission performance of time-sensitive data, ensuring low-latency and low-jitter transmission requirements, and becoming an important technology to promote the upgrade of industrial automation networks.
[0004] In the field of industrial Ethernet, POWERLINK, as a real-time industrial network technology based on standard Ethernet, has been widely used in the field of industrial automation. POWERLINK has the characteristics of high real-time performance, flexible configuration, and support for large-scale nodes, and can meet the high real-time and high-reliability requirements for data transmission in complex industrial fields. However, the deterministic transmission ability of traditional POWERLINK networks still needs to be further optimized to adapt to the complex requirements of various service types in the industrial Internet of Things. By deeply integrating POWERLINK with TSN, POWERLINK can not only inherit its high real-time performance advantage but also further achieve time synchronization and unified traffic management, thus significantly improving the data scheduling performance in heterogeneous network environments.
[0005] In terms of the scheduling of heterogeneous networks, industrial networks usually include various communication protocols and network types, such as industrial Ethernet, wired networks, and wireless networks. These networks are widely adopted due to their unique performance and application scenarios, but they also lead to problems such as low data transmission efficiency, uneven resource allocation, and increased difficulty in traffic scheduling. Summary of the Invention
[0006] In view of this, the purpose of the present invention is to provide a deterministic delay scheduling method for POWERLINK and TSN heterogeneous networks
[0007] To achieve the above purpose, the present invention provides the following technical solutions:
[0008] A deterministic delay scheduling method for POWERLINK and TSN heterogeneous networks, comprising the following steps:
[0009] S1: Formulate the data priority division rules of POWERLINK, and map the priorities of POWERLINK into the priorities of TSN for correspondence;
[0010] S2: The CNC dynamically calculates the allocation ratio of the end-to-end total delay allocated to the POWERLINK and TSN networks according to the data priority and network characteristics;
[0011] S3: Establish a POWERLINK traffic information model, define the POWERLINK data frame format for data transmission, and impose constraints on the POWERLINK network. Use the data stream transmission period, data stream length, and data type as the input of the POWERLINK traffic information model for scheduling calculation, and output the time slot allocation result of the system;
[0012] S4: Map the data stream of POWERLINK into the TSN network. According to the priority and size of the collected TSN frames, divide the transmission units in each queue, and determine the priorities of the transmission units, and finally generate a TSN gating list. The CNC completes all scheduling work.
[0013] Further, the data of POWERLINK is divided into 3 levels of priorities according to its real-time nature, importance, and communication requirements:
[0014] Real-time control data: It needs to be transmitted periodically and has strict requirements for delay and jitter, and is the highest priority;
[0015] Non-real-time management data: The requirement for delay is lower than that of real-time control data, but it still needs to be transmitted within a reasonable time, and is the medium priority;
[0016] Diagnostic and maintenance data: Non-real-time, can be processed later, and is the lowest priority;
[0017] TSN defines 8 priorities, where the lowest priority is 0 and the highest is 7. Therefore, map the 3rd priority of POWERLINK to the 8th priority of TSN to ensure that the real-time control data in POWERLINK also meets the deterministic transmission requirements in the TSN network, as follows:
[0018] Divide the POWERLINK data types into 8 types: network management information, isochronous synchronization data information, control information, monitoring information, non-emergency alarm information, non-real-time process data, non-critical data flow, background traffic or test data, corresponding to priorities 7 to 0 in sequence.
[0019] Furthermore, in step S2, the CNC distributes the end-to-end total delay D of high-priority data total to the TSN network and distributes the end-to-end total delay D of low-priority data total to the POWERLINK network. The end-to-end total delay D total is expressed as follows:
[0020] D total = D POWERLINK + D TSN
[0021] D POWERLINK = α × D total
[0022] D TSN = (1 - α) × D total
[0023]
[0024] The specific distribution steps are as follows:
[0025] The CNC calculates the delay weights on the POWERLINK side and the TSN side:
[0026] The delay weight on the POWERLINK side is affected by the following factors:
[0027] 1) Fixed cycle delay T cycle : The scheduling cycle of the master and slave nodes;
[0028] 2) Topological path length L POWEERLINK : The number of hops from the master node to the slave node;
[0029] 3) Priority sensitivity P relax : The maximum allowed delay, which decreases as the priority increases;
[0030]
[0031] The time delay weight on the TSN side is affected by the following factors:
[0032] 1) The time-aware scheduling delay T queue : The TSN scheduling period;
[0033] 2) Link bandwidth and transmission time T transmit ;
[0034] 3) The priority influence factor P boost : The higher the priority, the more weight is allocated;
[0035]
[0036] The CNC combines the two weights and dynamically calculates the time delay allocation ratio between the POWERLINK side and the TSN side:
[0037]
[0038] Furthermore, the POWERLINK traffic information model is as follows: Given a POWERLINK network with a known number of nodes N, for each node n i ∈N, encapsulate the load data on node n i into a data stream f i,k (L i,k , T i,k , D i,k , Type), where L i,k is the data length of the data stream load segment, T i,k is the sending period of the data stream, D i,k is the deadline of the data stream, and Type is the type of the data stream; δ represents the time slot length of the POWERLINK network; encapsulate the load data of the static segment into a data stream, use the static scheduling method to determine the sending time of the real-time periodic data stream, and optimize and reduce the number of used time slots allocated statically through time slot multiplexing.
[0039] Furthermore, constraints are imposed on the POWERLINK network, specifically including:
[0040] The lengths, sending periods, and deadlines of all data streams in the POWERLINK network are known. It is stipulated that the deadline of the data stream is equal to the sending period, that is, T i,k = D i,k , and the data stream transmission must be completed within the deadline, and the worst-case response time must be less than the deadline;
[0041] In the POWERLINK network, only the data of the same node can be encapsulated into one data stream, and it can only be uniquely encapsulated into one data stream;
[0042] Within one cycle period, the same data stream fi,k The different transmission time slot intervals should be greater than the transmission period T of the data stream f i,k i,k , represents the start time of the r-th transmission of the k-th data stream of the POWERLINK node i;
[0043] Within one cyclic scheduling period, the transmission of each data stream cannot exceed its maximum number of times, and each transmission cannot exceed the size of the allocated time slot resources.
[0044] Furthermore, in step S3, taking the data stream transmission period, the data stream length, and the data type as the inputs of the POWERLINK traffic information model for scheduling calculation and outputting the time slot allocation result of the system specifically includes the following steps:
[0045] S31: The POWERLINK network manager calculates the POWERLINK network cyclic scheduling period SC and the basic scheduling period BC. The cyclic scheduling period SC is the least common multiple of all POWERLINK data stream transmission periods, and the basic scheduling period BC is the greatest common divisor of all POWERLINK data stream transmission periods;
[0046] SC = LCM(T 1,1 , T 1,2 , …, T i,k )
[0047] BC = GCD(T 1,1 , T 1,2 , …, T i,k )
[0048] In the formula, T i,k is the transmission period of the k-th data stream of the POWERLINK node i;
[0049] The cyclic scheduling period SC is cyclically operated by multiple basic scheduling periods BC to ensure that all streams are transmitted at least once within one scheduling period and the number of transmissions is the same in each scheduling period. The POWERLINK network performs cyclic scheduling with the cyclic scheduling period as the basic unit;
[0050]
[0051] According to the content of the POWERLINK protocol, generate the system matrix period, and the system matrix period satisfies 2 restrictive conditions:
[0052] (1) The number of rows of the matrix basic period must be 2n, where n = 1, 2, 3, 4, 5, 6;
[0053] (2) The time lengths of the same column in the system matrix must be the same;
[0054] S32: The POWERLINK network manager calculates the number C of each POWERLINK data stream f to be transmitted within the cyclic scheduling period SC i,k that is, the number of basic cycle intervals within a cyclic period: i,k
[0055]
[0056] S33: The POWERLINK network manager calculates the transmission sequence V of each POWERLINK data stream f i,k ; Each data stream f i,k sends data cyclically from the sending end at a fixed sending interval; The data stream sending starts from time 0, and the transmission sequence V of stream f i,k within a cyclic scheduling period SC is: i,k i,k as follows:
[0057] V i,k = {0, T i,k , 2T i,k , 3T i,k , …, nT i,k}
[0058] S34: Calculate the slot length T occupied by the transmission window of a data stream slot :
[0059]
[0060] L frame = L data + L overhead
[0061] S35: The POWERLINK network manager obtains the total slot requirement of P. There are N real-time data streams in total, so the total isochronous synchronization window duration is:
[0062]
[0063] T async = T cycle - T iso
[0064] The asynchronous window duration is the total communication cycle duration minus the isochronous synchronization window duration. T iso shall not exceed the maximum allowable duration of T cycle otherwise, the data stream or communication cycle needs to be adjusted;
[0065] S36: Within the cyclic period SC, the POWERLINK network manager performs operations on the POWERLINK data stream f i,kSort in ascending order according to the business type Type from low to high, and for the same type, sort in ascending order of the cycle from small to large, and for the same cycle, sort in descending order of the length value to obtain the POWERLINK finite data flow queue Q to be scheduled:
[0066]
[0067] S37: The POWERLINK network manager initializes all the to-be-allocated time slots within the scheduling cycle SC to the idle state;
[0068] S38: The POWERLINK network manager processes each real-time data flow f in the Q list i,k , arranges the time slot length C required for the data flow transmission window within SC i,k , and the time interval between adjacent data flows is equal to an integer multiple of BC; schedule the POWERLINK data flows in the Q list in sequence, allocate time slots for their transmission tasks within each scheduling cycle, and output the transmission scheduling scheme for all POWERLINK data flows.
[0069] Furthermore, in step S3, a genetic algorithm is introduced in the time slot allocation optimization process on the POWERLINK side, which specifically includes the following steps:
[0070] (1) Encoding: The time slot optimization method adopts an integer encoding method, and the value of the gene in the chromosome represents the column number of the corresponding data flow in the system matrix; for the data flows with a cycle equal to the basic cycle, they are not scheduled and not encoded in the chromosome, and the rest of the data flows are encoded in the chromosome;
[0071] (2) Fitness function: The fitness function of the genetic algorithm is related to the optimization objective; in the POWERLINK system matrix cycle, on the basis of ensuring the schedulability of periodic data flows, increase the length of the arbitration window as much as possible to ensure the transmission of aperiodic data flows, which is described as follows:
[0072]
[0073] In the formula, j represents the data flow serial number, i represents the column number in the system matrix cycle, x ij represents whether the data flow with serial number j exists in column i with a value of 1 or 0, C j represents the maximum transmission time of the data flow with serial number j; the second indicates that any data flow appears and only appears in one column, which is naturally established for the above encoding method; take the sum of the maximum values of the data flows in each column as the total time of the exclusive window column, and obtain its minimum value as the final optimization objective, without considering the constraint conditions, and the fitness function is expressed as follows:
[0074]
[0075] (3) Constraints: including POWERLINK matrix column capacity constraint and network delay constraint;
[0076] Matrix cycle column capacity constraint:
[0077]
[0078] In the formula, w j represents the number of data stream j in the system matrix cycle, and W i represents the total number of rows in each column. SC is the system matrix cycle, BC is the basic cycle, and T j is the cycle of data stream j;
[0079] Delay constraint: Assume that the sequence numbers of two data streams corresponding to a control loop in the system are j 1 and j 2 , and their cycles are both BC. In a certain chromosome, the corresponding columns are i 1 and i 2 , i 1 is less than i 2 and i 1 is greater than i 2 . Their maximum network delays are respectively expressed as:
[0080] (i 2 - i 1 ) * C max + T j2 ≤ T d
[0081] BC - (i 2 - i 1 - 1) * C min ≤ T d
[0082] In the formula, C max and C min represent the maximum and minimum transmission times in the data stream set, T j2 is the transmission time of data stream j 2 , and T d is the maximum value of the delay constraint; when the data stream cycle is not equal to the basic cycle, analyze according to the actual situation of the matrix cycle;
[0083] (4) Handling of constraints:
[0084] Taking the case where the delay constraint is only when i 1 is less than i 2 , rewrite the fitness function as the following formula:
[0085]
[0086]
[0087] where P 0 and P 1 represent penalty functions corresponding to column capacity constraints and delay constraints respectively, and a 0 and a 1 are called penalty factors.
[0088] Furthermore, the POWERLINK network manager optimally schedules aperiodic traffic during the asynchronous phase. According to the priority and corresponding frame length of each aperiodic traffic, the knapsack algorithm is used to process the aperiodic queue, and an aperiodic traffic queue with the largest sum of priorities is obtained, which specifically includes the following steps:
[0089] First, define r aperiodic traffic queues, expressed as:
[0090] S = {S 0 , S 1 , …, S r-1 , S r}
[0091] where r ∈ [0, 6], and r represents the number in the aperiodic queue;
[0092] Secondly, define the data frames in each queue as:
[0093] S i = {S i,0 , S i,1 , …, S i,n-1 , S i,n}
[0094] where n represents the label of the data frame in the queue. For example, S i,n represents the nth frame in queue i
[0095] Then, define the priority of the data frames in each queue as:
[0096] P i = {P i,0 , P i,1 , …, P i,n-1 , P i,n}
[0097] where n represents the label of the data frame in the queue. For example, P i,n represents the priority of the nth frame in queue i;
[0098] Next, the frame length of the data frames in each queue is expressed as:
[0099] D i = {d i,0 , d i,1 , …, di,n-1 , d i,n}
[0100] Where \(i\in[0, r]\), \(d\) i,n \(\in[64\ bytes, 1499\ bytes]\), \(d\) i,n represents the frame length of the \(n\)th frame of the \(i\)th queue;
[0101] Finally, the best result corresponding to the solution of this problem is expressed as:
[0102]
[0103] bw nT \(= bw - bw\) T
[0104] y i,j \(\in\{0, 1\}\), \(i\in[0, r]\), \(j\in[0, n]\)
[0105] p i,j \(\in P\) i , \(i\in[0, r]\), \(j\in[0, n]\)
[0106] h i,j \(\in D\) i , \(i\in[0, r]\), \(j\in[0, n]\)
[0107] Where, represents the aperiodic traffic queue with the largest sum of priorities, \(y\) i,j represents the scheduling indication function of the \(j\)th data frame of the \(i\)th aperiodic queue, \(y\) i,j \(= 1\) indicates that the \(j\)th data frame of the \(i\)th aperiodic queue participates in scheduling, \(y\) i,j \(= 0\) indicates that the \(j\)th data frame of the \(i\)th aperiodic queue does not participate in scheduling, \(p\) i,j represents the priority of the \(j\)th data frame of the \(i\)th aperiodic queue, \(r\) represents the number of aperiodic queues, \(n\) represents the number of data frames in an aperiodic queue; \(bw\) represents the total bandwidth resource in a continuous period, \(bw\) T and \(bw\) nT respectively represent the bandwidth resources required to transmit periodic traffic and aperiodic traffic in a continuous period; \(h\) i,j represents the frame length of the \(j\)th data frame of the \(i\)th aperiodic queue.
[0108] Furthermore, mapping the data stream of POWERLINK into the TSN network in step S4 specifically includes:
[0109] Data stream classification: Classify the data stream into different priorities according to the real-time requirements of the data stream;
[0110] Queue mapping: Map data streams with different priorities to the transmission queues of TSN;
[0111] Scheduling calculation: Calculate the transmission time and path of the data stream in the TSN network according to the characteristics of the data stream;
[0112] Configuration distribution: Distribute the calculated scheduling policy to the relevant devices in the TSN network.
[0113] Furthermore, in step S4, TSN provides multiple transmission queues, maps data streams with different priorities to the corresponding queues, and based on the time slot allocation scheduling algorithm of the multi-level queue, inputs the parameters of all data streams, schedules the transmission of each data stream on the TSN side, and outputs an arrangement plan of all frame transmission windows for all data streams. Only one priority of data can be transmitted in each transmission unit. According to the priority and size of the collected TSN frames, divide the transmission units in each queue and determine the priority of the transmission units, and finally generate a TSN gating list, which specifically includes the following steps:
[0114] S41: Select the largest and smallest data frames in the data packet;
[0115] S42: Group all frames according to the sizes of the selected largest and smallest frames;
[0116] S43: Sort each group of data streams according to their sizes and establish corresponding queues for each data stream; the queues are sorted according to the priority of the frame size; the priority of each queue depends on the size of the data stream carried by it and the real-time requirement;
[0117] S44: CNC allocates time windows for each queue, calculates the size of the time window according to the data traffic and transmission requirements of each queue, and ensures that data streams with higher priorities can be transmitted within shorter time windows;
[0118] S45: Schedule according to the priority of the data stream; sort according to the priority of each queue;
[0119] S46: For each group, calculate the final priority of each group according to the frame size, real-time requirement and importance of the data stream in the group;
[0120] S47: After CNC completes the priority calculation of the grouping, check whether there are any remaining frames or data streams that need to be further grouped; if so, continue grouping; otherwise, it means that CNC has completed all scheduling work.
[0121] The beneficial effects of the present invention are as follows: In view of the requirements for determinism and real-time performance of various data streams in industrial networks during cross-network transmission, the present invention proposes an industrial heterogeneous network scheduling method for the interconnection of POWERLINK and TSN, optimizing the configuration of network resources and the scheduling of traffic to meet the bandwidth requirements of various services in the heterogeneous network, achieving load balancing, and providing an efficient solution for the integration of industrial Internet of Things heterogeneous networks. This research has important theoretical and practical significance for promoting the development of intelligent manufacturing.
[0122] Other advantages, objectives, and features of the present invention will be described to some extent in the subsequent specification, and to some extent, will be obvious to those skilled in the art based on the study of the following text, or can be taught from the practice of the present invention. The objectives and other advantages of the present invention can be achieved and obtained through the following specification. Brief Description of the Drawings
[0123] In order to make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be described in detail preferably with reference to the accompanying drawings, where:
[0124] Figure 1 is the networking architecture of POWERLINK and TSN heterogeneous networks;
[0125] Figure 2 is the scheduling architecture of POWERLINK and TSN heterogeneous networks;
[0126] Figure 3 is the POWERLINK data frame;
[0127] Figure 4 is the POWERLINK communication process;
[0128] Figure 5 is the isochronous synchronization data scheduling flowchart;
[0129] Figure 6 is the initialization of the POWERLINK time slot table;
[0130] Figure 7 is the coding schematic diagram of the genetic algorithm;
[0131] Figure 8 is the schematic diagram of the multi-level queue;
[0132] Figure 9 is the flowchart of the time slot allocation scheduling algorithm based on the multi-level queue;
[0133] Figure 10 is the schematic diagram of the TSN switch priority filtering;
[0134] Figure 11are the weights on the POWERLINK side and the weights on the TSN side;
[0135] Figure 12 is the allocated time slot length. Specific implementation manners
[0136] The following uses specific specific examples to illustrate the implementation manners of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific implementation manners. Various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the diagrams provided in the following embodiments only illustrate the basic concept of the present invention in a schematic manner. Without conflict, the following embodiments and the features in the embodiments can be combined with each other.
[0137] It should be noted that the diagrams provided in the following embodiments only illustrate the basic concept of the present invention in a schematic manner. Therefore, only the components related to the present invention are shown in the diagrams, rather than being drawn according to the number, shape, and size of the components in actual implementation. The type, quantity, and ratio of each component in actual implementation can be arbitrarily changed, and the component layout type may also be more complex.
[0138] In the following description, a large number of details are explored to provide a more thorough explanation of the embodiments of the present invention. However, it is obvious to those skilled in the art that the embodiments of the present invention can be implemented without these specific details. In other embodiments, well-known structures and devices are shown in the form of block diagrams rather than in detail to avoid making the embodiments of the present invention difficult to understand.
[0139] In view of the deterministic and real-time requirements of various data flows in industrial networks during cross-network transmission, the present invention focuses on researching an industrial heterogeneous network scheduling method for the interconnection of POWERLINK and TSN, optimizing the configuration of network resources and the scheduling of traffic to meet the bandwidth requirements of various services in heterogeneous networks, achieving load balancing, and providing an efficient solution for the integration of industrial Internet of Things heterogeneous networks. This research has important theoretical and practical significance for promoting the development of intelligent manufacturing.
[0140] As Figure 1 shown, the access side of the heterogeneous network networking architecture of POWERLINK and TSN adopts the POWERLINK protocol, and the transmission side adopts the TSN protocol. The POWERLINK network consists of a POWERLINK master station and POWERLINK slave stations; the TSN network consists of a TSN switch, a new type of industrial multi-network fusion gateway, and TSN terminals, where the TSN switch adopts a ring topology structure.
[0141] This method combines the POWERLINK network topology and the characteristics of TSN, and designs a heterogeneous network scheduling architecture for POWERLINK and TSN, as Figure 2 shown, which consists of a user plane, a control plane, and a data plane.
[0142] User plane: It is composed of user plane APPs. Its function is to provide users with visual data and options. The data can facilitate users to understand the status of the entire network, and the options can facilitate users to issue commands to the network to control the network.
[0143] Control plane: The control plane consists of an Industrial Software Defined Controller (ISDC), a CNC configuration interface, and a POWERLINK network system manager. The industrial software defined controller consists of a cooperative scheduling subsystem, a northbound interface, a southbound interface, and a west-east interface. The function of the cooperative scheduling subsystem is to use the scheduling method and calculate with the status data of the network as the input, and output the scheduling results for the entire industrial heterogeneous network; the function of the northbound interface is to interact with the user plane, so as to send the status information of the network or receive the commands of the users; the function of the southbound interface is to interact with the CNC configuration interface, so as to obtain the status data of TSN and issue the scheduling results; the westward interface is responsible for interacting with the POWERLINK network system manager, so as to obtain the status data of the POWERLINK network and issue the scheduling results. The function of the CNC configuration interface is to receive the scheduling results from the cooperative scheduling subsystem and configure them to the TSN switch, so as to complete the scheduling of TSN. The function of the POWERLINK network system manager is to receive the scheduling results from the cooperative scheduling subsystem and configure them to the POWERLINK master station, so as to complete the scheduling of the POWERLINK network.
[0144] Data plane: The data plane consists of a POWERLINK network and a TSN network, and is used to implement the forwarding of POWERLINK data. After the POWERLINK master station receives the scheduling results from the POWERLINK network system manager, it manages the data and information sent from the master station to each slave station through the SoC frame. After TSN receives the scheduling scheme from the CNC configuration interface, it will change its gating list and forward the data stream according to the gating list during data transmission.
[0145] The scheduling algorithm described in the present invention depends on the urgency of the data. In TSN, the urgency of the data is reflected in the form of priorities. The data in the industrial control process may not have been assigned priorities, so rules for dividing the transmission priorities of data streams should be formulated to divide the priorities of the data in the industrial control process to ensure that these data can adapt to the scheduling algorithm proposed in the present invention.
[0146] In a time-sensitive network, the forwarding time of data streams is crucial. For example, if a data frame carrying urgent security data is not forwarded in time, it may lead to serious production safety accidents. To meet the requirements of different data streams for transmission delay, bandwidth, etc., a total of 8 priorities are defined in TSN, where the lowest priority is 0 and the highest is 7. The higher the priority, the more likely it is to be scheduled first. By introducing the concept of priority, network resources in the time-sensitive network can be allocated according to the urgency as much as possible, ensuring the determinacy of data transmission.
[0147] Although the concept of priority already exists in the time-sensitive network, the POWERLINK network does not have a mechanism to assign priorities to its data streams according to the urgency of the data information of a certain service. When the data stream of the POWERLINK network enters the time-sensitive network, the time-sensitive network cannot know the priority of the data stream, and thus has no way to use TAS to schedule the data stream. To enable the data stream of the POWERLINK network to continue to be transmitted after entering the time-sensitive network, it is necessary to extend the mechanism of data stream transmission priority to the entire network.
[0148] Therefore, according to the urgency of different services, this method assigns different transmission priorities to the data streams of different services and ensures the corresponding relationship of priorities in the POWERLINK network and the time-sensitive network.
[0149] The data transmission of POWERLINK mainly includes the following categories, and priorities are assigned according to its real-time nature, importance, and communication requirements:
[0150] (1) Real-time control data (highest priority), including sensor status, actuator control signals, motion control data, etc. These data need to be transmitted periodically and have strict requirements for delay and jitter.
[0151] (2) Non-real-time management data (medium priority), including network configuration, status monitoring, parameter adjustment, etc. These data have lower requirements for delay, but still need to be transmitted within a reasonable time.
[0152] (3) Diagnostic and maintenance data (lowest priority), including error logs, diagnostic information, statistical data, etc. This type of data is usually non-real-time and can be processed later.
[0153] The delay requirements of the data types in this embodiment are shown in Table 1.
[0154] Table 1
[0155]
[0156] Data with high priority should remain high priority in both POWERLINK and TSN networks to ensure that real-time data is preferentially transmitted across the entire heterogeneous network. Data with medium and low priorities can be dynamically adjusted according to bandwidth and load conditions, but the performance of high-priority data should not be affected. Through range division and merging, this method determines appropriate mapping rules to map the 3-level priority of POWERLINK to the 8-level priority of TSN, ensuring that real-time control data in POWERLINK also meets the deterministic transmission requirements in the TSN network, such as low latency and low jitter. The priority mapping is shown in Table 2.
[0157] Table 2
[0158]
[0159] The term definitions in this solution are shown in Table 3.
[0160] Table 3
[0161]
[0162]
[0163]
[0164] End-to-end total delay D total Is allocated to the POWERLINK and TSN networks by the CNC, and the allocation ratio is dynamically calculated by the CNC according to data priority and network characteristics. Since high-priority data is sensitive to delay, the CNC allocates the end-to-end total delay D of high-priority data total More to the TSN network with higher real-time performance. Low-priority data allows for a greater transmission delay, so the CNC allocates the end-to-end total delay D of low-priority data total Mainly to the POWERLINK network.
[0165] D total = D POWERLINK + D TSN (1)
[0166] D POWERLINK = α × D total (2)
[0167] D TSN = (1 - α) × D total (3)
[0168]
[0169] The CNC calculates the delay weights on the POWERLINK side and the TSN side:
[0170] 1. The time delay weight on the POWERLINK side is affected by the following factors:
[0171] 1) Fixed cycle time delay T cycle : The scheduling cycle of the master and slave nodes.
[0172] 2) Topological path length L POWERLINK : The number of hops from the master node to the slave node.
[0173] 3) Priority sensitivity P relax : The maximum allowed delay, which decreases as the priority increases.
[0174]
[0175] 2. The time delay weight on the TSN side is affected by the following factors:
[0176] 1) Time-aware scheduling time delay T queue : The TSN scheduling cycle.
[0177] 2) Link bandwidth and transmission time T transmit 。
[0178] 3) Priority influence factor P boost : The higher the priority, the more weight is assigned.
[0179]
[0180] The CNC combines the above weights and dynamically calculates the time delay allocation ratio between the POWERLINK side and the TSN side:
[0181]
[0182] Resource allocation of the data stream on the POWERLINK side:
[0183] This method first establishes a POWERLINK traffic information model. On the POWERLINK side, this method defines a POWERLINK data frame format for data transmission. This format uses the Type field to distinguish the priorities of different types of data, and the smaller the TYPE value, the higher the priority. This method takes the data stream transmission cycle, data stream length, and data type as inputs for scheduling calculations and outputs the time slot allocation results of the system.
[0184] This method gives a POWERLINK network with a known number of nodes N. For each node n i ∈N, encapsulate the load data on node n i into a data stream f i,k (L i,k ,T i,k ,D i,k, Type), L i,k is the data length of the data stream payload segment, T i,k is the transmission period of the data stream, D i,k is the deadline of the data stream, and Type is the type of the data stream; δ represents the slot length of the POWERLINK network. The load data of the static segment is encapsulated into a data stream, and a static scheduling method is used to determine the transmission time of the real-time periodic data stream. Through slot multiplexing, the number of used slots allocated statically is optimized and reduced to improve the bandwidth utilization rate of POWERLINK and ensure the overall real-time performance and scalability of the system.
[0185] Before scheduling, the following constraints need to be imposed on the POWERLINK network:
[0186] 1. The lengths, transmission periods, and deadlines of all data streams in the POWERLINK network are known. It is stipulated that the deadline of the data stream is equal to the transmission period, that is, T i,k = D i,k , and the data stream transmission must be completed within the deadline, and the worst-case response time should be less than the deadline.
[0187] 2. Only the data of the same node in the POWERLINK network can be encapsulated into one data stream, and it can only be uniquely encapsulated into one data stream.
[0188] 3. In one cycle period, for the same data stream f i,k the intervals of different transmission time slots should be greater than the transmission period of the data stream f i,k where represents the start time of the r-th transmission of the k-th data stream of POWERLINK node i.
[0189] 4. In one cycle scheduling period, each data stream transmission cannot exceed its maximum number of times and each transmission cannot exceed the allocated slot resource size.
[0190] The POWERLINK data frame is embedded in the data segment of the standard Ethernet data frame. Because the POWERLINK data packet has the frame header and frame tail of the standard Ethernet data frame. For example Figure 3 from the 14th byte to the nth byte is the POWERLINK data frame information, and the 0th to 13th bytes are the frame header of the standard Ethernet.
[0191] The POWERLINK scheduling algorithm is as follows: As Figure 4 shown, the time period from the SoC data frame to the SoA data frame is the isochronous synchronization phase. When the isochronous synchronization phase is completed, the system enters the asynchronous phase. The asynchronous phase starts from the SoA data frame and lasts until the Asnd frame ends. When the asynchronous phase ends, it enters the idle phase.
[0192] Isochronous synchronization phase:
[0193] Input: POWERLINK real-time periodic data stream f i,k transmission period T i,k frame length L i,k and type Type.
[0194] Output: Time slot interval of the data stream transmission window within a scheduling period.
[0195] The resource allocation process of the entire real-time periodic data is as Figure 5 shown.
[0196] In the POWERLINK network, the POWERLINK master station MN is responsible for controlling the communication process. Each POWERLINK cycle is divided into multiple phases, and the isochronous synchronization phase is used for the transmission of real-time data. In the isochronous synchronization phase, the MN accesses each slave station CN in turn through the PollRequest frame. After each slave node receives the PollRequest frame, it immediately sends a PollResponse frame. The polling request mechanism of POWERLINK ensures that each node communicates within its own time slot, avoids data conflicts, and realizes real-time synchronization.
[0197] The detailed execution process of the deterministic delay scheduling method for the POWERLINK and TSN heterogeneous network is as follows:
[0198] 1. The POWERLINK network manager calculates the POWERLINK network cyclic scheduling period SC and the basic scheduling period BC. The calculation methods are as shown in formulas (8)-(9). The cyclic scheduling period SC is the least common multiple of all POWERLINK data stream transmission periods, and the basic scheduling period BC is the greatest common divisor of all POWERLINK data stream transmission periods; the cyclic scheduling period SC is composed of a certain number of basic scheduling periods BC running in a loop, which can ensure that all streams are transmitted at least once within one scheduling period and the number of transmissions is the same in each scheduling period. The POWERLINK network will also perform cyclic scheduling with the cyclic scheduling period as the basic unit.
[0199] SC = LCM(T 1,1 , T 1,2 ,..., T i,k ) (8)
[0200] BC = GCD(T 1,1 , T 1,2 ,..., T i,k ) (9)
[0201] In the formula, T i,kis the transmission period of the k-th data stream of POWERLINK node i.
[0202]
[0203] System matrix period generation: According to the content of the POWERLINK protocol, the system matrix period must meet two constraints:
[0204] (1) The number of rows of the matrix basic period must be 2n, where n = 1, 2, 3, 4, 5, 6.
[0205] (2) The time lengths of the same column in the system matrix must be the same. Under such constraints, how to generate the system matrix period according to the properties of the data streams such as the period and transmission time is the first step in the implementation of the POWERLINK protocol and also plays a decisive role in the subsequent work. In many cases, the attributes of the data streams are not ideal and the matrix that meets the constraint conditions cannot be directly generated, and flexible changes are needed to generate the initial matrix.
[0206] 2. The POWERLINK network manager calculates the number C of each POWERLINK data stream f i,k that needs to be transmitted within the cyclic scheduling period SC i,k , that is, the number of basic period intervals in a cyclic period. The calculation formula is as shown in (11), and SC is the least common multiple of the data stream transmission periods.
[0207]
[0208] 3. The POWERLINK network manager calculates the transmission sequence V i,k of each POWERLINK data stream f i,k . Each data stream f i,k sends data cyclically at a fixed sending interval from the sending end. The data stream sending starts from the 0 moment, and the sending sequence V i,k of the stream f i,k within a cyclic scheduling period SC is as shown in formula (12).
[0209] V i,k = {0, T i,k , 2T i,k , 3T i,k ,..., nT i,k} (12)
[0210] 4. Calculate the time slot length T occupied by the transmission window of a data stream from formula (13) slot .
[0211]
[0212] L frame = L data + L overhead (14)
[0213] 5. The POWERLINK network manager obtains the total time slot requirements of P. For N real-time data streams, the total isochronous synchronization window duration is:
[0214]
[0215] T async = T cycle - T iso (16)
[0216] The asynchronous window duration is the total communication cycle duration minus the isochronous synchronization window duration, T iso shall not exceed the maximum allowable duration of T cycle otherwise, the data stream or communication cycle needs to be adjusted.
[0217] 6. Within the cycle period SC, the POWERLINK network manager sorts the POWERLINK data streams f i,k in ascending order of service type Type from low to high, in ascending order of the same type cycle from small to large, and in descending order of the length value for the same cycle, to obtain the queue Q of POWERLINK finite data streams to be scheduled.
[0218]
[0219] 7. The POWERLINK network manager initializes all the to-be-allocated time slots within the scheduling cycle SC to the idle state, as Figure 6 shown.
[0220] 8. For each real-time data stream f in the Q list, the POWERLINK network manager i,k needs to arrange the time slot length C required for the data stream transmission window within SC i,k , and the time interval between adjacent data streams should be equal to an integer multiple of BC. Schedule the POWERLINK data streams in the Q list in sequence, allocate time slots for their transmission tasks within each scheduling cycle, and output the transmission scheduling scheme for all POWERLINK data streams.
[0221] Based on the ordinary time slot allocation table, to further reduce the end-to-end delay, a genetic algorithm is introduced for time slot allocation optimization on the POWERLINK side. Genetic Algorithms is a search algorithm that imitates the behavior of chromosomes in the biological evolution process and seeks the optimal solution through the natural selection method. The specific steps are as follows:
[0222] (1) Encoding: As Figure 7As shown, the time slot optimization method adopts an integer coding method, and the value of the gene in the chromosome is used to represent the column number of the corresponding data stream in the system matrix. Since the mutual correlation between data streams is considered, all data streams are encoded in the chromosome in the algorithm. In this method, data streams with a period equal to the basic period are not scheduled and thus not encoded in the chromosome.
[0223] (2) Fitness function: The fitness function of the genetic algorithm is related to the optimization goal. In the POWERLINK system matrix cycle, on the basis of ensuring the schedulability of periodic data streams, the length of the arbitration window is increased as much as possible to ensure the transmission of aperiodic data streams, which is the main purpose of system scheduling optimization. The following formula describes this goal in a mathematical form:
[0224]
[0225]
[0226] In the above two formulas, j represents the data stream serial number, i represents the column number in the system matrix cycle, and x ij represents whether the data stream with serial number j in column i exists with a value of 1 or 0, and C j represents the maximum transmission time of the data stream with serial number j. The second one means that any data stream appears and only appears in one column, which naturally holds for the above coding method. Equation (18) takes the sum of the maximum values of the data streams in each column as the total time of the exclusive window columns, and obtaining its minimum value is the final optimization goal. Without considering the constraint conditions, the fitness function can be expressed as follows:
[0227]
[0228] (3) Constraint conditions: Include POWERLINK matrix column capacity constraint and network delay constraint. Matrix cycle column capacity constraint: After the system matrix design is initialized, its number of rows is determined, that is, for any column in the matrix, its capacity is also determined. If multiple data stream coding values appear in the same column during encoding, the column capacity will be exceeded. Therefore, the column capacity must be constrained. Equations (21)-(23) represent this constraint:
[0229]
[0230]
[0231]
[0232] In Equation (21), w j represents the number of data stream j in the system matrix cycle, and W iIndicates the total number of rows in each column, which are obtained from equations (22) and (23) respectively, where SC is the system matrix period, generally the least common multiple or an integer multiple of all data stream periods, BC is the basic period, and T j is the period of data stream j.
[0233] Delay constraint: As mentioned above, to ensure the system control performance, delay constraints must be added during scheduling optimization. Delay constraints have multiple combination forms according to the data stream period and the constraint range. An example is as follows: Suppose the sequence numbers of two data streams corresponding to a control loop in the system are j 1 and j 2 , their periods are both BC, and the corresponding columns in a certain chromosome are i 1 and i 2 respectively. Equations (24) and (25) respectively represent the expressions of the maximum network delay when i 1 is less than i 2 and i 1 is greater than i 2 :
[0234] (i 2 - i 1 ) * C max + T j2 ≤ T d (24)
[0235] BC - (i 2 - i 1 - 1) * C min ≤ T d (25)
[0236] In the equations, C max and C min represent the maximum and minimum transmission times in the data stream set, T j2 is the transmission time of data stream j2, and T d is the maximum value of the delay constraint obtained from equation (24). When the data stream period is not equal to the basic period, the situation is more complex and can be analyzed according to the actual situation of the matrix period in the above method.
[0237] (4) Handling of constraint conditions:
[0238] In the genetic algorithm, constraint conditions usually adopt the method of penalty function. The factors that do not meet the constraints are added to the fitness function with the influence of the penalty function to reduce their fitness, thereby reducing the probability of their inheritance to the next generation. Since the optimization goal of the fitness function adopted in this algorithm is the minimum value, the penalty function factor can be set as a positive value and added to the fitness function. Taking the delay constraint that only i 1 is less than i 2In the case of 0 and P 1 represent the penalty functions corresponding to the column capacity constraint and the delay constraint respectively, and a 0 and a 1 are called penalty factors.
[0239]
[0240]
[0241]
[0242] Asynchronous phase:
[0243] In the asynchronous phase, the POWERLINK network manager mainly optimizes and schedules aperiodic traffic. According to the priority and corresponding frame length of each aperiodic traffic, the knapsack algorithm is used to process the aperiodic queue to obtain an aperiodic traffic queue with the largest sum of priorities.
[0244] First, define r aperiodic traffic queues, expressed as:
[0245] S = {S 0 , S 1 , …, S r-1 , S r} (29)
[0246] where r ∈ [0, 6], and r represents the number in the aperiodic queue;
[0247] Secondly, define the data frames in each queue as:
[0248] S i = {S i,0 , S i,1 , …, S i,n-1 , S i,n} (30)
[0249] where n represents the label of the data frame in the queue. For example, S i,n represents the nth frame in queue i
[0250] Secondly then, define the priority of the data frames in each queue as:
[0251] P i = {P i,0 , P i,1 , …, P i,n-1 , P i,n} (31)
[0252] where n represents the label of the data frame in the queue. For example, P i,nIndicates the priority of the nth frame in queue i;
[0253] Then, the frame length of the data frames in each queue is expressed as:
[0254] D i ={d i,0 , d i,1 , …, d i,n-1 , d i,n} (32)
[0255] where i ∈ [0, r], d i,n ∈ [64 bytes, 1499 bytes], d i,n represents the frame length of the nth frame in the ith queue.
[0256] Finally, the best result corresponding to the solution of this problem can be expressed as:
[0257]
[0258]
[0259] bw nT = bw - bw T (35)
[0260] y i,j ∈ {0, 1}, i ∈ [0, r], j ∈ [0, n]
[0261] p i,j ∈ P i , i ∈ [0, r], j ∈ [0, n]
[0262] h i,j ∈ D i , i ∈ [0, r], j ∈ [0, n]
[0263] where, represents the non-periodic traffic queue with the largest sum of priorities, y i,j represents the scheduling indication function of the jth data frame in the ith non-periodic queue, y i,j = 1 indicates that the jth data frame in the ith non-periodic queue participates in scheduling, y i,j = 0 indicates that the jth data frame in the ith non-periodic queue does not participate in scheduling, p i,j represents the priority of the jth data frame in the ith non-periodic queue, r represents the number of non-periodic queues, n represents the number of data frames in a non-periodic queue; bw represents the total bandwidth resource in a continuous period, bw T and bw nT respectively represent the bandwidth resources required to transmit periodic traffic and non-periodic traffic in a continuous period; hi,j Denotes the frame length of the j-th data frame in the i-th non-periodic queue.
[0264] Resource allocation of the data stream on the TSN side: Map the data stream of POWERLINK into the TSN network to ensure real-time transmission of data and effective utilization of network resources. The main steps include:
[0265] 1) Data stream classification: Classify the data stream into different priorities according to its real-time requirements.
[0266] 2) Queue mapping: Map data streams with different priorities to the transmission queues of TSN.
[0267] 3) Scheduling calculation: Calculate the transmission time and path of the data stream in the TSN network according to the characteristics of the data stream.
[0268] 4) Configuration distribution: Distribute the calculated scheduling strategy to relevant devices in the TSN network.
[0269] As Figure 8 shown, TSN provides multiple transmission queues (usually 8, with priorities from 0 to 7), and maps data streams with different priorities to the corresponding queues. The time-slot allocation scheduling algorithm based on multi-level queues schedules the transmission of each data stream on the TSN side according to the parameters of all input data streams, and outputs an arrangement plan of all frame transmission windows for all data streams. Only one data with a single priority can be transmitted in each transmission unit. Each transmission unit in the upper-level queue is smaller and changes more frequently, so that some smaller frames can be transmitted without occupying a long time and can be switched to the next priority frame for transmission as soon as possible after transmission. Each transmission unit in the lower-level queue is larger and changes less frequently, so that some larger frames can be transmitted in one go as much as possible and not be interrupted during transmission, thus increasing the transmission time of this frame.
[0270] Divide the transmission units in each queue according to the priority and size of the collected TSN frames, and determine the priority of the transmission units, and finally generate a TSN gating list. The flowchart is as Figure 9 shown, and the filtering schematic diagram is as Figure 10 shown, including the following steps:
[0271] 1. Select the largest and smallest data frames in the data packet to ensure that the TSN network can adapt to various data stream sizes when processing frames with different priorities, so as to make a reasonable schedule.
[0272] 2. Based on the sizes of the selected maximum and minimum frames, group them first. The specific grouping method is to classify based on the frame size to ensure high efficiency in processing each group. The frame sizes within each group should be relatively consistent to avoid complexity and latency during processing.
[0273] 3. Sort each group of data streams according to their sizes and establish corresponding queues for each data stream. These queues will be sorted by priority according to the frame size. The priority of each queue depends on the size of the data stream it carries and the real-time requirements.
[0274] 4. The CNC assigns time windows to each queue. The size of the time window is calculated based on the data traffic and transmission requirements of each queue. At this time, ensure that data streams with higher priorities can be transmitted within shorter time windows. To better manage these queues, the allocation of time windows takes into account not only the traffic but also the overall transmission capacity and bandwidth resources of the network.
[0275] 5. After assigning time windows to each queue, schedule according to the priority of the data streams. Data streams with higher priorities will be processed first. Especially for data streams with high real-time requirements (such as process data in POWERLINK), they will be placed in queues with higher priorities for scheduling.
[0276] The scheduling process involves sorting according to the priority of each queue to ensure that queues with higher priorities receive as much bandwidth resource as possible.
[0277] 6. For each group, the system calculates the final priority of the group based on the frame size, real-time requirements, and importance of the data streams within the group. The priority calculation is usually completed according to the size of the data stream and the requirements of network transmission. If a data stream is very sensitive to latency, its priority will be increased accordingly. Conversely, data streams with stronger non-real-time characteristics can be assigned lower priorities.
[0278] 7. After the CNC completes the priority calculation of the groups, the system checks whether there are any remaining frames or data streams that need to be further grouped. If so, continue grouping; otherwise, the CNC scheduling work will enter the final stage. At this point, the system continuously optimizes the grouping of data streams to ensure reasonable allocation of the priority and processing time of each group.
[0279] Finally, after the CNC is scheduled through the above steps, all data streams have been reasonably allocated to the time windows of the TSN network. All real-time data will be transmitted through the Time-Triggered mechanism, and non-real-time data can be flexibly scheduled according to the bandwidth. Finally, the CNC completes all scheduling tasks, and the transmission of data streams in the TSN network is fully optimized, meeting the latency requirements and priority requirements between POWERLINK and the TSN network.
[0280] The gating list is shown in Table 4.
[0281] Table 4
[0282]
[0283] Example 1
[0284] 1. There are the following data streams to be scheduled. Determine the transmission order according to the traffic type and period of the data streams.
[0285] Communication period T cycle = 1.2 ms, network rate R = 100 Mbps, 5 real-time data streams with lengths of: 80 bytes, 120 bytes, 200 bytes, 140 bytes, 180 bytes. Ethernet overhead L overhead = 26 bytes.
[0286] Table 5 shows the input of the data streams
[0287] Table 5
[0288] Serial number Data flow priority Data flow period / us Data flow size / Byte Time slot length / us F1 7 400 80 1.06 F2 6 600 120 1.46 F3 4 1200 200 2.26 F4 5 800 140 1.66 F5 3 1200 180 2.06
[0289] 2. Detailed calculation process:
[0290] 1) Calculate the single-stream time slot:
[0291]
[0292]
[0293] 2) Calculate the real-time window:
[0294] T iso = T slot,1 + T slot,2 + T slot,3 + T slot,4 + T slot,5
[0295] = 1.06 + 1.46 + 2.26 + 1.66 + 2.06 = 8.5 μs
[0296] 3) Calculate the asynchronous window
[0297] T async = T cycle -T iso = 1200 - 8.5 = 1191.5 μs
[0298] 4) Verify the allocation
[0299] Real - time window ratio:
[0300]
[0301] The allocation meets the conditions, and there is still enough remaining bandwidth in the asynchronous window.
[0302] The weights on the POWERLINK side and the TSN side are as Figure 11 shown, the allocated time - slot length is as Figure 12 shown. The end - to - end delay without using any scheduling algorithm is shown in Table 6, and the end - to - end delay using this scheduling algorithm is shown in Table 7.
[0303] Table 6
[0304]
[0305] Table 7
[0306]
[0307] The average delay results in the table show that when using this scheduling algorithm to forward the adaptive traffic with different real - time requirements, the average delays of the F1, F2, and F4 data streams with relatively high real - time requirements are reduced by 14 μs, 6 μs, and 5 μs respectively, accounting for 5.1%, 2.2%, and 4.7% of the delays before optimization respectively.
[0308] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the purpose and scope of the present technical solution, and they should all be covered by the scope of the claims of the present invention.
Claims
1. A method for deterministic delay scheduling of POWERLINK and TSN heterogeneous networks, characterized by: The following steps are involved: S1: Formulate POWERLINK data priority rules and map POWERLINK priorities to TSN priorities; S2: CNC dynamically calculates the allocation ratio of the total end-to-end latency allocated to the POWERLINK and TSN networks based on data priority and network characteristics; S3: Establish a POWERLINK traffic information model, define the POWERLINK data frame format used for data transmission, and constrain the POWERLINK network. Use the data stream transmission period, data stream length, and data type as inputs of the POWERLINK traffic information model for scheduling calculations, and output the system's time slot allocation results. S4: Map the POWERLINK data stream to the TSN network. According to the priority and size of the collected TSN frames, divide the transmission units in each queue and determine the priority of the transmission units. Finally, a TSN gating list is generated, and CNC completes all scheduling work.
2. The method for deterministic delay scheduling of POWERLINK and TSN heterogeneous networks according to claim 1 is characterized in that: POWERLINK data is divided into three levels of priority according to its timeliness, importance and communication requirements: Real-time control data: requires periodic transmission, has strict latency and jitter requirements, and is the highest priority; Non-real-time management data: has lower latency requirements than real-time control data, but still needs to be transmitted within a reasonable time. It has medium priority. Diagnostic and maintenance data: non-real-time, can be processed later, and has the lowest priority; TSN defines 8 priorities, with the lowest priority being 0 and the highest being 7. Therefore, the 3-level priority of POWERLINK is mapped to the 8-level priority of TSN to ensure that the real-time control data in POWERLINK also meets the deterministic transmission requirements in the TSN network. The details are as follows: The POWERLINK data types are divided into eight types: network management information, isochronous data information, control information, monitoring information, non-emergency alarm information, non-real-time process data, non-critical data flow, background traffic or test data, corresponding to priority levels 7 to 0 respectively.
3. The method for deterministic delay scheduling of POWERLINK and TSN heterogeneous networks according to claim 1, characterized in that: In step S2, the CNC calculates the end-to-end total delay D of the high priority data. total Assign it to the TSN network and reduce the end-to-end total delay D of low-priority data total Distributed to the POWERLINK network, the end-to-end total delay D total It is expressed as follows: D total =D POWERLINK +D TSN D POWERLINK =α×D total D TSN =(1-a)×D total The specific allocation steps are as follows: CNC calculates the latency weights of the POWERLINK side and the TSN side: The POWERLINK-side latency weight is affected by the following factors: 1) Fixed period delay T cycle : Scheduling period of master and slave nodes; 2) Topological path length L POWEERLINK : Number of hops from the master node to the slave node; 3) Priority sensitivity P relax : The maximum delay allowed, which decreases as the priority increases; The TSN side latency weight is affected by the following factors: 1) Time-aware scheduling delay T queue :TSN scheduling cycle; 2) Link bandwidth and transmission time T transmit ; 3) Priority impact factor P boost : The higher the priority, the more weight is assigned; CNC combines the two weights to dynamically calculate the latency distribution ratio between the POWERLINK side and the TSN side:
4. The method for deterministic delay scheduling of POWERLINK and TSN heterogeneous networks according to claim 1, characterized in that: The POWERLINK traffic information model is: given a POWERLINK network with a known number of nodes N, for each node n i ∈N, node n i The payload data on the i,k (L i,k ,T i,k ,D i,k ,Type),L i,k is the data length of the data stream payload segment, T i,k is the sending period of the data stream, D i,k is the deadline of the data stream, and Type is the type of the data stream; δ represents the time slot length of the POWERLINK network; the load data of the static segment is encapsulated into a data stream, and the static scheduling method is used to determine the sending time of the real-time periodic data stream. The number of statically allocated time slots is optimized and reduced through time slot multiplexing.
5. The method for deterministic delay scheduling of POWERLINK and TSN heterogeneous networks according to claim 1, characterized in that: Constrain the POWERLINK network, including: The length, transmission cycle and deadline of all data streams in the POWERLINK network are known. The deadline of the data stream is equal to the transmission cycle, that is, T i,k =D i,k , data stream transmission must be completed within the deadline, and the worst response time must be less than the deadline; In a POWERLINK network, only data from the same node can be encapsulated into one data stream, and can only be encapsulated into one data stream; In one cycle, the same data stream f i,k The interval between different transmission time slots should be larger than the data flow f i,k The sending cycle T i,k , Indicates the start time of the rth transmission of the kth data stream of POWERLINK node i; In a cyclic scheduling period, each data stream cannot be transmitted more than the maximum number of times, and each transmission cannot exceed the allocated time slot resource size.
6. The method for deterministic delay scheduling of POWERLINK and TSN heterogeneous networks according to claim 1, characterized in that: Step S3 uses the data stream transmission period, data stream length and data type as inputs of the POWERLINK traffic information model to perform scheduling calculations and output the time slot allocation results of the system, specifically including the following steps: S31: The POWERLINK network manager calculates the POWERLINK network cyclic scheduling period SC and the basic scheduling period BC, the cyclic scheduling period SC being the least common multiple of all POWERLINK data stream transmission periods, and the basic scheduling period BC being the greatest common divisor of all POWERLINK data stream transmission periods; SC=LCM(T 1,1 ,T 1,2 ,…,T i,k ) BC=GCD(T 1,1 ,T 1,2 ,…,T i,k ) Where, T i,k is the transmission period of the kth data stream of POWERLINK node i; The cyclic scheduling cycle SC is cyclically operated by multiple basic scheduling cycles BC to ensure that all flows are transmitted at least once in one scheduling cycle and the number of transmissions is the same in each scheduling cycle. The POWERLINK network uses the cyclic scheduling cycle as the basic unit for cyclic scheduling; According to the POWERLINK protocol content, the system matrix cycle is generated. The system matrix cycle meets two constraints: (1) The number of rows in the matrix basic period must be 2n, where n = 1, 2, 3, 4, 5, 6; (2) The time length of the same column in the system matrix must be the same; S32: The POWERLINK network manager calculates each POWERLINK data flow f i,k The number of packets that need to be transmitted within the cyclic scheduling period SC is C. i,k , that is, the number of basic period intervals in a cycle: S33: The POWERLINK network manager calculates each POWERLINK data flow f i,k The sending sequence V i,k ; Each data stream f i,k The sending end sends data cyclically at a fixed sending interval; the data stream starts at time 0, and the stream f i,k The sending sequence V in a cyclic scheduling period SC i,k for: V i,k ={0,T i,k ,2T i,k ,3T i,k ,…,nT i,k } S34: Calculate the time slot length T occupied by a data stream transmission window slot : L frame =L data +L overhead S35: The POWERLINK network manager obtains the total time slot requirement of P. There are N real-time data streams in total, so the total isochronous synchronization window duration is: T async =T cycle -T iso The asynchronous window duration is the total communication cycle duration minus the isochronous synchronization window duration, T iso Not to exceed T cycle The maximum allowed duration, otherwise the data flow or communication cycle needs to be adjusted; S36: In the cycle SC, the POWERLINK network manager processes the POWERLINK data stream f i,k According to the service type Type from low to high, the same type of period is sorted from small to large, and the same period is arranged from large to small according to the length value, and the POWERLINK limited data flow queue Q to be scheduled is obtained: S37: The POWERLINK network manager initializes all the time slots to be allocated in the scheduling period SC to an idle state; S38: The POWERLINK network manager processes each real-time data stream in the Q list. i,k , arrange the time slot length C required for the data stream transmission window in SC i,k , and the time interval between adjacent data flows is equal to an integer multiple of BC; schedule the POWERLINK data flows in the Q list in turn, allocate time slots to their transmission tasks in each scheduling cycle, and output the transmission scheduling plan for all POWERLINK data flows.
7. The method for deterministic delay scheduling of POWERLINK and TSN heterogeneous networks according to claim 1, characterized in that: In step S3, a genetic algorithm is introduced into the time slot allocation optimization process on the POWERLINK side, which specifically includes the following steps: (1) Coding: The time slot optimization method uses integer coding, and the value of the gene in the chromosome represents the column number of the corresponding data stream in the system matrix. Data streams with a period equal to the basic period are not scheduled and are not encoded in the chromosome. The remaining data streams are encoded in the chromosome. (2) Fitness function: The fitness function of the genetic algorithm is related to the optimization goal. In the POWERLINK system matrix cycle, on the basis of ensuring that the periodic data flow can be scheduled, the length of the arbitration window is increased as much as possible to ensure the transmission of the non-periodic data flow, as described as follows: In the formula, j represents the data stream number, i represents the column number in the system matrix period, and x ij The value 1 or 0 indicates whether the data stream with number j in column i exists. j The first one represents the maximum transmission time of the data stream with sequence number j; the second one represents that any data stream appears and only appears in one column, which is naturally true for the above encoding method; the sum of the maximum values of the data streams in each column is taken as the total time of the exclusive window column, and obtaining its minimum value is the final optimization goal. Without considering the constraints, the fitness function is expressed as follows: (3) Constraints: including POWERLINK matrix column capacity constraints and network delay constraints; Matrix period column capacity constraint: In the formula, w j represents the number of data stream j in the system matrix cycle, W i Indicates the total number of rows in each column, SC is the system matrix period, BC is the basic period, T j is the period of data stream j; Delay constraint: Assume that the serial numbers of the two data streams corresponding to a control loop in the system are j1 and j2, and their periods are both BC. The corresponding columns in a chromosome are i1 and i2, and the maximum network delay when i1 is less than i2 and i1 is greater than i2 is expressed as: (i2-i1)*C max +T j2 ≤T d BC-(i2-i1-1)*C min ≤T d In the formula, C max and C min represents the maximum and minimum transmission time in the data flow set, T j2 is the transmission time of data stream j2, T d is the maximum value of the delay constraint; when the data flow period is not equal to the basic period, analysis is performed based on the actual situation of the matrix period; (4) Processing of constraints: When the delay constraint is only when i1 is less than i2, the fitness function is rewritten as follows: Where P0 and P1 represent the penalty functions corresponding to the column capacity constraint and delay constraint respectively, and a0 and a1 are called penalty factors.
8. The method for deterministic delay scheduling of POWERLINK and TSN heterogeneous networks according to claim 1, characterized in that: The POWERLINK network manager optimizes the scheduling of non-periodic traffic in the asynchronous phase. According to the priority and corresponding frame length of each non-periodic traffic, the backpack algorithm is used to process the non-periodic queue to obtain the non-periodic traffic queue with the largest sum of priorities. Specifically, the following steps are included: First, define r non-periodic traffic queues, expressed as: S={S0,S1,…,S r-1 ,S r } Where r∈[0,6], r represents the number in the non-periodic queue; Secondly, define the data frame in each queue as: S i ={S i,0 ,S i,1 ,…,S i,n-1 ,S i,n } Where n represents the number of the data frame in the queue, such as S i,n Indicates the nth frame in queue i Next, define the priority of the data frame in each queue as: P i ={P i,0 ,P i,1 ,…,P i,n-1 ,P i,n } Where n represents the number of the data frame in the queue, such as P i,n Indicates the priority of the nth frame in queue i; Then, the frame length of the data frame in each queue is expressed as: D i ={d i,0 ,d i,1 ,…,d i,n-1 ,d i,n } where i∈[0,r], d i,n ∈[64bytes,1499bytes],d i,n Indicates the frame length of the nth frame in the i-th queue; Finally, the best solution to this problem is expressed as: bw nT =bw-bw T y i,j ∈{0,1},i∈[0,r],j∈[0,n] p i,j ∈P i ,i∈[0,r],j∈[0,n] h i,j ∈D i ,i∈[0,r],j∈[0,n] in, represents the non-periodic traffic queue with the largest sum of priorities, y i,j represents the scheduling indicator function of the jth data frame of the i-th non-periodic queue, y i,j =1 means that the jth data frame of the i-th non-periodic queue participates in the scheduling, y i,j = 0 means that the jth data frame of the i-th non-periodic queue does not participate in the scheduling, p i,j represents the priority of the jth data frame in the ith non-periodic queue, r represents the number of non-periodic queues, n represents the number of data frames in a non-periodic queue; bw represents the total bandwidth resources in a continuous cycle, bw T and bw nT They represent the bandwidth resources required to transmit periodic traffic and non-periodic traffic in a continuous cycle respectively; h i,j Indicates the frame length of the j-th data frame of the i-th non-periodic queue.
9. The method for deterministic delay scheduling of POWERLINK and TSN heterogeneous networks according to claim 1, characterized in that: Step S4 maps the POWERLINK data stream to the TSN network, specifically including: Data flow classification: classify data flows into different priorities according to their real-time requirements; Queue mapping: Mapping data streams of different priorities to TSN transmission queues; Scheduling calculation: Calculate the transmission time and path of the data flow in the TSN network according to its characteristics; Configuration delivery: The calculated scheduling strategy is delivered to the relevant devices in the TSN network.
10. The method for deterministic delay scheduling of POWERLINK and TSN heterogeneous networks according to claim 1, characterized in that: In step S4, TSN provides multiple transmission queues, maps data streams of different priorities to corresponding queues, and based on the time slot allocation scheduling algorithm of the multi-level queue, inputs the parameters of all data streams, schedules the transmission of each data stream on the TSN side, and outputs a transmission window arrangement scheme for all frames of all data streams. Only one priority data can be transmitted in each transmission unit. According to the priority and size of the collected TSN frames, the transmission units in each queue are divided, and the priority of the transmission unit is determined, and finally a TSN gating list is generated, which specifically includes the following steps: S41: Select the largest and smallest data frames in the data packet; S42: grouping all frames according to the sizes of the selected maximum frame and minimum frame; S43: sorting each group of data flows according to their size, and establishing a corresponding queue for each data flow; the queues are prioritized according to the size of the frames; the priority of each queue depends on the size of the data flow it carries and the real-time requirement; S44: CNC allocates a time window to each queue and calculates the size of the time window based on the data flow and transmission requirements of each queue to ensure that data flows with higher priority can be transmitted within a shorter time window; S45: Scheduling according to the priority of the data flow; sorting according to the priority of each queue; S46: for each packet, calculating the final priority of each packet according to the frame size, real-time requirements and importance of the data stream in the packet; S47: After completing the priority calculation of the grouping, the CNC checks whether there are any remaining frames or data streams that need to be further grouped; if so, the grouping continues; otherwise, it means that the CNC has completed all scheduling work.
Citation Information
Cited By
TSN-oriented real-time encryption cooperative scheduling method, system and device and medium
CN120567580A
Communication cooperative control method of a remote controller test device and a production line system
CN122661149A