Academic Journal of Science and Technology ISSN: 2771-3032 | Vol. 6, No. 2, 2023 65 Analysis of Communication Performance Based on Typical Weakly Hard Real‐time WorIdFIP Fieldbus Xuying Gao*, Geng Liang, Wei Pei, Xiangyu Feng North China Electric Power University, Beijing 100000, China * Corresponding author Abstract: This paper analyzes the fieldbus system of industrial network from the perspective of the typical weak hard real- time -- hard real-time. Based on the WorldFIP protocol, the periodic and aperiodic management modes of WorldFIP bus are discussed, and the utilization formulas of different aperiodic communication modes are given. Finally, the bandwidth utilization of centralized control bus protocol WofldFIP's aperiodic task scheduling is analyzed, and the performance is compared under different aperiodic arrival rates. Keywords: WorIdFIP, Communication performance, Aperiodic task. 1. Introduction Embroidery is a famous intangible cultural heritage in China. Embroidery contains abundant materials. Interesting patterns are directly related to the development of the times, economic changes and people's living standards. Although embroidery art is a very old art, it is a symbol of a nation and an inexhaustible source of Chinese people's creation under the whole social background. For fashion designers, it is necessary to fully tap the characteristics of traditional embroidery art, and then innovate in the continuous design process. By giving full play to the artistic value of embroidery, it can help the inheritance and development of art, and make the development of contemporary fashion art have vigorous vitality. With the popularity of the network, the application of network-based control systems in industry is also increasing. However, due to the uncertainty caused by the instability of network hardware and the uncontrollable load, it is difficult to support hard real-time applications, that is, it is difficult to analyze the response time of tasks from the perspective of hard real-time. In order to meet the timing constraints of tasks in industrial control systems, fieldbus, a special real-time communication network with deterministic and finite queuing delay, is usually used. Fieldbus is a bidirectional serial multi-node digital communication system, which is used in the production field and realizes the bidirectional serial multi-node digital communication between the microcomputer measurement and control equipment. It is also called the underlying industrial control network of open, digital and multi-point communication. It transforms the scattered measurement and control devices into network nodes, and connects them into a networked control system that can communicate with each other, communicate information and complete control tasks together by using fieldbus as a link. The field bus ADAPTS the control system to the direction of decentralization, networking and intelligence, and promotes the current automation instruments, distributed control systems and programmable controllers and other products to face a major change in the architecture and function structure, resulting in another renewal of industrial automation products. Therefore, the field bus has become a worldwide focus of control technology research, is regarded as a cross-century new technology of control. WorldFIP is one of the most popular bus. The concept of WorldFIP was first proposed by the working group led by Professor J. P. Thomesse in France, and it became the French national standard in 1991. In 1996, it became the European standard EN50170V3. In 1999, it became the field bus international standard IEC61158. WorldFIP uses different bus rates in different application fields: 31.25kbps for process control, 1Mbps for manufacturing, and 12.5Mbps for drive control; In the application system, dual bus structure can be used, one of which is used as a redundant backup to increase the security of the system operation. It has a good application in process automation, manufacturing, power system automation, transportation information integration and other fields. This paper mainly studies the task scheduling process of WofldFIP, and uses random method to analyze the effective utilization and performance analysis of WofldFIP under different aperiodic information loads and different number of aperiodic nodes to be sent. 2. WorldFIP Real-time Communication Performance Analysis 2.1. Communication mode of WorldFIP periodic information Due to the diversity of tasks in industrial processes and the importance of real-time task scheduling, WorldFIP clearly distinguishes periodic tasks and aperiodical tasks, and gives different strategies respectively. WorldFIP adopts a centralized media control strategy and manages the realtime communication of periodic tasks according to the Producer/Distributor/Consumer (PDC) model. At any time, only one active node on a network segment plays the role of node Arbitrator, which is responsible for task scheduling and information communication between various nodes on the network, and is called Bus Arbitrator (BA) in WorldFIP. PDC (Bus Arbitrator) model is a management model of task scheduling, which adopts centralized media control strategy. In this model, producers send process variables (tasks), 66 consumers receive process variables, and arbiters are responsible for coordinating the demands of producers on the bus among different nodes. In PDC model, there is only one producer for each process variable, but there can be multiple consumers. Every node that provides a process variable must provide the producer function to transmit the process variable to the node where its consumers are located. When working, the producer is first granted the right to use the bus by the arbiter. After that, the producer broadcasts the task to the entire network segment, and all nodes in the segment are hosted to the task. After receiving the task, a node keeps the task only if it is needed by a consumer on the node, and the other nodes discard the task. Usually, the relationship between a producer and a consumer is set through configuration. Because periodic tasks have the characteristics of time certainty. BA utilizes the scheduling ST to manage periodic task communication. According to the characteristics of periodic tasks, such as interarrival interval, execution time, deadline requirement, priority, etc. Using the relevant real-time scheduling algorithm, BA establishes the schedule of periodic task delivery service in ST. At runtime, BA scans the ST continuously and sends the channel usage right to the producer according to the periodic tasks in the ST and the periodic information transfer service schedule in the ST. 2.2. WorldFIP aperiodic information communication mode WorldFIP uses the remaining idle time of periodic information scheduling in the scheduling table (that is, the aperiodic scheduling time) to transmit aperiodic information. WorldFIP adopts query mode for the transmission of aperiodic tasks. Aiming at the characteristics of nondeterministic arrival time of aperiodic tasks, WorldFIP sets aperiodic task identification bit in the data frame of periodic task transmission, and implements the real-time transmission of aperiodic tasks by using the strategy of direction-inquiry-service. It is easy to see from the aperiodic task scheduling strategy that aperiodic task service is divided into three stages. The first phase is aperiodic task indication. When processing the periodic buffer transfer service, the BA broadcasts the ID_DAT frame, which contains the identification number of the variable, let's say X. When the producer of variable X receives ID_DAT, it sends out the RP_DAT response, which contains the numerical value of variable X. If the node where X is located hasaperiodic tasks to be sent. Then RP_DAT_R0 position 1. RP_DAT_RQ represents aperiodic task demand, and I / 0 represents with/without aperiodic tasks, respectively. When the RP_DAT_RQ instruction is received, BA stores the identification number of variable X in BA's aperiodic queue. WorldFIP aperiodic tasks are divided into two levels: urgent and normal (including available). And there are two aperiodic queues corresponding to the two levels of aperiodic tasks. This phase is carried out at the same time when the communication process of periodic tasks is completed. The second phase is aperiodic task inquiry. In the aperiodic task window, the BA sends the identity request frame ID_RQ to the producer of variable X. Upon receiving the ID_RQ frame, the producer of x sends the identity list RP_RQ to the BA, which contains the list of identification numbers of the aperiodic tasks to be sent. After receiving the list of identification numbers, BA puts it in another list to be sent. For a node, no matter how many aperiodic tasks are to be sent, only one query is needed, so the communication overhead of a query in the second phase is bytes, where len represents the number of bits of task frames transmitted on the bus; len ID_RQ+RP_RQ +2trb is the minimum interval to wait for the arrival of the next frame after each frame is sent, which can be expressed in bytes. Finally, the aperiodic task service phase. The BA processes the aperiodic task requests stored in the to-be-sent list. When processing aperiodic task requests, BA adopts the same mechanism as periodic task requests, that is, an aperiodic task transaction is completed through ID_DAT and RP_DAT. len ID_RQ+RP_RQ +2trThe corresponding overhead to complete each aperiodic task scheduling is: FIG. 1 shows the complete process diagram of an aperiodic information transaction. Figure 1. WorldFIP aperiodic information service process 2.3. WorldFIP aperiodic communication model WorldFIP is mainly used in process control, and its typical process control communication rate is 31.25kbps. Let denote the WorldFIP communication rate, rate is 31.25kbps. Suppose that a WorldFIP network segment has N nodes and each node has aperiodic information to be sent, its periodic information set is: ∏={Mp i =(Cp i ,Tp i ,Dp i )|1≤i≤np} , where denotes the ith periodic information, and, respectively denotes the calculation time, period and deadline of periodic information, and denotes the number of periodic informatio The ST of periodic information is generally constructed by the Least Common Multiple/Highest Common Factor (LCM/HCF) method. Here, it is assumed that both buses use LCM/HCF to construct ST:T=LCM(Mp i ),i=1,...,np.Therefore, the macro period of ST can be obtained. It is assumed that the arrival rate1 of aperiodicity information in the WorldFIP network segment is λ1 and λ2 (frame/s or frame/s), both of which are served unrestrictively. Then, in macro period T, the average total number of aperiodic messages sent by N nodes in WorldFIP is Tλ1 and Tλ2, respectively. The bus utilization is defined as the ratio of the effective data transmitted by the bus to the total data transmitted in a certain period of time. 2.4. WorldFIP aperiodic communication analysis For WorldFIP applied to process control, the transmission time required for a node to send an aperiodic message is: T1=[lenID_RQ+RP_RQ+2tr+lenID_DAT+RP_DAT+2tr]∙β -1 (1) 67 Where ID_RQ is the identity request frame sent by BA to the producer of variable X. RP_RQ is that the producer of variable X sends the identity list frame to BA,ID_DAT and RP_DAT are the data that BA instructs to send and the producer sends, respectively. In the WorldFIP protocol, frames ID_RQ and RP_RQ have the same type as ID_DAT and are 64bit, andRP_DAT is (48+8*n), where n denotes the number of valid data bytes. So Equation (1) can be written as follows. T1=[len3×ID_DAT+RP_DAT+4tr]∙β -1 =(240+8n+4tr)∙β -1 (2) Case1 Tλ1≥N If the information is distributed as evenly as possible in each node, then at this time, N nodes have aperiodic information to be sent, and the total amount of aperiodic information to be sent is Tλ1. For a single section of aperiodic information to be sent, no matter how many aperiodic information there are, its query only needs to be completed once, so the total time required to complete the communication of aperiodic information is: T1 total=[N×lenID_RQ+RP_RQ+Tλ1lenID_DAT+RP_DAT+(Tλ1+N)×2tr]∙β -1 =[(128+2tr)N+(112+8n+2tr)Tλ1]∙β-1 Then, the utilization rate η1 under Case1 can be obtained as follows: η1=(8nTλ1)∙[(128+2tr)∙N+(112+8n+2tr)Tλ1]-1 (3) Considering the system stability requirements, that is, the total communication time of periodic and aperiodic information in a macro period must be less than T, the aperiodic information arrival rate1 λ of WorldFIP must meet the following equation: [(128+2tr)∙N+(112+8n+2tr)Tλ1]∙β-1+∑ Mp inp i=1 ≤T The necessary conditions for λ1 can be obtained as follows. λ1≤ [t-∑ Mp inp i=1 ]×β-(128+2tr)∙N (112+8n+2tr)T Case2 Tλ1<N In this case, there are only N nodes with aperiodic information to be sent from N1 nodes, and N with no aperiodic information to be sent (N2 = N1+N2). The T 位 aperiodic1 information to be sent is distributed over N1 nodes, that is, Tλ1= N1. Then the total time to complete the transmission under Case2 is: T1 total=[N1×lenID_RQ+RP_RQ+Tλ1lenID_DAT+RP_DAT+(Tλ1+N1)×2tr]∙β -1 =[(128+2tr)N1+(112+8n+2tr)Tλ1]∙β-1 =(240+8n+4tr)Tλ1]∙β-1 (5) Similarly, the aperiodic information arrival rate λ1 must satisfy the following equation: λ1≤[(T-∑ Mp inp i=1 )×β][(240+8n+4tr)T]-1 (6) At this time, the bus utilization η1′: η1'= 8nTλ1 T1 total = 8nTλ1 (240+8n+4tr)Tλ1 = 8n 240+8n+4tr (7) Without loss of generality, the effective data transmission byte n can take the value of 10 for the above various, N is the maximum number of nodes in a single network segment of the bus 32, generally tr is 10-70bit, and it is 30bit when discussed in this paper. From the simulation results in FIG. 2, for the same arrival rate, assuming that aperiodic information is uniformly distributed in each node and there are not many nodes to send aperiodic information (that is, when Tλ1≤32, the number of nodes to send is equal to the number of aperiodic information arriving), For T (500× 10-3 s) given by HCF/LCM method from periodic information, it can be seen from Figure 2 that the effective utilization rate of WorldFIP is about 0.20, and the number of nodes to be sent is equal to that of non-periodic information. With the increase1 of the amount of aperiodic information Tλ =2 Tλ > 32 (the number of nodes to send WorldFIP aperiodic information is N), the growth of WorldFIP utilization rate is not large. When the system load is concentrated to nodes to send with probability P, that is, the number of nodes originally sending aperiodic information is reduced to P times (that is, N →PN, N '→PN'), for WorldFIP, Figure 2 shows that its utilization rate has been improved to a certain extent. It can be seen that the aperiodic information sending method of query mode is suitable for the control system with light load and concentration. Figure 2. Relationship between utilization rate and arrival rate of WorldFIP (n = 10, tr = 30) Obviously, the value of tr and n also directly affect the utilization of the bus. The curves of Figure 3 and Figure 4 show the influence of the two on the utilization at a certain arrival rate respectively. Figure 3. Relationship between utilization of WorldFIP and tr (λ1 =λ2 = 40, n = 10) 68 Figure 4. Relationship between utilization rate of WorldFIP and n (λ1 =λ2 = 40, tr = 30) 3. Conclusion WorldFIP is a field bus widely used in the field of industrial control. The communication of aperiodic information is a complex process. The query method and round robin method are suitable for different loads of aperiodic information and their distribution in each node. This paper analyzes the communication process of aperiodic information, gives the utilization formula of WorldFIP, compares the utilization of WorldFIP under different loads, and analyzes the influence of aperiodic information distribution, which provides engineers and technicians with ideas in system design and bus selection. For the study of bus protocol, improving the existing protocol, The task scheduling algorithm is designed to improve the bus cooperation. The real-time performance of the bus is improved. A protocol analysis method is established, which can provide ideas for the design and development of bus protocols. References [1] Yang Xianhui, Fieldbus technology and its application. Tsinghua University Press,1998. [2] LIU Yang.PROFIBUS Fieldbus Communication Technology and its application research [J]. The wind science and technology, 2016 (10) : 17. DOI: 10.19392 / j.carol carroll nki. 1671-7341.2016.10.014. [3] Geng Liang,Control and communication co-design: Analysis andpractice on performance improvement in distributed measurement and controlsystem based on fieldbus and Ethernet, ISA Transactions,2015, 54(1) : 169-192. [4] Y.Q.Song,Performance evaluation of FIP fieldbus and application dimension.PhD thesis of INPL, Nancy,France,1991. [5] Fieldbus Foundation.Foundation specification system architecture.Fieldbus Foundation,Austin,Texas,1996. [6] E.T ovar,F.Vasques.Distributed computing for the factory- floor:a real time approach using WorldFIP.Computers in Industry, 2000, 44(1): 11 ~ 30. [7] L.A. lmeida, e. ovar, J.A lberto, G.F onseca, F.V asques) annotations for Schedulability analysis of rea - l time traffic in WorldFIP: an integrated approach.IEEE T rans on Industry Electronics, 2002,49(5) : 1165 ~ 1174. [8] WANG Tanh, ZHOU Yue, Yu Haibin, Yuan Mingzhe. Real- time communication analysis and heuristic scheduling of FF fieldbus system. Chinese Journal of Scientific Instrument, 2003, 24(1) : 1 ~ 6. [9] Chen Jiming, Wang Zhi,Yeqiong Song, Sun Youxian. Research on the scheduling problem of Foundation fieldbus aperiodic real-time task. Journal of Zhejiang University Engineering, 2003, 37(3) : 273 ~ 278. [10] Y.Q.Song,J.P.T homesse.Performance analysis of periodic and aperiodic rea-l time message transmission in FIP netw Orks. Proc. 9th International Conf. On Parallel and Distributed Computing Systems, Dijon, France, 1996499 ~ 506. [11] Wang Z,Song YQ,Yu HB,Sun YX.Stability analysis for mult-i class mult-i queue single server system under polling table.20th IEEE Conference of American Control Conference, 2002,V(6) : 4732 ~ 4737. [12] Chen Lei, Jin Jianxiang, Chu Jian. Research on bandwidth allocation optimization strategy for FF aperiodic communication. Chinese Journal of Scientific Instrument, 2002, 23(4) : 395 ~ 399. [13] S.H.Hong,Y.C.Kim.Implementation of a bandw idth allocation scheme in a token-passing fieldbus network.IEEE T rans.on Instrumentation and M easurement,2002,51(2) : 246 ~ 251.