Abstract: With the increasing maturity of network technology, the application of Ethernet in control systems has become a research hotspot. Stability is the primary condition for the normal operation of NCS (Network Control System), however, latency introduces significant uncertainty into the system. After analyzing latency, this paper addresses the main aspects of latency and proposes an instruction speculation technique, providing a theoretical basis for the Ethernet NCS response time guarantee mechanism.
Keywords: Network control system; Ethernet; Response time
Abstract: With the development and maturity of network technology, Ethernet is becoming one of hotspots in application of control system. Stability is the first condition which NCS can work in gear. However, existence of time-delay brings great uncertainty to NCS. After analyzing time-delay and account for some questions according to main of time-delay, instruction speculation technology is brought forward in this paper, which offers theoretical basis for NCS response time guarantee mechanism.
Keywords: NCS; Ethernet; response time
introduction
In modern society, the internet is ubiquitous, permeating all sectors of society, such as management decision-making, resource sharing, automated manufacturing plants, power plants, robots, advanced aerospace vehicles, and electrified transportation, among many other high-tech fields and large enterprises.
Networked control system (NCS) is a network-based distributed control system that integrates computer technology, communication technology and control technology, and reflects the development trend of networked, integrated and intelligent nodes of control system [1]. The structure of the network control system is shown in Figure 1.
Figure 1 Network control system structure
Since its introduction in the early 1990s, the concept of Networked Control Systems (NCS) has immediately attracted attention. Integrating computer networks into control systems, replacing traditional point-to-point wired connections, reduces system costs, lightens the workload, saves energy, simplifies installation and maintenance, and increases reliability. It not only saves human resources and reduces enterprise expenses but also plays a positive role in improving enterprise efficiency and increasing profits. Therefore, networked control systems are widely used in factories, transportation, intelligent building systems, and other applications. At the same time, NCS poses new challenges to traditional control system theory and applications. Currently, networked control systems are one of the hottest research topics in the control field.
However, network latency is unavoidable when exchanging data over Ethernet. NCS has high real-time requirements, so the existence of latency will cause significant harm, not only greatly reducing system performance, but also causing system instability.
2. Real-time performance study of Ethernet NCS
2.1 Ethernet Real-Time Performance Analysis
Ethernet employs Carrier Sense Multiple Access with Collision Detection (CSMA/CD) and uses the Binary Back-Back (BEB) algorithm to handle collisions. When a node wants to send data, it first listens to see if the network channel is idle. If the channel is idle, it sends data while simultaneously checking for collisions. If there are no collisions, it continues sending until all data has been sent; if there are collisions, it stops sending data and sends a JAM signal to amplify the collision, continuing to listen for a random period of time until the channel becomes idle and the remaining data is sent.
For remote network control systems, the Internet is generally used for network control. Internet transmission rates fluctuate greatly due to the size of the data being transmitted and network load, leading to uncertain propagation delays. Generally, if the network load is kept below 25%, network transmission will not be overloaded, and propagation delays will be minimal; when the network load exceeds 25%, propagation delays will increase with the rising network load.
This demonstrates that Ethernet suffers from latency uncertainty during communication. When conflicts occur between nodes, the waiting and propagation times are random and uncertain. Therefore, it is impossible to provide an upper bound on Ethernet's latency, and it cannot guarantee the maximum delay requirement for data transmission, i.e., the real-time requirement. Furthermore, it cannot meet the network interconnection technology requirements for information transmission in industrial automation. Consequently, conflicts will occur in control processes with strict response time requirements.
2.2 Real-time performance of NCS
Real-time refers to the ability of a system to respond to external stimuli in a timely manner. It is often quantitatively described by the response time of the system to external stimuli. Different NCSs often have different requirements for real-time performance. The timeliness of data transmission and the real-time response of the system in the control network are the most basic requirements of the control system. That is to say, the data transmission time between nodes in the real-time network NCS is certain and predictable. Data transmission in NCS is time-limited. If the data transmission time in the network exceeds the time limit, even if the receiver receives the data, the system considers the data transmission to be invalid [2].
Generally, process control systems require a response time of 0.01–0.5 seconds, manufacturing automation systems require 0.5–2.0 seconds, while ordinary information networks require 2.0–6.0 seconds. Typically, each controller in a control network must possess a certain level of real-time performance. The latency uncertainty inherent in Ethernet communication makes it unsuitable for meeting the real-time requirements of network control systems, potentially with disastrous consequences. Therefore, the real-time issue must be addressed before Ethernet can be applied to network control systems.
3 Response Time Guarantee Mechanism
3.1 Competition Priority Mechanism
At the sensor end in remote real-time control, data is typically queued at the MAC layer, waiting to be transmitted to the controller via the network. However, sensors often need to transmit urgent data, such as alarm messages. This type of urgent data must be transmitted to the remote monitoring end with the shortest possible time delay, allowing the monitoring end to make timely decisions and take appropriate action. The principle is as follows:
In TCP, data awaiting transmission is stored as a byte stream in the MAC layer buffer. Regular data is numbered and sent sequentially from smallest to largest sequence number. However, if urgent data is also numbered and sent sequentially, it would be delayed because earlier data with smaller sequence numbers would not have been sent. Therefore, urgent data cannot be sent sequentially like regular data; it must be sent out-of-band. This means that regardless of how much unsent regular data precedes the urgent data, it will be inserted before the next data to be sent. The presence of an urgent data bit (URG bit) in the TCP header's code field indicates that the TCP segment contains urgent data. The urgent pointer in the TCP header indicates the end position of the urgent data within the TCP segment.
By processing emergency data, the transmission time of emergency data is greatly shortened, ensuring that emergency data can be sent immediately after it is generated, thus avoiding major accidents.
3.2 Data Processing
At the transmitting end, sensors often collect a large amount of information in a short period of time. If all of this information is sent to the controller, it will increase the network load, which is detrimental to the NCS's fast real-time response in Ethernet. Therefore, data processing, namely data filtering and data compression, must be performed before the data is sent from the sensor to the controller.
Data filtering involves the transmitting end screening and filtering the data collected by the sensor, retaining useful information and removing useless information. We equip the sensor with a microcontroller that records the most recent few collected data points, and then perform curve fitting on them using the least squares method. This determines whether the last collected data point conforms to the curve fitting; if it does, it is sent to the controller; otherwise, it is discarded.
Data compression uses data encoding or transformation to obtain a reduced or compressed representation of the original data. Although compressing data increases the operational burden on the sensor and requires decompression time on the control end, it undoubtedly significantly reduces response time compared to the transmission time of complex data over the network, especially when the network is busy. Furthermore, compression allows for the transmission of larger amounts of information at once, effectively meeting real-time requirements and facilitating timely judgment and processing by the control end.
3.3 Instruction Inference Techniques
In remote monitoring systems, the sensor-controller-actuator network control loop formed by monitoring discrete events is closed within the entire wide area network. A control network should have at least three nodes, and the outputs from each node are often coupled, with outputs at different time scales, making information congestion a common problem.
The transmission rate on a remote Ethernet network fluctuates greatly due to the amount of data transmitted and network load. If the network speed is high and the traffic volume is low, the latency for introducing feedback information in such a network is very short, and traditional design methods can be applied without considering the network's existence. However, if network congestion occurs, it leads to uncertainty in the shortest transmission time of Ethernet, which is the main obstacle preventing it from becoming a control network.
When transmitting data over the Internet, the average delay of data packet transmission is not significantly related to the distance between the destination node and the origin node, so the focus is on the network load[3].
In remote network control systems, sensors, actuators, and controllers are far apart. At certain times, due to a large number of users using the network, the network becomes very busy. As a result, the data transmitted from the sensors may not reach the controller within the specified time. This will directly affect the stability and security of the network control system. Therefore, the controller must make the correct decision quickly and send the execution information to the actuator.
Therefore, the network will specify a time, and the sensor will continuously send information to the controller within this specified time. When the controller acquires information each time, it will record the data point and queue it in chronological order. We assume that the controller allows 10 data points to be recorded. When the eleventh data point is received, the first data point is discarded, and the subsequent data points are advanced in sequence. The eleventh data point is stored in the tenth record, and so on. At a certain moment, if the sensor does not transmit the information to the controller within the specified time, the controller will send a retransmission command to the sensor. At the same time, the controller will infer the information that the sensor may transmit at that moment based on the recorded data points. Before using these data points, they should be analyzed and processed, such as removing points with large errors or obviously incorrect points to improve the accuracy of the data. Sometimes, due to limitations, the desired amount of data cannot be obtained through existing measurement methods. In this case, other quantities can be measured, and the measured data can be calculated to indirectly obtain the desired data, etc. [4]. Then, the least squares method is used to fit the obtained discrete points to a curve, and the fitted curve is plotted. Based on this curve, we can infer the information that the sensor might transmit at the next moment, make a decision, and send the execution information to the actuator.
In the least squares method, assume there are m+1 pairs of data in the XOY rectangular coordinate system.
Where xi∈[a,b]. Now, we select n+1 (n≤m) basis functions φj(x) (j=0,1,⋯,n) that are continuous on the interval [a,b] and linearly independent on the point set {xi, i=0,1,⋯,m}, and use curves to...
Replace the functional relationship reflected by data (1). If curve (2) minimizes the sum of squared errors, then y(x) is called the fitting curve for data (1) determined by the least squares method. The selection of basis function φj(x) is usually based on the physical background of the specific problem or the distribution of coordinate points. The solution process of coefficient cj in the fitting curve is as follows: differentiate Cj (j=0,1,⋯,n) with respect to equation (3) respectively, and set the derivative to zero, solve the system of equations to obtain the values of C0,C1,⋯,Cn, and thus obtain the specific expression of y(x). Finally, based on the obtained curve expression, predict the data node value that the next time sensor may transmit [5].
In a temperature network control system, at time t11, due to excessive network load, data points cannot be transmitted to the controller in a timely manner. The controller then analyzes and judges the temperature parameters previously transmitted by the sensors, makes a decision, and sends the execution information to the actuator, as shown in Figure 2. Based on the first ten data nodes transmitted by the sensors, the system uses the least squares method to obtain the fitting curve equation and further estimates the data node values that the sensors may transmit at the next time step.
Figure 2 shows curve fitting of discrete data points.
4. Summary and Outlook
Ethernet is currently the most widely used local area network (LAN) technology, boasting significant advantages such as openness, low cost, and broad software and hardware support. The innovation of this paper lies in its application of the least squares method to propose an instruction speculation technique. This technique focuses on addressing the significant impact caused by network congestion preventing data from sensors from reaching the controller segment in a timely manner, thus hindering the controller's ability to make rapid and correct decisions in the network control system (NCS). Combining control with Ethernet can enhance network control capabilities and improve the efficiency of remote network control, showing promising development prospects. However, control networks have extremely stringent requirements for response time. Ethernet with collision detection and uncertain network loads significantly constrain the response time of control networks. This paper analyzes the components of time delay, introduces several solutions, and focuses on proposing the instruction speculation technique. This technique greatly avoids the significant impact of network congestion on the NCS, demonstrating excellent practicality and providing a theoretical foundation for the response time mechanism of network control systems.
References
[1] Gu Hongjun, Zhang Zuo, et al. Real-time characteristics analysis and data transmission technology of network control systems. Computer Engineering and Applications, 2001.6
[2] Cui Yanyong, Guo Xiaohe. Real-time performance analysis and application of network control system methods. Hongdu Technology, 2005
[3] Guo Yameng, Wang Jianxin, et al. Research on the real-time performance of network monitoring. Foreign Electronic Measurement Technology, 2006.1
[4] Zhang Yangli, Zhao Lijuan, et al. Application of Matlab in data processing. Journal of the Fourth Military Medical University, 2001;22
[5] Yuan Youxin, Gan Wei. Application of Matlab and VC hybrid programming in intelligent monitoring system of space frame structure. Microcomputer Information, 2006.1-1