Background
Because ethernet was too early to be invented, the problem of real-time information transmission was not considered, and a reliable transport mechanism for transporting data packets in sequence could not be provided. Therefore, the data is not buffered (Buffer) when all the packets are to be sorted. However, once the buffering mechanism is adopted, a new problem, namely great 'delay', is caused.
Currently, mainstream automation manufacturers release respective TSN products or test products, such as B & R, SPS, and TSN products in 2017, SIEMENS, Hannovei, 2018, Profinet over TSN, and Mitsubishi, 2019, and CC-Link IE TSN products. TSN switch products have also been released by foreign vendors such as TTTech, CISCO, hesmann, etc. The domestic manufacturers mainly adopt China to finish the development work of the original TSN switch, but do not enter the batch stage.
The real-time communication system composed of the TSN switch replaces the communication system composed of the existing Ethernet switch, all the sampling data in the distributed energy regulation and control task are positioned under the same time section, the time/time sequence of the control task can be measured and predicted, and important technical support is provided for establishing a high-efficiency and low-cost source/network/storage/load regulation and control center. Therefore, the design of TSN switch must be greatly improved in the following aspects:
1) according to the time predictable simulation example of project research, after the adjustable resources in the power grid change, peak clipping and valley filling are carried out in a long period through the coordinated control of the power grid, the distributed power supply and the controllable load, the consumption of new energy is maximized, the out-of-limit is eliminated in a short period, the voltage qualification rate is improved, and therefore the utilization rate of the power grid assets is improved.
2) The adaptive capacity (fast message goose, high-speed measurement message SMV, file message MMS, etc.) to various types of communication loads, mainly improves the technical indexes in the aspect of communication delay of high-speed communication messages, and improves the support level of a communication system to increasingly complex digital and automatic data transmission.
3) The method reduces the increasing communication construction cost at present, further reduces the construction cost of a communication system through the application of a new technology, the improvement of a network structure and the establishment of an open and standardized system, and promotes the popularization and the application of a real-time communication technology.
Disclosure of Invention
The communication device based on time sensitivity provided by the embodiment of the application is used for solving the problem of real-time transmission of Ethernet data and solving the problems of time sequence, low delay and flow shaping of the data in the Ethernet transmission.
Specifically, the communication device based on time sensitivity provided by the embodiment of the present application includes:
the time synchronization module is used for filtering, marking, VID translating, unpacking and packaging the data to be transmitted;
the scheduling and shaping module is used for scheduling the equipment participating in the transmission of the data to be transmitted;
and the fault-tolerant module is used for providing bandwidth and time slot reservation for the equipment participating in the transmission of the data to be transmitted.
Optionally, the time synchronization module is specifically configured to perform:
time synchronization is performed in the gPTP in the same manner as in ieee std 1588-2008:
in the time synchronization process, the received master clock sends synchronization time information to all time sensing systems directly connected with the time synchronization module;
after receiving the synchronous time information, the control time perception system superposes the transmission time information transmitted from the master clock to the current node to correct the synchronous time information.
Optionally, the method further includes:
and if the time perception system is a time perception network bridge, controlling the time perception system to forward the corrected delay synchronization time information containing the additional forwarding process to other time perception systems.
Optionally, the method further includes:
a time interval is obtained that includes a dwell time and a transmission path delay of the synchronization time information between the two time aware systems.
Optionally, the method further includes a step of obtaining the transmission path delay, and specifically includes:
measuring a time when a certain message is transmitted from one device and a time when the message is received by another device in a delay measurement technique of the TSN;
another message is sent in the opposite direction and the same measurements are performed.
Optionally, the scheduling shaping module is specifically configured to:
a mechanism for switch control is dynamically provided for egress queues based on a pre-defined periodic gate control list.
Optionally, the fault tolerant module is specifically configured to:
the protection bandwidth representing the maximum ethernet frame transmission length needs to be set before the transmission is started in its entirety.
Optionally, the fault tolerant module is specifically configured to:
a frame preemption mechanism in 802.3TG is adopted, a given outlet is divided into 2 MAC service interfaces which are respectively called as preemptable MAC and fast MAC, wherein pMAC is allowed to be preempted by eMAC;
optionally, the fault tolerant module is specifically configured to:
a transfer process representing preemption is performed at the connection layer interface.
The beneficial effect that technical scheme that this application provided brought is:
all the sampling data in the distributed energy regulation and control task are under the same time section, the time/time sequence of the control task can be measured and predicted, and an important technical support is provided for a high-efficiency and low-cost source/grid/storage/load regulation and control center established by a power company. The problem of Ethernet data real-time transmission is solved, and the problems of time sequence, low delay and flow shaping of the data in the Ethernet transmission are solved.
Detailed Description
To make the structure and advantages of the present application clearer, the structure of the present application will be further described with reference to the accompanying drawings.
As shown in fig. 1, the communication device based on time sensitivity according to an embodiment of the present application includes:
the time synchronization module is used for filtering, marking, VID translating, unpacking and packaging the data to be transmitted;
the scheduling and shaping module is used for scheduling the equipment participating in the transmission of the data to be transmitted;
and the fault-tolerant module is used for providing bandwidth and time slot reservation for the equipment participating in the transmission of the data to be transmitted.
In the implementation of the method, the first step of the method,
the TSN is mainly used to solve the problem of real-time transmission of ethernet data, that is, to solve the problems of time sequence, low delay and traffic shaping of data in ethernet transmission, and mainly implements algorithms in three aspects, including time synchronization, scheduling and traffic shaping, selection of communication path, path reservation and fault tolerance.
Based on time sensitive communication devices, in the delay measurement technique of TSN, there are different methods to measure the propagation time for each type of local area network or transmission path. However, these methods are all based on the same principle: the time when a message is sent from one device and the time when the message is received by another device are measured, and then another message is sent in the opposite direction and the same measurements are performed. In this process, Pdelay may be calculated as follows.
The delay measurement of the network has two methods, namely a 1-step method and a 2-step method. Since there may be a node in the network that cannot provide an accurate clock. For time-aware nodes, each node carries time information since the time information is sent with the data payload. For some non-time-aware networks, it is necessary to send a transmission time information to another node after sending a data frame.
Based on time sensitive communication devices, in the TAS mechanism, in order to ensure that the network is idle before data transmission, a guard bandwidth (guardband) needs to be set before the whole transmission is initiated. Guardband occupies the maximum ethernet frame transmission length to ensure the worst case-even if a standard ethernet frame is transmitting ahead, it will not let the GCL occupy the network before restarting the next cycle.
The communication equipment based on time sensitivity is characterized in that an IEEE 802.3br, namely a preemptive MAC mechanism, is jointly developed by an 802.1Qbu and an IEEE 802.3 working group of TSN. The transmission mechanism based on the preemptive MAC adopts a frame preemptive mechanism in 802.3TG, and a given outlet is divided into 2 MAC service interfaces which are respectively called as preemptible MAC (pAMC-preemptible MAC) and fast MAC (eMAC-express MAC). The pMAC can be preempted by the eMAC, and after entering the data stack, the eMAC data transmission is waited to be completed and then transmitted.
The application adopts the 1028A chip of the NXP as a main chip, and the chip has the important characteristics of real-time processing, accurate time synchronization protocol, built-in TSN switch subsystem, support of TSN terminal nodes and the like. The main characteristics include:
the method is characterized in that: adopting an NXP Layerscape LS1028A SoC as a main chip;
the second characteristic: a dual 64-bit Arm v8 processor for real-time processing;
the characteristics are three: support for TSN configuration support and IEEE 1588 precision time protocol;
the characteristics are as follows: a TSN switch interface for industrial bridge applications;
the characteristics are as follows: 2 independent Ethernet controllers supporting TSN, which is suitable for TSN terminal application.
The communication equipment based on time sensitivity is characterized in that the software design main characteristics comprise:
the method is characterized in that: based on the Linux platform 3-layer architecture design, a TSN protocol stack is positioned on a Kernel layer, and a configuration tool is positioned on User-Space;
the second characteristic: the software adopts a modular design, the protocol stacks are low in coupling, and independent configuration is supported;
the characteristics are three: the TSN configuration tool is internally provided with initialization parameters, and the use threshold of a user is reduced.
In general, an ethernet switch is divided into two parts,
namely a Control Plane (Control Plane) and a Data Plane (Data Plane),
the control plane mainly uses software to implement auto-configuration features and services,
and the data plane solves the MAC and forwarding tasks and is realized by adopting hardware.
Specifically, the control plane employs a logical link control protocol (LLC) to handle communications between the bottom layer and the upper layer, obtain network protocol data and add control information to facilitate the data being transmitted to the target; the data layer adopts MAC to form a sublayer of a data link layer, is realized by hardware, and has two main functions of data encapsulation and media access control.
For an ethernet switch supporting a bridging function, the data plane mainly includes the following tasks:
task one: the tasks of the entry include filtering, (de) tagging, VID translation, unpacking/packing;
and a second task: relay realizes forwarding and filtering tasks
And a third task: egress implements filtering, (de) tagging, VID translation, encapsulation/unpacking, metering, queuing, transport selection.
The same is true for TSN ethernet switches, in which point the TSN is not different from a normal switch. The difference is that the TSN implements the design of various traffic scheduling algorithms, i.e. the design of the traffic shaper, on the Control plane (Control Panel), as shown in fig. 1.
The TSN is mainly used to solve the problem of ethernet data real-time transmission, i.e. to solve the problems of data timing, low delay and traffic shaping in ethernet transmission, and mainly implements three algorithms,
including time synchronization (all devices in the network need a common time reference, need to synchronize clocks with each other);
scheduling and traffic shaping (all devices participating in real-time communication follow the same rules in processing and forwarding communication packets);
selection of communication path, path reservation and fault tolerance (all devices participating in real-time communication follow the same rules in selecting communication path and reserving bandwidth and time slots, and multiple paths may be utilized to achieve troubleshooting).
The three algorithms are as follows.
For a network clock, the clock synchronization accuracy is mainly determined by the residence time (latency) and the link latency (link latency).
Optionally, the time synchronization module is specifically configured to perform:
time synchronization is performed in the gPTP in the same manner as in ieee std 1588-2008:
in the time synchronization process, the received master clock sends synchronization time information to all time sensing systems directly connected with the time synchronization module;
after receiving the synchronous time information, the control time perception system superposes the transmission time information transmitted from the master clock to the current node to correct the synchronous time information.
In implementation, in the gPTP, the process of time synchronization is the same as ieee std 1588 + 2008: the master clock sends synchronized time information to all time aware systems directly connected to it. These time aware systems must correct the synchronization time information after receiving it by adding the transmission time of the information from the master clock to the node. If this time-aware system is a time-aware bridge, it must forward the modified synchronization time information (including additional delay in the forwarding process) to the other time-aware systems to which it is connected. The delay in the data transfer process is shown. These delays can be accurately calculated.
Optionally, the method further includes:
and if the time perception system is a time perception network bridge, controlling the time perception system to forward the corrected delay synchronization time information containing the additional forwarding process to other time perception systems.
A Time Aware Shaper (TAS), defined by IEEE 802.1Qbv, is a mechanism that dynamically provides on/off control for egress queues based on a pre-defined periodic gating control list. Qbv defines a Time window and is a Time-triggered network (Time-triggered). This window is predetermined in this mechanism. This gated list is periodically scanned and the transmission ports are opened for the different queues in a predefined order.
The egress hardware has 8 software queues, each with a unique transmission selection algorithm. The transmission is controlled by a Gate Control List (GCL). It is the multiple door control entities that determine the software's queue opening.
Optionally, the method further includes:
a time interval is obtained that includes a dwell time and a transmission path delay of the synchronization time information between the two time aware systems.
In practice, in order to ensure that the above process works properly, two time intervals must be precisely known throughout the process: -forward delay (dwell time); and synchronizing the time delay of the transmission path of the time information between the two time sensing systems. Residence time is measured inside the time-aware bridge, which is relatively simple; the delay on the transmission path depends on many factors, including medium-related properties and path length.
In the delay measurement technique of TSN, there are different methods for measuring the propagation time for each type of local area network or transmission path. However, these methods are all based on the same principle: the time when a message is sent from one device and the time when the message is received by another device are measured, and then another message is sent in the opposite direction and the same measurements are performed. In this process, P can be calculateddelay。
The delay measurement of the network has two methods, namely a 1-step method and a 2-step method. Since there may be a node in the network that cannot provide an accurate clock. For time-aware nodes, each node carries time information since the time information is sent with the data payload. For some non-time-aware networks, it is necessary to send a transmission time information to another node after sending a data frame.
Optionally, the scheduling shaping module is specifically configured to:
a mechanism for switch control is dynamically provided for egress queues based on a pre-defined periodic gate control list.
Optionally, the fault tolerant module is specifically configured to:
the protection bandwidth representing the maximum ethernet frame transmission length needs to be set before the transmission is started in its entirety.
Optionally, the fault tolerant module is specifically configured to:
a frame preemption mechanism in 802.3TG is employed to divide a given egress into 2 MAC service interfaces, referred to as preemptible MAC and fast MAC respectively, where pMAC is allowed to be preempted by eMAC.
In practice, in order to ensure that the network is idle before data transmission in the TAS mechanism, a guard bandwidth (guardband) needs to be set before transmission is initiated in its entirety. Guardband occupies the maximum ethernet frame transmission length to ensure the worst case-even if a standard ethernet frame is transmitting ahead, it will not let the GCL occupy the network before restarting the next cycle.
In the TAS mechanism, there are two problems: firstly, certain sampling time is consumed by protecting bandwidth; low risk of priority reversal. Thus, the 802.1Qbu and IEEE 802.3 working groups of TSNs have developed IEEE 802.3br, i.e., preemptive MAC mechanisms. It adopts the frame preemption mechanism in 802.3TG to divide the given outlet into 2 MAC service interfaces, which are called Preemptable MAC (pAMC-Preemptable MAC) and fast MAC (eMAC-express MAC) respectively. The pMAC can be preempted by the eMAC, and after entering the data stack, the eMAC data transmission is waited to be completed and then transmitted.
By preemption, the protection bandwidth can be reduced to the shortest low priority frame segment. However, in the worst case, a low priority fragment may complete before the next high priority. Of course, preemption of this transmission process is only at the connection layer interface-i.e., for a preemptive MAC, the switch requires dedicated hardware layer MAC chip support.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the protection scope of the present application.