International Journal of Automotive Technology, Vol. 12, No. 4, pp. 589−597 (2011) DOI 10.1007/s12239−011−0069−x
Copyright © 2011 KSAE 1229−9138/2011/059−15
DESIGN FRAMEWORK FOR FLEXRAY NETWORK PARAMETER OPTIMIZATION K. JANG1), I. PARK2), J. HAN2), K. LEE3) and M. SUNWOO3)* 1)
Hyundai Mobis, 80-9 Mabuk-dong, Giheung-gu, Yongin-si, Gyeonggi 446-912, Korea Department of Automotive Engineering, Graduate School, Hanyang University, Seoul 133-791, Korea, 3) Department of Automotive Engineering, Hanyang University, Seoul 133-791, Korea
2)
(Received 31 December 2009; Revised 6 February 2011) ABSTRACT−Because the FlexRay protocol has more than 70 configuration parameters and these parameters correlate with each other, designing a FlexRay network is a complex and difficult task. In this study, we propose a design framework that optimizes the two main FlexRay network parameters that are highly relevant to the application algorithm. The design process is composed of two steps for optimizing parameters. In the first step, the static slot length is optimized using a frame-packing algorithm. This algorithm binds network signals into static frames based on their periods and signal groups. In the second step, the communication cycle length is optimally designed with frame-scheduling algorithm and worst-case reponse time analysis. Based on the frame-scheduling algorithm, the response times are analyzed. The proposed design framework was applied to a unified chassis control system as a case study, and the analytical results were verified. KEY WORDS : FlexRay network parameter, In-vehicle network, Static slot length, Communication cycle length
1. INTRODUCTION
faster than that of a CAN protocol (FlexRayConsortium, 2005). Because FlexRay provides two independent channels, we can use either the double bandwidth or the redundancy to improve fault-tolerance. This feature increases safety and reliability for control applications in vehicles (Mishra and Naik, 2005). Despite the advanced characteristics of FlexRay, network design is difficult due to its complicated operational principles. To use a FlexRay network for automotive applications, about 70 configuration parameters should be determined; these are highly correlated to each other. Determining all of the parameters is complicated and timeconsuming work. For the efficient use of a FlexRay network, a systematic design methodology is required. A few studies have proposed methods that help to determine the optimal FlexRay parameters. Pop et al. proposed a process for designing network parameters using a general response-time model (Pop et al., 2008). However, they did not perform an analysis of the network bandwidth utilization. Hagiescu et al. proposed a compositional framework that analyzes the performance of a FlexRay network’s ECUs (Hagiescu et al., 2007). They considered the response time of the DYN segment. However, they excluded any analysis of the ST segment. To overcome these limitations, Park et al. proposed a FlexRay network parameter optimization (NPO) method that considers network utilization and ST segment analysis (Park et al., 2008). They describe an optimization method for two core parameters, the lengths of an ST slot and a
Until the beginning of the 1990s, data in a vehicle was exchanged through point-to-point links between electronic control units (ECU) (Navet et al., 2005). However, the increasing use of ECUs led to the use of networks in which communications became multiplexed over a shared bus. Controller area networks (CANs) are the most widely used in-vehicle networks due to their low cost and robustness. A number of studies (Ryu et al., 2006, Shin and Sunwoo, 2007) have used a CAN as an in-vehicle network. Despite its advantages, a CAN has limitations, such as its low speed and non-deterministic characteristics. To overcome these limitations, FlexRay was proposed in 2004. FlexRay is a network protocol composed of static (ST) and dynamic (DYN) segments. By integrating both of these segments, FlexRay combines the advantages of timetriggered and event-triggered communication protocols (Navet et al., 2005). The ST segment is used for time-synchronous data transfer using a time division multiple access (TDMA) scheme. Therefore, it has a predictable timing characteristic. The DYN segment enables event-driven data transfer, in which bus access is performed using the flexible TDMA (FTMDA) method. This segment is optional and provides communication flexibility. Furthermore, FlexRay provides 10 Mbps communication speed, which is about 20 times *Corresponding author. e-mail:
[email protected] 589
590
K. JANG et al.
communication cycle. Unfortunately, their approach is limited to the migration from legacy CAN messages to FlexRay frames. Therefore, their method is not adaptable to FlexRay networks newly designed from the signal level. Furthermore, they only consider single-rate transmission of frames. This is also a significant limitation because multirate communication is common in automotive applications. To solve these limitations of previous studies, we propose a new design framework for a FlexRay network. The proposed framework consists of two steps for optimizing a FlexRay network’s parameters. In the first step, the ST slot length is optimized using a frame-packing algorithm. The packing algorithm efficiently constructs FlexRay frames using network signals. In the second step, the communication cycle (CC) length is optimized with a frame-scheduling algorithm. This paper is organized as follows. In Section 2, the basic principles of FlexRay are described. Section 3 introduces the network design framework. The proposed framework is applied to a case study in Section 4. Finally, Section 5 presents the conclusions of this research.
Figure 1. Coding elements. dynamic trailing sequence (DTS). These sequences are automatically encoded by a communication controller. An example of an encoded frame for an ST segment is depicted in Figure 1. A TSS and a FSS are placed in the fronts of the frames. Every byte of the frame has a BSS. At the end of each frame, an FES is inserted. For the DYN segment, the DTS is added after the FES. In this study, all frame elements, except for the payload, are regarded as protocol overhead. When a set of data is to be transmitted through the FlexRay bus, additional coding elements (i.e., protocol overhead) are required for communication.
2. BASIC PRINCIPLES OF FLEXRAY This section describes the basic principles of FlexRay. A more specific explanation of this protocol is included in Paret (2007) and FlexRayConsortium (2005). 2.1. Timing Hierarchy The FlexRay protocol is based on a fixed length of a communication cycle, which is composed of an ST segment, a DYN segment, a symbol window, and a network idle time (NIT). The length of each segment is described using the number of macroticks, a global-time unit of the FlexRay bus. A macrotick (MT) consists of the set of microticks (µT), which are generated by the local clock of each node. 2.2. Frame Format The frame format of FlexRay is classified into three segments: header, payload, and trailer. The header segment consists of four indicators: frame identifier (ID), payload length, header cyclic redundancy check (CRC), and cycle count. These are used for recognizing the type of frame (i.e., indicators), for checking errors in the header segment (i.e., header CRC), and for representing the sequence of the cycle (i.e., cycle count). In the payload segment, up to 254 bytes of data are present. The trailer segment includes a 24bit CRC that can detect errors in the header and payload segments. 2.3. Coding Element and Protocol Overhead To transmit frames to the FlexRay bus, it is necessary that frames are encoded using five elements: a transmission start sequence (TSS), a frame start sequence (FSS), a byte start sequence (BSS), a frame end sequence (FES), and a
2.4. Media Access Control The media access control (MAC) in FlexRay is classified into TDMA and FTDMA. In an ST segment, bus access is controlled by TDMA principles. The ST frames are assigned to specific nodes and ST slots during the configuration phase. Each ST slot has the same length, and all of the communication activities in an ST segment are controlled by a static schedule. Therefore, periodic network signals are usually assigned to ST frames. The communication activities in the DYN segment are dependent on different uses for diagnosis, flash downloading, and calibration. The length of a DYN slot is determined by its frame. The most important rule in MAC for FlexRay is the coincidence between frame IDs and slot counter values. In Figure 2, this rule is described by a simple example. Suppose that there is a single FlexRay bus, two network nodes, and four frames. The timing diagram for task execution and the FlexRay communication cycle is represented. In this example, we assume that each frame transmission is requested at the end of a specific task execution. In Figure 2, the task, TaskST2, requests transmission of an ST frame, frST2, at the end of task execution, and frST2 is transmitted at ST slot 2. Although frST2 is transmitted in the first cycle, frST1 is delayed to the second communication cycle because TaskST1 requests the transmission of frST1 after its ST slot; therefore, frST1 has to wait until ST slot 1 of the next cycle to be transmitted. Dynamic frames can also be transmitted when their IDs are identical to the value of the DYN slot counter. However, they are different from ST frames in that they are prioritized according to frame ID (a lower ID has a higher
DESIGN FRAMEWORK FOR FLEXRAY NETWORK PARAMETER OPTIMIZATION
591
Figure 2. Example of FlexRay’s media access control.
Figure 3. Overview of the proposed FlexRay network design framework. priority). In Figure 2, two DYN frames (i.e., frDYN6 and frDYN7) are requested in the ST segment of the first communication cycle. Although frDYN7 is requested prior to frDYN6, it is transmitted after frDYN6. Therefore, it is possible that low priority DYN frames will not be transmitted in a cycle.
3. NETWORK DESIGN FRAMEWORK Figure 3 shows the sequential process for the proposed network design framework. This framework is performed with the two steps. In the first step, with the given signal specifications, the ST slot length is optimized using a frame-packing algorithm. Using the results of the optimal ST slot length, the CC length is optimally designed with regard to a frame-scheduling algorithm in the second step. Each step is explained in detail in the following sections. 3.1. Optimal Static Slot Length In FlexRay networks, each ST slot contains an ST frame with the same length. For periodic data transmission, the network signals are packed into an ST frame and transmitted. Based on the frame length and the frame construction results, the rate of frame usage and the number of frames produced are determined as illustrated in Figure 4. There are five network signals with different lengths in Figure 4. In the first case, the five signals are assigned to three ST frames. The shaded regions of frST1 and frST3 signify unused network resources that result from having fixed frame lengths. The horizontal-lined blocks of each frame represent the protocol overhead. The unused
network resources and protocol overhead are usually considered as network utilization cost (Park et al., 2008). For the second case, we supposed that the frame payload length was 8 bytes. The five signals are allocated to two frames. As illustrated in this example, efficient usage of the network is affected by the frame length and the framepacking algorithm. To find the optimal ST slot length, we propose design steps as described in Table 1. For this study, we assumed that the design space of the frame length is limited to 128 bytes. Even though the maximum frame length is theoretically 254 bytes, a frame longer than 128 bytes is not practical in automotive applications. Therefore, we only considered frame lengths from 2 to 128 bytes. In this optimization process, the frame-packing algorithm binds the network signal to frames and a cost function is calculated for every frame length. 3.1.1. Frame-packing algorithm To find the optimal ST slot length, a frame-packing
Table 1. Pseudocode of the optimal static slot design. 01
FOR x = 2 to 128 (increment step = 2)
02
EXECUTE Frame-packing algorithm
03
COMPUTE Cost for x (JST)
04
ENDFOR
05
FIND x which minimizes the cost (JST)
*x
Frame length[byte]
K. JANG et al.
592
is described in Table 2. The packing process is based on two rules: only the signal groups which have same sending nodes and transmission periods can be packed into the same frame, and the longest signal is assigned first. Detailed descriptions are summarized in Table 2.
Figure 4. Frame-packing example. algorithm that can automatically construct frames with consistent rules is required. For this study, the framepacking algorithm was based upon Saket and Navet (Saket and Navet, 2006). This algorithm packs network signals into frames with constraints such as the signal group specification and deadlines. The signal group specification is defined by the transmission node and period. Signals with identical periods from a single node and are packed into a single frame. Furthermore, the algorithm minimizes the empty space in frames. By keeping these constraints, the algorithm generates signal groups for each node with regard to the sending node and transmission period specifications. Using these signal-grouping results, the packing algorithm Table 2. Pseudocode of the frame-packing algorithm.
3.1.2. Cost functions for the optimal static slot length As described in section 2.3, when a frame is transmitted through a FlexRay network, additional coding elements called protocol overhead are required for communication. Because the overhead is proportional to the number of frames, it is desirable to reduce the number of frames produced, as illustrated in Figure 4. The cost for the protocol overhead can be calculated using JO ( x ) = ( CO + x × BSS ) × Ns
(1)
where JO is the cost function of the protocol overhead, and CO is the summation of the protocol overhead lengths, including the header, trailer, TSS, FSS, FES, idle delimiter, action point offset, and safety margin. The variable BSS is the additional coding element for each byte of the frame. The term NS is the number of ST frames produced, and x is the ST frame length (Park et al., 2008). From the viewpoint of network utilization, the empty space in the frames is produced when the signals do not perfectly fit within the frame size, as shown in Figure 4. The cost for the wasted network resources is described as follows: n
01
CLASSIFY signals according to sending nodes
JU ( x ) = x × NS – ∑ Li
02
GENERATE signal groups for each node according to transmission periods
where Li is the length of signal I, and n is the number of signals.
03
FOR i = 1 to NNode
04 05
FOR j=1 to NGroup[i] WHILE unpacked signals exist IF There is no available ST frame THEN
06 07
MAKE a new empty ST frame
08
ASSIGN an unassigned longest signal to the entry of the ST frame ELSE
09
ASSIGN a longest signal that can be packed into the ST frame
10
ENDIF
11 12 13 14
ENDWHILE ENDFOR ENDFOR
* NNode
The number of nodes
*NGroup[i]
The number of groups for the i-th node
(2)
i=1
3.1.3. ST slot length optimization To minimize both the protocol overhead and the wasted network resources, the cost functions are defined as follows: min JST ( x ) = JO ( x ) + JU ( x ) subject to X = { x x = 2, 4, 6, …, 128 }
(3)
where JST is the cost function for designing an optimal ST slot length. The frame-packing algorithm iteratively creates frames based on increasing the length of the ST slot x. Then, it calculates the costs and determines the optimal ST slot length in order to minimize the cost. 3.2. Optimal Communication Cycle Length Because the communication cycle length is highly interconnected with the response time in the FlexRay bus, it is one of the most important configuration parameters (Lee et al., 2008). The response time in distributed control systems can degrade the control’s performance. Therefore, the communication cycle length should be designed with
DESIGN FRAMEWORK FOR FLEXRAY NETWORK PARAMETER OPTIMIZATION
Table 3. Pseudocode of the optimal communication cycle design. 01
FOR i = 1 to 5
593
Table 4. Pseudocode of the frame-scheduling algorithm. 01
CNTSchedule = 0
02
IF NFrames > NSlots THEN
02
GENERATE ST, DYN slots according to CC[i]
03
GENERATE Cases of slot-to-node allocation
ASSIGN ST frames to the ST slots
03
04
WHILE Unhandled cases exist
ASSIGN Cyclic multiplexing to the ST frames
04
05
05
EXECUTE Frame-scheduling algorithm
06
COMPUTE Cost for each case ENDWHILE
07
ELSE
06
ASSIGN ST frames to the ST slots
07
ASSIGN No cyclic multiplexing(k=1) to ST frames
08
ENDFOR
08
ENDIF
09
FIND CC[i] that minimizes the cost (JCC)
09
INCREMENT CNTSchedule
* CC[i]
The communication cycle length set[ms] = {1, 2, 5, 10, 20}
regard to response times. To find the optimal communication cycle length, we propose a design process composed of a frame-scheduling algorithm and cost calculation. For this study, we assumed a ratio between ST and DYN slots of seven to three because periodic control signals are dominant in distributed control systems of automotive applications. For simplicity, only five typical communication cycles were considered. As described in Table 3, the design process for optimal communication cycle length begins with the generation of ST and DYN slots. The number of generated slots is determined by the optimal ST slot size and the candidate communication cycle. Then, all of the cases for slot-tonode allocation are generated. Using the generated cases, the frame-scheduling algorithm considers all of the frame-to-slot assignments; then, the cost function for optimal communication cycle evaluates worstcase response times (WCRT) for every case. Each step is explained in the following sections. 3.2.1. Frame-scheduling algorithm Based on the generated slot-to-node allocation cases, the frame-scheduling algorithm allocates the frames to ST slots based on the transmission periods as described in Table 4. If the number of ST slots is insufficient for the allocation of ST frames, this algorithm creates frames that share ST slots by using cycle multiplexing functions. This function enables each ST slot to have an arbitrary period in each communication cycle. For example, ST frames with 2, 4, 8, 16, 32, and 64 cycles of multiplexing are transmitted every 2nd, 4th, 8th, 16th, 32nd, and 64th communication cycle, respectively. Using this multiplexing functionality, multi-rate transmission is possible in a FlexRay network. 3.2.2. Cost functions for the optimal cycle length One of the most important parameters in FlexRay is the communication cycle length, which determines the communication period and affects the frame’s response time.
* CNTSchedule
The number of scheduled frames
* NFrames
The number of ST frames
* NSlots
The number of ST slots
* k = {1, 2, 4, 8, 16, 32, 64}
Cyclic multiplexing values
Figure 5. Response times of an ST frame. The length of the response time is one of the reasons for degraded control performance in distributed control systems. In Figure 5, a response time example for ST frames is presented. There are three cases that have different transmission request timings. As presented in Figure 5, case 3 has the longest response time and is composed of a communication cycle and an ST slot. Pop et al. proposed a general response time model for a FlexRay frame (Pop et al., 2008). Figure 6 describes the WCRT of ST frames in the case of cycle multiplexing. The WCRT can be formulated as follows: RSn = k × CC + Cn
(4)
where, k is a value of cyclic multiplexing, and CC is a communication cycle length. Another cost of designing the optimal communication cycle length is the WCRT of the DYN frame. It is defined by the critical instant (Liu and Layland, 1973, Kopetz, 1997). When all of the DYN frames are requested simultaneously, each DYN frame has the longest response time. In this study, the summation of the WCRT of the DYN frames is
K. JANG et al.
594
Figure 6. WCRT of an ST frame (multi-rate case, k=2). Figure 8. Automatic parameter optimization process.
Figure 7. WCRT of a DYN frame. considered as a cost function for the optimal communication cycle length. The WCRT of the DYN frame is described in Figure 7 and Equation (5). The WCRT of a DYN frame is expressed as follows: (Pop et al., 2008) RDn = σn + λn × CC + w' n + Cn
(5)
where RDn is the WCRT of a DYN frame n; λn is the delayed CC number, and w’n is the delay suffered from the beginning of the last cycle to the start of the transmission of the frame. To analyze the WCRTs of DYN frames, Park et al. Table 5. Pseudocode of the WCRTs of DYN frames. 01 WHILE Transmission of all frDYNs is finished 02
CNTMiniSlot = 1
03
CNTDynSlot = ns+1
04
WHILE CNTMiniSlot d
05
IF frDYN[CNTDynslot] exists THEN
06
INCREMENT CNTDynSlot
07
COMPUTE CNTMiniSlot
08
COMPUTE σ, λ, and w’ of frDYN[CNTDynSlot]
09
ELSE
10
INCREMENT CNTMiniSlot
11
INCREMENT CNTDynSlot
12 13 14
ENDIF ENDWHILE INCREMENT CNTComm.Cycle
15 ENDWHILE *frDYN[i]
ID of i-th DYN frame
*CNTMiniSlot
Minislot counter
*CNTDynSlot
DYN slot counter
*CNTComm.Cycle
Communication cycle counter
introduced an algorithm (Park et al., 2008) that simulates the behavior of FTDMA step-by-step with the worst-case assumptions for DYN frames. The algorithm judges the transmission of DYN frames with their priorities and the available DYN segment. If the length of the DYN segment is not sufficient to transmit the remaining DYN frames, the frames are delayed until the next communication cycle’s DYN segment. The same procedure is then repeated by the algorithm, and the WCRTs of the DYN frames are calculated. The pseudocode of this algorithm is described in Table 5. The cost for ST frames can be expressed by the summation of the WCRTs of the ST frames (Park et al., 2008). NS
JS ( CC ) = ∑ RSn
(6)
n=1
where, JS is the cost function of the ST frames, and NS is the number of the ST frames. The cost for the DYN frames can also be obtained by the summation of the WCRTs of the DYN frames. ND
JD ( CC ) = ∑ RDn
(7)
n=1
where JD represents the cost functions of DYN frames, and ND is the number of the DYN frames. 3.2.3. Communication cycle length optimization Based on the CC length, the number of ST slots and minislots in a communication cycle are varied by the predetermined ratio between ST and DYN segments. We used a ratio of seven to three in this study. By analyzing the WCRTs of the ST and DYN frames concurrently, the optimal CC length is designed to minimize the weighted summation of the WCRTs. The cost function for the optimal CC length is denoted by the weighted summation of JS and JD as follows: min JCC ( CC ) = ω S JS ( CC ) + ω DJD ( CC ) subject to ω S + ω D = 1 CC = { 1, 2, 5, 10, 20 }
(8)
where ωS and ωD are the weighting factors for JS and JD, respectively, and JCC is the cost function for the communication cycle length. The frame-scheduling algorithm iteratively assigns ST frames according to CC length. Then, the costs for the frames are analyzed, and the optimal CC length that minimizes the cost is obtained. Table 3 shows the pseudocode
DESIGN FRAMEWORK FOR FLEXRAY NETWORK PARAMETER OPTIMIZATION
595
Figure 9. Overview of the unified chassis control system. for the optimization of the CC length. The frame scheduling is executed using the algorithm introduc- ed in Table 4, and the WCRTs of DYN frames are comput- ed using the algorithm explained in Table 5. 3.3. Implementation of the Design Framework for FlexRay Network Parameter Optimization The proposed design framework for FlexRay network parameters is implemented in MATLAB as described in Figure 8. In this developed process, the signal specifications are given as a FIBEX formatted file, the XML-based standard format used for representing the networks used in the automotive industry. This file is imported into a MATLAB workspace using an XML parsing program. Based on the signal information, the network parameters are optimized by the proposed network design framework, which is implemented using MATLAB.
4. CASE STUDY: UNIFIED CHASSIS CONTROL SYSTEM To validate the proposed design framework, we present a unified chassis control (UCC) system as a case study. The UCC system aims for improvements in vehicle stability and maneuverability by integrating the main chassis control systems, such as braking, suspension, and steering. Figure 9 shows an overview of the UCC system. This system is composed of four ECU nodes: electronic stability control (ESC), continuous damping control (CDC), electric power steering (EPS), and gateway. The UCC system is a safety-critical system with a number of data exchanges. Therefore, a fast communication speed and timing predictability are required for this system. Due to these characteristics, a FlexRay network is suitable for this system. In this system, the network signals are composed of 119 ST and 3 DYN signals. The ST signals have transmission periods of 10, 20, 50, and 100 ms. These transmission periods are assumed to be a deadline of the ST signals. Each DYN signal is assigned to a DYN frame. The communication speed is 10M bps, and a single communication channel is used. Based on these conditions, the proposed design framework begins from ST slot optimization. The result of using the cost evaluation for ST frame lengths is presented in Figure 10. In this step, the frame-packing algorithm constructs ST frames and evaluates the cost, composed of protocol overhead and
Figure 10. Optimal ST slot length results. Table 6. Summary of the optimal ST slot length. Optimal frame size Total ST frames
10 bytes 11
Total used bits
571 bits
Total unused bits
309 bits
Cost of the protocol overhead JO Cost of the unused resource JU Total cost JST
1,573 bits 309 bits 1,882 bits
unused network resources. As depicted in this graph, the cost is minimized by an ST frame length of 10 bytes. Consequently, 122 ST signals are packed into 11 ST frames as shown in Table 7. Table 6 summarizes the framepacking results. Even though only the network utilization is considered when determining the optimal ST slot length in this study, it can be expanded for the problems in real applications, such as the type of FlexRay communication controller, available memory, and many others. The CC length optimization results are summarized in Table 8 and Table 9. The frame-scheduling algorithm determines the cycle multiplexing parameter for every CC length as described in Table 8. In the case of a 10-ms CC, the network configuration is not schedulable because the shortest WCRT of the ST frame is longer than the shortest deadline of the ST signals (10 ms). As defined in (4), the shortest WCRT of an ST frame is composed of the length of the CC and the ST slot. Therefore, the 10-ms period of an ST frame’s WCRT is longer than 10 ms. Consequently, the cost evaluation results for the optimal CC are summarized in Table 9. The weighting factors ωS and ωD were assumed to be 0.7 and 0.3, respectively. The cost evaluation result for the WCRT of the ST frames is linearly proportional to the CC length. Therefore, a long cycle length has a damaging effect on the WCRTs of the ST frames. Otherwise, the cost of the WCRTs of DYN frames
K. JANG et al.
596
Table 7. Optimal packing results for ST frames (Frame length: 10 bytes). ST signal specifications
Node
Group
ESC EPS CDC
DCU
ST frames
Period [ms] The number of signals
EPS CDC
DCU
80 / 0
Frame 2
80 / 0
31
Group2
10
21
Frame 3
66 / 14
Group3
100
1
Frame 4
2 / 78
Group4
50
12
Frame 5
21 / 59
Group5
20
4
Frame 6
32 / 48
Group6
20
1
Frame7
1 / 79
Frame8
80 / 0
Frame9
80 / 0
Frame10
80 / 0
Frame11
49 / 31
Frame
10
49
CC (1 ms) CC (2 ms) CC (5 ms) 1
1
1
Frame2
1
1
1
Frame3
1
1
1
Frame4
1
1
1
Frame5
2
1
1
Frame6
2
1
1
Frame7
2
1
1
Frame8
2
1
1
Frame9
1
1
1
Frame10
1
1
1
Frame11
1
1
1
Table 9. Results for the optimal CC length. CC [ms]
Therefore, the optimal CC length of this case study is 1 ms.
Cycle multiplexing results
Frame1
1
2
5
JS
153,080
223,080
553,080
JD
12,960
12,960
12,960
JCC
111,044
160,044
391,044
Cost [bit]
Frame1
20
Table 8. Frame scheduling results for the ST frames.
ESC
Used / unused bits [bit]
Group1
Group7
Node
Frame ID
is not affected by the CC length because the length of the DYN segment for all cases is enough to transmit all DYN frames in a CC. Therefore, the WCRT results for the DYN frames have the same cost evaluation in each case. Even though a CC of 1 ms has four cyclic multiplexed frames, as described in Table 8, the summation of the WCRTs for the ST and DYN frames is minimized.
5. CONCLUSIONS In this paper, we present a design framework for FlexRay network parameterization. Our framework is predicated on principles for optimizing the network utilization and the WCRTs of the frames. The method consists of two steps that determine the optimal ST slot length and the optimal communication cycle length. These steps are supported by a frame-packing and a frame-scheduling algorithm, respectively. In the first step of the proposed framework, the optimal ST slot length is determined by the network utilization and frame-packing results. Based on the results from the first step, the second step finds the optimal communication cycle length based on the frame-scheduling results and the WCRT analysis of the ST and DYN frames. The design framework process is clearly defined in a straightforward manner. Therefore, it can also be easily applied to network design applications for automotive, avionic, and industrial fieldbus systems. As shown in the case study, the FlexRay network design problem can be automated using the proposed design framework. Furthermore, its development time and cost can be significantly reduced. ACKNOWLEDGEMENTS−This research was financially supported by the Ministry of Knowledge Economy (MKE) and Korea Institute for Advancement in Technology (KIAT) through the Workforce Development Program in Strategic Technology, and partially supported by Energy Resource R&D program (2006ETR11P091C). Furthermore, this study was also supported by Ministry of Education, Science and Technology through the BK21 Program (201000000000173) and National Research Foundation of Korea (NRF) grant funded (No. 2011-0017495).
DESIGN FRAMEWORK FOR FLEXRAY NETWORK PARAMETER OPTIMIZATION
REFERENCES FlexRayConsortium (2005). FlexRay Protocol Specification 2.1 Rev. A [Online]. FlexRay Consortium. Available at http://www.flexray.com [Accessed]. Hagiescu, A., Bordoloi, U., Chakraborty, S., Sampath, P., Ganesan, P. and Ramesh, S. (2007). Performance analysis of FlexRay-based ECU networks. Proc. 44th Annual Conf. Design Automation. Kopetz, H. (1997). Real-time Systems: Design Principles for Distributed Embedded Applications. Edn. Springer. Lee, H., Park, I., Lee, K. and Sunwoo, M. (2008). Timing analysis of FlexRay bus for gateway design. KSAE 2008 Annual Conf., Korean Society of Automotive Engineers, 133−133. Liu, C. and Layland, J. (1973). Scheduling algorithms for multiprogramming in a hard-real-time environment. J. ACM (JACM), 20, 46−61. Mishra, P. K. and Naik, S. M. (2005). Distributed control system development for flexray-based systems. SAE World Cong. Navet, N., Song, Y., Simonot-Lion, F. and Wilwert, C. (2005). Trends in automotive communication systems.
597
Proc. IEEE, 93, 1204−1223. Paret, D. (2007). Multiplexed Networks for Embedded Systems: CAN, LIN, Flexray, Safe-by-Wire. Ed, John Wiley and Sons, Ltd. New York. Park, I., Youn, J., Ma, J. and Sunwoo, M. (2008). Formal design process for flexray-based control systems with network parameter optimization. SAE Paper No. 20082001-0277. Pop, T., Pop, P., Eles, P., Peng, Z. and Andrei, A. (2008). Timing analysis of the FlexRay communication protocol. Real-Time Systems, 39, 205−235. Ryu, J., Yoon, M. and Sunwoo, M. (2006). Development of a network-based traction control system, validation of its traction control algorithm and evaluation of its performance using Net-HILS. Int. J. Automotive Technology 7, 6, 687− 695. Saket, R. and Navet, N. (2006). Frame packing algorithms for automotive applications. J. Embedded Computing, 2, 93−102. Shin, M. and Sunwoo, M. (2007). Optimal period and priority assignment for a networked control system scheduled by a fixed priority scheduling system. Int. J. Automotive Technology 8, 1, 39−48.