기본 정보
- 저자
- DOI
- 10.48550/arxiv.2006.11559
- 저널
- arXiv (Cornell University)
- 발행년도
- 2022
- 발행기관
- Cornell University
- 피인용수
- 0
- 라이선스
- 0
- 논문 유형
- –
- 언어
- –
- 원문 페이지
- https://doi.org/10.48550/arxiv.2006.11559
- 토픽
- Electric and Hybrid Vehicle Technologies
- OpenAlex ID
- W6910690259
평가 내용
- 관련도
- 사업분야
- 산업용 섬유 · (9) 타이어코드
- 부 분야
- –
- R&D 측면
- –
- 확신도
- –
- 근거 용어
- –
- 판단 근거
- 임베딩 유사도 기반 평가로 '산업용 섬유 > 타이어코드' 분야에 선정된 논문입니다.
- R&D 활용 포인트
- –
- 평가 입력
- –
초록
The FlexRay bus is a modern standard used in the automotive industry.It offers deterministic message transmission with zero jitter while using time-triggered scheduling in the static segment. When several vehicle variants (i.e. different models and their versions) share the same signal, the car manufacturers require to schedule such signal at the same time in all vehicle variants. This requirement simplifies the signal traceability and diagnostics in different vehicle variants using the same platform and simplifies reuse of components and tools. In this paper, we propose a first fit based heuristic algorithm which creates the schedules for several vehicle variants at once, while transmitting a given signal at the same time in all the schedules. The scheduling algorithm also takes the time constraints as release dates and deadlines into account. Finally, different algorithm versions are compared on benchmark sets and low computational time demands are validated on large instances.
본문 41,311자
본문 펼치기
CZECH INSTITUTE OF INFORMATICS
ROBOTICS AND CYBERNETICS
INDUSTRIAL INFORMATICS DEPARTMENT
# Multi-Variant Time Constrained FlexRay Static Segment Scheduling
##### Jan Dvoˇr´ak and Zdenˇek Hanz´alek
DOI: `https://doi.org/10.1109/WFCS.2014.6837576`
Cite as: J. Dvorak and Z. Hanzalek. Multi-variant time constrained flexray
static segment scheduling. In _2014 10th IEEE Workshop on Factory Communication_
_Systems_ _(WFCS_ _2014)_, pages 1–8, 2014
Source code: `https://github.com/CTU-IIG/FlexRaySSScheduler`
_⃝_ c 2014 IEEE. Personal use of this material is permitted. Permission from IEEE must be
obtained for all other uses, in any current or future media, including reprinting/republishing
this material for advertising or promotional purposes, creating new collective works, for resale
or redistribution to servers or lists, or reuse of any copyrighted component of this work in other
works.
### Multi-Variant Time Constrained FlexRay Static Segment Scheduling
Jan Dvorak
Department of Control Engineering
FEE, Czech Technical University in Prague
Prague, Czech Republic
dvoraj57@fel.cvut.cz
Zdenek Hanzalek
Department of Control Engineering
FEE, Czech Technical University in Prague
Prague, Czech Republic
and Porsche Engineering Services, s.r.o.
hanzalek@fel.cvut.cz
##### Abstract
The FlexRay bus is a modern standard used in the
automotive industry. It offers deterministic message
transmission with zero jitter while using time-triggered
scheduling in the static segment. When several vehicle
variants (i.e. different models and their versions) share
the same signal, the car manufacturers require to schedule such signal at the same time in all vehicle variants.
This requirement simplifies the signal traceability and
diagnostics in different vehicle variants using the same
platform and simplifies reuse of components and tools.
In this paper, we propose a first fit based heuristic
algorithm which creates the schedules for several vehicle variants at once, while transmitting a given signal at
the same time in all the schedules. The scheduling algorithm also takes the time constraints as release dates and
deadlines into account. Finally, different algorithm versions are compared on benchmark sets and low computational time demands are validated on large instances.
##### 1 Introduction
The current automotive industry produces vehicle models containing a lot of electronic control units (ECUs).
These units are used to control almost everything from
directional indicators to the driver assistance system.
Moreover in the upcoming vehicle models x-by-wire
systems are replacing mechanic and hydraulic control
systems. Consequently, the demand of the bus bandwidth will increase significantly and more criticalityrelated requirements will need to be satisfied. The
FlexRay standard has been designed to handle this situation. The bus offers ten times more bandwidth compared to the CAN bus. A static segment with time
division multiple access can be used for time critical
signals. In this segment, signals are transmitted to the
bus at exact time points determined by a schedule. The
schedule must be known in advance.
1.1 Motivation
It is s basic practice for automotive concerns that many
vehicle models are built on a common technological
platform. For example, the vehicle models as Audi A3,
SEAT Leon, Volkswagen Golf and Skoda Octavia share <sup>ˇ</sup>
a modular construction of the MQB platform. Moreover, these vehicle models also have many versions
(with a basic or advanced ECUs with different sensors
etc.). In order to simplify the reuse of components,
it is desired to have the inner vehicle communication
as similar as possible for all the models and variants.
From this perspective, it would be ideal to create just
one schedule for all variants with all theirs signals but
such a schedule would have a very low utilization of the
bus and, consequently, it would limit the number of signals. We need to deal with this and find some clever
solution. In our case, we follow the practice where
the same signals are placed in the same positions in all
schedules they participate and each vehicle variant has
a schedule which differs in positions of specific signals
only. With this requirement, it is, for example, easier to
develop a diagnostic tool because one tool can then be
used for all vehicle variants (shortly variants). From another point of view, it also simplifies the configuration
of ECUs, typically supplied by third parts, because one
bus configuration of the ECU may fit to several variants. In the consequence, the less expensive tests are
involved because many mistakes (related to the time dependent electromagnetic interferences for example) are
eliminated.
There are already several algorithms that are used for
the FlexRay static segment scheduling, but these are
suited for one variant schedules only. Our new scenario
considers new algorithm that creates the schedules for
all the variants at once. We call this problem MultiVariant scheduling.
1.2 FlexRay overview
The FlexRay standard describes a new generation bus
developed to satisfy the performance and safety requirements in the advanced automotive industry. It is able to
operate with data transmission rates up to 10 Mb/s. The
FlaxRay communication protocol was further designed
to fit all criticality constraint requirements that arise in
automotive industry.
The standard offers two channels to be used for communication. These channels can be used for independent communication as well as for increasing the fault
tolerance. We can use different network topologies such
as a bus topology or an active star topology. It is also
possible to use a hybrid topology and different topologies in both channels. A set of ECUs connected to the
shared FlexRay network is denoted as a cluster. Each
ECU connected to this network is called a node. The
node can transmit/receive information to/from a bus
in predetermined time intervals. A few special nodes
(ColdStart nodes and Sync nodes ) are used for starting
the bus up and the bus time synchronization.
The FlexRay communication is organized in cycles.
Each communication cycle has its own six-bit cycle
number. Thus, there can be up to 64 different cycles.
The set of these different cycles is called a hyperperiod
Symbol window NIT
communication cycle
Static segment Dynamic segment
Static
Slot 1
Static
Slot 2
Static
Slot 3
Static
Slot n
Figure 1: FlexRay communication scheme
and it is periodically repeated. One communication cycle (presented in Figure 1) consists of four segments:
_•_ Static segment
_•_ Dynamic segment
_•_ Symbol window
_•_ Network idle time
Only the static segment and network idle time are
mandatory. In the static segment, the time critical signals are exchanged using a time-triggered scheme based
on TDMA. The data structure used by the nodes to
transmit the data within the static segment is called a
frame. The schedule that controls when the frame is
transmitted to the network must be known before the
bus is started. The dynamic segment fulfills the requirements for event-triggered communication. In this segment, dynamic minislotting based scheme is employed.
The symbol window is used for network management
messages and special symbol broadcasting. The network idle time (also referred as NIT) is the last segment
and during this time no communication takes place. In
this time, each node synchronizes its own inner clocks
before a new communication cycle starts.
In this paper, we will focus only on the static segment. The static segment is divided into time intervals
of the same duration called static slots. Each frame of
the static segment within the hyperperiod is identified
by its cycle and slot number. A given slot is reserved
for a given node (i.e. the frames transmitted in a given
slot need to be from one node in all cycles). The frame
can contain more than one signal but the sum of payloads of these signals must not exceed the duration of
the slot.
1.3 Related works
Several papers were published recently that focus on
the FlexRay protocol and particularly the static segment
scheduling problem. The FlexRay 3.0.1 is described in
detail by the FlexRay <sup>TM</sup> Communication System Protocol Specification [1]. In the automotive industry, this
bus is used together with the AUTOSAR Specification [2, 3]. Nowadays, BMW or Audi use the FlexRay
bus in several series-production vehicles. BMW presented its real-world benefits in [4].
A milestone in the static segment scheduling area is
the article [5] where the transformation of the basic
static segment scheduling problem without time constraints to a two-dimensional bin packing problem was
introduced. The authors presented an ILP model and
also a successful heuristic based on the first fit heuristic
for the bin packing problem. The objective is to minimize the number of the scheduled slots and obtain an
extensible schedule. The time-constrained problem was
proposed in [6]. This paper employs an idea of twostage scheduling, when in the first step, frame packing
is performed. After packing the signals to the frames,
a frame scheduling algorithm creates the schedule. The
response time analyze for the rate monotonic scheduling of the static segment was proposed in [7]. But this
paper does not meet the requirements of the AUTOSAR
specification and also require modifications of the middleware.
A genetic algorithm for the FlexRay scheduling is introduced in [8, 9]. These papers take care not only about
the static segment scheduling but also about the placement of tasks into the nodes. A new idea of a switched
FlexRay network is presented in [10]. In the switched
network, an active star hub is replaced by a switch. It offers the possibility to send different frames in different
branches in the same time interval. The branch-andprice based algorithm combined with the branch-andbound was developed for such frame scheduling. Moreover, the first fit decreasing heuristic was presented
which returns good results for input cases even if the
exact algorithm does not finish at the appropriate time.
An ILP model for scheduling of signals that can have a
jitter in the period is proposed in [11]. The constraint
logic programming formulation (CLP) for fault-tolerant
scheduling in the FlexRay static segment is introduced
in [12].
The concept of holistic time analysis of the FlexRay
communication protocol is presented in [13] and [14].
The scheduling algorithm and time analysis for the dynamic segment are proposed in [15].
All these articles focus on creating independent
schedules and no shared constraints are taken into account.
In the computer science, a similar problem as multivariant scheduling is the multiprocessor task scheduling, where some tasks needs two or more processors si
multaneously to be executed. The survey for this problem is in [16]. In [17] the problem complexity is investigated for the multiprocessor task scheduling problem
with prespecified processor allocations. It means that
it is known in advance exactly which set of processors
will be used to execute each task. But in the multiprocessor task scheduling problem each task is executed
only once, thus it has no period assigned.
1.4 Paper outline
The paper is organized as follows: Section 2 describes the multi-variant time constrained static segment scheduling problem and the signal set used for
benchmarking. In Section 3, new efficient data structures are introduced and the first fit based heuristic algorithm is proposed which are the main contributions of
this paper. Computational efficiency and performance
evaluation of the experiments are presented in Section
4, Section 5 concludes the paper.
##### 2 Problem statement
The problem addressed in this paper is to create the
FlexRay static segment schedules for a set of variants.
The objective is to find an assignment of a signal set _S_
into slots and cycles such that the number of the used
slots is minimized (i.e. the length of the longest static
segment, of all variants, is the shortest possible).
The FlexRay network configuration consists of many
parameters including the cycle length, the number of
static slots in the static segment, the duration of the
static slot, duration of the NIT segment, etc. These
parameters are usually predefined by the system
designer and further followed by the ECU suppliers.
We assume that these parameters are known and are
not the part of the optimization process. The following
setting based on the BMW network design [18] is
used in this paper. The communication cycle duration
_F_ is equal to 5 ms where the static segment takes
3 ms and the rest of the communication cycle is
filled by the dynamic segment, symbol window and
NIT. There are 75 static slots each with duration
of 0.04 ms. The frame payload _W_ is in the range
from 32 to 128 bits. Each signal _i_ has the following
parameters defined (the same denotation is used in [6]):
_Ni_ - unique identifier of the ECU, which transmits sig
nal _i_,
_Ti_ - the signal period, the signal is assumed to be trans
mitted only once in the FlexRay cycle,
_Oi_ - the signal release date, it is the latest time after
which the first instance of the signal is produced in
relation to the start of the hyperperiod,
_Ci_ - signal length in bits,
_Di_ - the deadline associated to the signal _i_, it repre
sents the maximum age acceptable at the consumer
endpoint.
Moreover, in the multi-variant scheduling, each signal can be used by one or more variants. For this reason,
binary matrix _Vi,j_ is introduced as follows: _Vi,j_ is equal
1 if the variant _j_ uses the signal _i_ and 0 otherwise. If two
or more variants should use signal _i_ in the schedule, this
signal must be placed at the same position (cycle, slot,
even offset in the frame) in all of these schedules. We
call this a shared constraint. This is the reason why it is
not possible to create all those schedules independently.
The next assumption is the usage of the AUTOSAR
communication stack [2], which is the de facto standard for automotive applications and it is also considered for other industry applications such as aviation. In
this context, the AUTOSAR frame contains processing
data units (PDU) where each PDU consists of one or
more signals. In the AUTOSAR context, it is defined
that scheduling is static and cannot be changed during
the runtime. It is further assumed that the maximal signal size cannot exceed the data payload of the frame. It
means that the signal cannot be split into two or more
frames. Moreover, in the AUTOSAR specification, it
is defined that one slot is strictly assigned to one node.
So it is not possible to use multi-node multiplexing because the slot is reserved for the transmission to the
same ECU in every cycle.
2.1 Signal set
The scheduling approaches are applied to the modified Society of Automotive Engineers (SAE) benchmark signal set. The SAE report describes a set of
signals sent between seven different subsystems in an
electric car prototype. The Basic SAE signal set defines
53 sporadic and periodic signals. A periodic message
has a fixed period 5, 10, 100 or 1000 ms, and implicitly requires the latency to be less than or equal to this
period. For our purposes, these periods must be resampled because the AUTOSAR specification only allows
periods which are equal _{m ·_ 2 <sup>_n_</sup> _|_ _n_ = 1 _. . ._ 6 _}_, where
_m_ is the shortest period. Sporadic messages have latency requirements imposed by the application: for example, all messages sent as a result of a driver action
have a latency requirement of 20 ms. The reader is referred to the work of Kopetz [19] for a more detailed
benchmark description. Due to the high FlexRay bandwidth and electronic equipment’s requirements in todays cars we extended the SEA benchmark using NETCARBENCH [20] to increase the number of signals
with the same probability distribution function of parameters. The newly created signal sets have up to 3000
signals per node and a few added parameters (such as
release date and deadline). The signals are exchanged
among up to 23 nodes. Several signals are sent only on
a change event where the maximum deadline is defined.
These signals are transformed to periodic signals with
periods equal to deadlines.
2.2 Time constraints
In order to simplify the problem, we consider release
date _Oi_ and deadline _Di_ to be rounded to the start of
the earliest and the end of the latest complete cycle respectively in which we can transmit signal _i_ (as in [6]).
This simplification is adequate since the precise specification of the release dates and deadlines have an influence only if these values fall in the static segment. But
if they fall in the dynamic segment, they are rounded
to the length of the cycle anyway. This simplifies our
scenario because the release dates and deadlines can be
only multiples of the cycle length. The position of a
signal within the static segment of a particular cycle is
insignificant with respect to the position of the signal
within the hyperperiod. But a situation can arise when
an optimal solution is discarded by this transformation
because, due to the rounding, we can cut off a few feasible signal positions from the search space and, thus, we
may lose some optimal solutions. But we assume that
this situation is rare in real cases.
2.3 Example 1: Multi-variant signal set
For a better understanding we introduce a small example. In our case, the communication cycle duration is
set to 5 ms and the frame payload is 16 bits. There are
eight signals sent by the three ECUs with the parameters
described in Table 1. These signals are to be scheduled
to two variants. Matrix _Vi,j_ is shown in Table 2. Variant I uses signals _A, B, C, D, F, G_ and variant II uses
signals _B, C, E, F, H_ . So it means that signals _B, C, F_
<u>Signal</u> <u>Node</u> <u>Period</u> <u>Length</u> <u>Rel.</u> <u>date</u> <u>Deadline</u>
A 1 5 ms 8 b 0 ms 5 ms
B 1 10 ms 8 b 0 ms 10 ms
C 1 10 ms 8 b 0 ms 10 ms
D 1 20 ms 8 b 5 ms 15 ms
E 1 20 ms 16 b 10 ms 15 ms
F 1 10 ms 16 b 5 ms 10 ms
G 2 20 ms 8 b 0 ms 15 ms
H 3 20 ms 8 b 0 ms 15 ms
Table 1: Parameters of signals in Example 1
<u>Variant</u> <u>A</u> <u>B</u> <u>C</u> <u>D</u> <u>E</u> <u>F</u> <u>G</u> <u>H</u>
I 1 1 1 1 0 1 1 0
II 0 1 1 0 1 1 0 1
Table 2: Matrix representing assignment of signals to
variants considered in Example 1
are used in both variants and they have to be scheduled
at the same positions. A feasible (respecting the time
constraints and shared constraints) solution for this case
is presented in Figure 2. The signal _G_ cannot be placed
into the second slot because this slot is used by the first
node and the signal _G_ is transmitted by node 2. So a
new slot must be allocated for the signal. The same situation is with signal _H_ in variant II.
Variant I Variant II
We call them native schedules. But in this case, during the scheduling process, there is a lot of inefficiency
because we have to go through all of these schedules
to check the shared constraints. Moreover, if there is a
significant number of common signals for several variants, it is also necessary to allocate them in every schedule. But it is sufficient to know their position just in one
schedule because this position must be the same for all
variants using them. Therefore, in our algorithm, we
use a different representation because we assume that
many signals are used in all variants.
<u><mark>G</mark></u>
1
2
3
4
<mark>H</mark>
C
<mark>A</mark> <u><mark>G</mark></u>
<u><mark>A</mark></u>
<u><mark>A</mark></u>
<mark>A</mark>
B
C
F
B
<mark>E</mark>
C
<u><mark>D</mark></u>
F
<mark>B</mark>
<mark>B</mark>
<mark>C</mark>
1
2
3
4
<mark>A</mark>
<mark>A</mark>
<mark>A</mark>
<mark>A</mark>
<mark>G</mark> 1 <mark>C</mark> <mark>H</mark>
<mark>C</mark> <mark>G</mark> 1
<mark>F</mark> 2 <mark>B</mark>
<mark>C</mark> <mark>D</mark> 3 <mark>E</mark>
<mark>F</mark> 4 <mark>B</mark>
<mark>F</mark>
<mark>F</mark>
<mark>D</mark> 3 <mark>E</mark>
<mark>C</mark>
<mark>F</mark>
<mark>F</mark>
1
2
3
4
1 2 3
slot
1 2 3
slot
Figure 2: Feasible schedules for Example 1
##### 3 Algorithm
In this section, we will explain the components of the
proposed algorithm. But first, let us introduce the main
data structures used in our algorithm.
3.1 Multischedule
The most important thing for the algorithm is to use an
efficient data structure for the schedule representation.
In our case, there are two ways how to do it. In the
first, and also most natural way, it would be possible to
have one schedule for each variant (like in Figure 2).
1 2 3
##### slot
Figure 3: Feasible multischedule for Example 1
With this assumption, we can make a more efficient representation. Instead of creating schedules for
each variant we create just one shared schedule (multischedule) for all variants. Here, the common signals
are placed once and there is no redundancy caused by
checking the constraints. But unlike in the native schedule, in the multischedule two or more signals may overlap. Just like the native schedule consists of frames, the
multischedule ( _MS_ ) consists of multiframes. We denote
these multiframes as _MSi,j_, where _i_ is the cycle number
and _j_ is the slot number. The multischedule for Example 1 is presented in Figure 3. We can see that signal _E_
is scheduled at the same position as signal _A_ in _MS_ 3 _,_ 1.
It is easy to derive any native schedules from the multischedule by removing all signals that are not used in
the particular variant.
3.2 Mutual exclusion matrices
For placing signals to the multischedule, we need to
know which signals may be mutually overlapped. Over
lapping can arise only if these two signals are not scheduled together in any variant. Otherwise, it would result
in an infeasible schedule for a variant that uses both signals. Checking if we can overlap two particular signals is a relatively time consuming operation because
we need to check all variants if they use both signals
or not. But, this information is static and known in
advance. Therefore, during the reading of the input
instance, we create a Signal Mutual Exclusion Matrix
( _SMEM_ ). _SMEM_ is a symmetric binary matrix with the
dimension equal to the number of signals. The matrix
contains 1 for each pair of signals if these signals are to
be scheduled together in some variant or 0 otherwise.
Thus two signals _S_ 1 and _S_ 2 can mutually overlap only
Node 1
Node 2
Node 3
Node 1
Node 20
Node 31 0
1 0 0
##### A B C D E F G H
##### A 1 B 1 1 C 1 1 1 D 1 1 1 1 E 0 1 1 0 1 F 1 1 1 1 1 1 G 1 1 1 1 0 1 1 H 0 1 1 0 1 1 0 1
Table 3: Signal mutual exclusion matrix for Example 1
if _SMEMS_ 1 _,S_ 2 = 0. In our Example 1, it holds only for
pairs _{A, E}_ ; _{A, H}_ ; _{D, E}_ ; _{D, H}_ ; _{E, G}_ and
_{G_ ; _H}_ as presented in Table 3.
The multischedule has one extra feature in addition
to the native schedule. As can be seen in Figure 3, one
slot in the multischedule can be occupied by more than
one node. In our case, in multiframe _MS_ 1 _,_ 3 two signals
are scheduled. Signal _G_ is from node 2 and signal _H_ is
from node 3. To be sure that this behavior does not result in an infeasible schedule, we permit this only if the
signals from these two nodes do not appear together in
one variant. Thus, we need to know the same information as what holds in _SMEM_ for signals, but in this case
for nodes. We can also derive this information from the
input instance and save it to the matrix. We call this
matrix a Node Mutual Exclusion Matrix ( _NMEM_ ). This
symmetric binary matrix contains 1 if the nodes are different and appear in some variant together and 0 otherwise. The _NMEM_ matrix for our Example 1 is shown
in Table 4.
Table 4: Node mutual exclusion matrix for Example 1
Input: _S_
( _SMEM_, _NMEM_ ) _←_ CALCULATEMEMS( _S, Vi,j_ );
_SL ←_ SORT( _S_ );
initialize _MS_ ;
for _i ←_ 1 to _|SL|_ do
PLACESIGNALTOSCHEDULE( _MS, SLi, SMEM,_
_NMEM_ );
end
Algorithm 1: First fit algorithm
3.3 First fit heuristic
In article [5], it was shown that the scheduling problem
for the static segment of the FlexRay without time constraints is reducible to the two-dimensional bin packing problem. For this problem, the first fit decreasing
heuristic (items are sorted according to decreasing size
and then placed one by one to bins in the first suitable
position) is known and applicable with an approximation factor 2 (it is proved that solution found by the
heuristic can not be worse than twice w.r.t. optimum).
But, after adding time constraints, this approximation
factor does not hold. So we propose the general first fit
heuristic that is initialized by ordered list of signals _SL_ .
Used First fit algorithm is outlined in Algorithm 1.
At the beginning of algorithm, the mutual exclusion
matrices are calculated (from signal set _S_ and matrix
_Vi,j_ ), then the _SL_ list is constructed by ordering the signals from _S_ . Then, we allocate the memory and initialize the multischedule _MS_ . After that, the signals are
sequentially read from _SL_ and we place them to the multischedule by the first fit policy.
The most important part of the first fit algorithm is the
PlaceSignalToSchedule procedure (Algorithm 2). This
procedure is responsible for finding a sufficient position (a position where all the constraints are satisfied)
and placing the signal to the constructed _MS_ . First, the
procedure needs to find a feasible position for the first
instance of the signal. We denote these instances as the
signal job. The FindPositionForSignal procedure finds
this position and saves it to the _placePosition_ variable.
PlaceSignalToSchedule
_(MS, signal, SMEM, NMEM)_
_{_
_infeasiblePosition ←_ _true_ ;
while _infeasiblePosition_ = _true_ do
_placePosition_ =
FINDPOSITIONFORSIGNAL( _MS, signal,_
_SMEM, NMEM_ );
if _placePosition not found_ then
break ;
end _cycle_, _slot_, _offset_
_←_ _placePosition_ ;
_infeasiblePosition ←_ _false_ ;
while _cycle < hyperperiod_ do
if _(cycle, slot, offset) is not suitable for signal_
then
_infeasiblePosition ←_ _true_ ;
break ;
end
_cycle_ += _T_ _signal_ ;
end
end
if _infeasiblePosition_ then
_placePosition ←_ ALLOCATENEWSLOT( _MS_ );
end
PLACESIGNAL( _signal, MS, placePosition_ );
_}_ Algorithm 2: PlaceSignalToSchedule procedure
For the signal placement we have to know the cycle
number, the slot number and also offset in a frame. It is
not possible to deduce the offset in the frame after the
scheduling phase as in [5]. Because of the shared constraints, it does not hold that if there are enough free bits
for the signal in the multiframe we can also find enough
free bits in the sequence for placement.
If no feasible position for the first signal job is found
then we can finish searching because there is no appropriate position in the already allocated slots. Therefore,
we need to allocate a new slot in _MS_ and obtain the first
feasible position for the signal in this slot and place it
there.
If a feasible position is found by the
FindPositionForSignal procedure it does not necessary mean that we can place the signal there. This
holds only if _SL_ is sorted in an increasing order of
periods but not in a general case. Thus, we need to
check the conflict for each signal job. If the position
of the first signal job is determined, then the positions
FindPositionForSignal _(MS, signal, SMEM, NMEM)_
_{_
( _slot_, _cycle_, _offset_ ) _←_ _lastPosition_ ;
foreach _slot after lastPosition_ do
foreach _node_ in GETNODES( _slot_ ) do
_signalNode_ = _N_ signal;
if _NMEMsignalNode,node_ then
continue with next slot;
end
end
foreach _cycle after lastPosition < Dsignal_ do
_offset_ = FINDSUITABLEOFFSET( _MScycle,slot,_
_signal, SMEM, NMEM_ );
if _offset is found_ then
_lastPosition ←_ ( _slot_, _cycle_, _offset_ );
return _lastPosition_ ;
end
end
end
return _not found_ ;
_}_ Algorithm 3: FindPositionForSignal procedure
of all the signal jobs are easy to deduce because of
the strict period. Its slot number and offset in the
frame are the same, only the cycle number is greater
by a multiple of the signal period. If there are free
positions for all the signal jobs then the feasible signal
position is found. We can stop searching and place the
signal to the determined position. Otherwise in the
case when some signal job cannot be assigned to the
corresponding position in the multiframe we need to
find a new position for the first signal job and check its
feasibility again.
The most computationally intensive and complex
part is calling the FindPositionForSignal procedure described in Algorithm 3. The procedure can be called
many times for a single signal. First, we restore the position found by last procedure call because we want to
find the next one. If the procedure is invoked for the
first time the _lastPosition_ variable is equal to the signal release date. Then, we check the multiframes after
this position that satisfy the time constraints until some
sufficient position is found. But we only need to check
the multiframes in the slots in which the transmitting
node can operate. Because more than one node can be
assigned to one slot in _MS_ we iterate through all these
nodes and check if there is some conflict. If not, we
look for a sufficient multiframe otherwise we can skip
this slot. A multiframe is sufficient if we can find an
offset where the first signal job could be placed. This is
done by the FindSuitableOffset procedure presented in
Algorithm 4.
FindSuitableOffset _(frame, signal, SMEM, NMEM)_
_{_
_freeBits_ = ALLOCATEMEMORY( _W_ );
foreach _fs_ in GETSIGNALS( _frame_ ) do
_fsOffset_ = GETOFFSET( _fs_ );
if _SMEMfs,signal_ then
for _i ←_ _fsOffset_ to _fsOffset_ + _Cfs_ do
_freeBits[i] ←_ 1;
end
end
end
return FINDFIRSTSUITABLEOFFSET( _freeBits[i]_ );
_}_
Algorithm 4: FindSuitableOffset
For placing the signal job to the multiframe, there
must be at least as many free bits in the sequence as is
in the payload of the signal. The free bit, in our case,
means that, in this bit of the multiframe, no signal is
placed that could cause a conflict with the currently assigned one. Hence, we create the binary array called
_freeBits_ that has the same length as is the multiframe
payload. Initially, the _freeBits_ array contains only zeroes. Then, we iterate through all signals _fs_ already assigned to the multiframe. If _fs_ is in conflict with the assigned signal all positions in the _freeBits_ corresponding
to _fs_ are set to 1. Finally, each position of the array contains 0 if the bit in the mutiframe is free and 1 otherwise.
The FindFirstSuitableOffset function then finds the first
position in the _freeBits_ array where the sequence of zeroes of length at least equal to the payload of the signal
starts. This position is also equal to the first position
where the signal can be placed in the multiframe. Thus,
this position is returned as a sufficient offset.
##### 4 Experimental results
The proposed algorithm was coded in C++ and tested
on a PC with an Intel _⃝_ R Core <sup>TM</sup> 2 Duo CPU (2.8 GHz)
and 8 GB RAM memory. For the experiments, the
SAE benchmark signal set was used. From this basic
set we created seven extended benchmark sets as in [6].
Detailed description of the extended sets is as follows:
_set1_ - neither release dates nor deadlines are defined
- 3 nodes
<u>TS</u> <u>FF</u> <u>FFP</u> <u>FFW</u> <u>FFL</u> <u>FFC</u>
_set_ 1 20.2 30.9 19.0 19.0 41.4 19.0
_set_ 2 20.4 32.5 19.2 19.2 41.6 19.2
_set_ 3 20.4 32.6 19.3 19.4 41.0 19.3
_set_ 4 19.7 29.8 18.6 18.6 43.3 18.6
_set_ 5 11.8 28.8 11.3 11.3 38.2 11.1
_set_ 6 26.4 55.5 24.6 24.6 63.3 24.4
_set_ 7 28.9 47.5 28.6 28.6 49.0 28.6
1 _ECU_ 500 17.6 25.9 17.0 17.0 27.7 16.9
1 _ECU_ 1000 34.3 58.1 33.8 33.7 63.7 33.7
<u>1</u> _<u>ECU</u>_ <u>3000</u> <u>23.2</u> <u>120.0</u> <u>22.5</u> <u>22.6</u> <u>134.6</u> <u>22.4</u>
Average 22.3 46.2 21.39 21.4 54.4 21.3
Table 5: Number of the slots allocated by different algorithms
_set2_ - deadlines are not set, release dates are spread across
the first five communication cycles
- 3 nodes
_set3_ - each deadline is set in the last third of the signal
period, each release date is set in the first five communication cycles
- 3 nodes
_set4_ - similar to _set2_
- 3 nodes
_set5_ - deadlines are not set, release dates are spread across
the first five communication cycles
- 6 nodes
- 64-bit payload
_set6_ - similar constraints as _set5_, but with a higher num
ber of signals
- 6 nodes
_set7_ - neither release dates nor deadlines are defined, but
there are around 40 signals per node in average
- 23 nodes
All of these sets contain 500 to 1000 signals. Because
each of them was scheduled in less then 0.1 s, three
extra benchmark sets were prepared to measure the
computation time. All signals are transmitted from one
node. This results in more computational cost because
we cannot skip any already allocated slot ( _NMEM_
is equal 0). The description of these extra sets is as
follows:
_1ECU500_ - deadlines are randomly defined, each release date is set in the first five communication cycles
- about 500 signals
_1ECU1000_ - the same as _1ECU500_
- about 1000 signals
<u>TS[s]</u> <u>FF[s]</u> <u>FFP[s]</u> <u>FFW[s]</u> <u>FFL[s]</u> <u>FFC[s]</u>
1ECU500 0.202 0.032 0.059 0.060 0.039 0.068
1ECU1000 0.877 0.168 0.243 0.248 0.202 0.262
1ECU3000 16.09 1.314 1.099 1.149 1.950 1.141
Table 6: Runtime of the algorithms
_1ECU3000_ - the same as _1ECU500_
- 128-bit payload
- about 3000 signals
The described datasets have a payload set to 32 bits
with the exception of _set5_ and _1ECU3000_ . Each set
consists of 10 test cases. In all of these test cases,
twenty variants were randomly generated such that all
signals were used. Each variant had a random number
from 0 to 0.7 assigned. The signals are then added to
the variant with the probability denoted by this number.
So we are simulating different vehicle classes (from the
cheap variant with only a few signals to the expensive
one with many signals).
We tested several algorithms for comparison. The TS
algorithm is the modified two-stage algorithm described
in [6] for the time constrained static segment scheduling. It packs the signals into multiframes first and then
it schedules the already assembled multiframes. The
remaining algorithms are using the proposed first fit algorithm with different ordering. The FF (FirstFit) algorithm uses no ordering. It just schedules the signals
in the order in which they are read from the input instance. The FFP (FirstFitPeriod) algorithm sorts signals
according to the signal period in an increasing order.
The FFW (FirstFitWindow) algorithm uses an increasing order of time windows (the gaps between the release
dates and deadlines) so the signals that only have a few
cycles where they can be placed are scheduled first. The
FFL (FirstFitLength) algorithm schedules signals in a
decreasing order of the signal payload. The FFC (FirstFitCombined) algorithm is a combination of multiple
ordering. In this case, the signals are sorted by the stable sorting algorithm in sequence according to: decreasing payload, increasing windows, increasing period and
increasing node number.
The experimental results are presented in Table 5. In
this table, the benchmark sets are situated in the rows
and the different algorithms are in the columns. Each
cell contains an average number of the used slots computed from all test cases of the benchmark set. In the
last row there is the overall average for the particular
algorithm.
Table 6 presents the runtime of the algorithms on the
extra benchmark sets. The table is organized in the
same way as Table 5. As we can see, FFP, FFW and
FFC return good results in terms of the quality and also
in better time than FFL and FF. The TS algorithm returns only a little bit worse solutions but it consumes
much more time for the test cases with a greater number
of signals per node. The FFL algorithm returns worse
results than FF. It is due to the nature of the benchmark set where signals with bigger payloads often have
a bigger period too. If the signals with a big period are
placed first then it is also more complicated to find a
feasible position for the other signals. The consequence
of this behavior is also a bad performance.
##### 5 Conclusion
In this paper, we described the heuristic based on first fit
policy for solving a multi-variant time constrained static
segment scheduling problem. We introduced new data
structures for better efficiency and performance and we
showed that the idea of the first fit decreasing algorithm
from the bin packing problems area is useful for solving
a multi-variant scheduling problem.
We tested our proposed algorithm with several types
of signal ordering. The best results were obtained by the
combination of multiple ordering. But the most important outcome is a good quality result with ordering according to the increasing period. There is possibility to
optimize the FFP algorithm to gain better performance.
It is also possible, because of relatively low computational complexity, to use the proposed algorithm as
a basis for a genetic algorithm or other metaheuristic.
In the future, the method for incremental multi-variant
scheduling should be proposed.
##### Acknowledgment
This work was supported by the Grant Agency
of the Czech Republic under the Project GACR
P103/12/1994.
##### References
[1] FlexRay consortium, “Flexray communications
system protocol specification version 3.0.1,” Oct
2010.
[2] AUTOSAR Development Partnership, “Autosar
requirements on flexray v4.0.1,” Oct 2013.
[3] AUTOSAR Development Partnership, “Autosar
specification of flexray interface v3.5.0,” Oct
2013.
[4] BMW, “Goals and architecture of flexray at bmw,”
Mar 2007.
[5] M. Lukasiewycz, M. Glaß, J. Teich, and P. Mil
bredt, “Flexray schedule optimization of the static
segment,” in _Proceedings_ _of_ _the_ _7th_ _IEEE/ACM_
_International_ _Conference_ _on_ _Hardware/Software_
_Codesign_ _and_ _System_ _Synthesis_, CODES+ISSS
’09, (New York, NY, USA), pp. 363–372, ACM,
2009.
[6] Z. Hanzalek, D. Benes and D. Waraus, “Time
constrained flexray static segment scheduling,” in
_preprints_ _of_ _the_ _10th_ _International_ _Workshop_ _on_
_Real-Time_ _Networks_ _(RTN2011),_ _In_ _conjunction_
_with ECRTS 2011, Porto, Portugal, July 5th_, 2011.
[7] R. Lange, F. Vasques, P. Portugal, and
R. de Oliveira, “Guaranteeing real-time message deadlines in the flexray static segment
using a on-line scheduling approach,” in _Factory_
_Communication Systems (WFCS), 2012 9th IEEE_
_International_ _Workshop_ _on_, pp. 301–310, May
2012.
[8] S. Ding, H. Tomiyama, and H. Takada, “An ef
fective ga-based scheduling algorithm for flexray
systems,” _IEICE_ _-_ _Trans._ _Inf._ _Syst._, vol. E91-D,
pp. 2115–2123, Aug. 2008.
[9] S. Ding, “Scheduling approach for static segment
using hybrid genetic algorithm in flexray systems,” in _Computer_ _and_ _Information_ _Technology_
_(CIT),_ _2010_ _IEEE_ _10th_ _International_ _Conference_
_on_, pp. 2355–2360, 2010.
[10] T. Schenkelaars, B. Vermeulen, and K. Goossens,
“Optimal scheduling of switched flexray networks.,” in _DATE_, pp. 926–931, IEEE, 2011.
[11] K. Schmidt and E. Schmidt, “Message schedul
ing for the flexray protocol: The static segment,” _Vehicular_ _Technology,_ _IEEE_ _Transactions_
_on_, vol. 58, no. 5, pp. 2170–2179, 2009.
[12] B. Tanasa, U. Bordoloi, P. Eles, and Z. Peng,
“Scheduling for fault-tolerant communication on
the static segment of flexray,” in _Real-Time_
_Systems_ _Symposium_ _(RTSS),_ _2010_ _IEEE_ _31st_,
pp. 385–394, 2010.
[13] Y. Hua, X. Liu, and W. He, “Hosa: Holistic
scheduling and analysis for scalable fault-tolerant
flexray design,” in _INFOCOM, 2012 Proceedings_
_IEEE_, pp. 1233–1241, 2012.
[14] T. Pop, P. Pop, P. Eles, Z. Peng, and A. Andrei,
“Timing analysis of the flexray communication
protocol,” in _Real-Time_ _Systems,_ _2006._ _18th_ _Eu-_
_romicro Conference on_, pp. 11 pp.–216, 2006.
[15] K. Schmidt and E. Schmidt, “Schedulability anal
ysis and message schedule computation for the
dynamic segment of flexray,” in _Vehicular_ _Tech-_
_nology_ _Conference_ _Fall_ _(VTC_ _2010-Fall),_ _2010_
_IEEE 72nd_, pp. 1–5, 2010.
[16] M. Drozdowski, “Scheduling multiprocessor tasks
- an overview,” 1996.
[17] J. Hoogeveen, S. van de Velde, and B. Veltman,
“Complexity of scheduling multiprocessor tasks
with prespecified processor allocations,” _Discrete_
_Applied_ _Mathematics_, vol. 55, no. 3, pp. 259 272, 1994.
[18] M. P. Josef Berwanger and A. Schedl, _FlexRay_
_startet durch - FlexRay- Bordnetz fr Fahrdynamik_
_und Fahrerassistenzsysteme_ . 2008.
[19] H. Kopetz, “A solution to an automotive control
system benchmark,” in _Real-Time_ _Systems_ _Sym-_
_posium, Proceedings._, pp. 154–158, 1994.
[20] N. N. Christelle Braun, Lionel Havet, “Netcar
bench: A benchmark for techniques and tools
used in the design of automotive communication
systems.,” in _proceedings_ _of_ _the_ _7th_ _IFAC_ _Inter-_
_national_ _Conference_ _on_ _Fieldbuses_ _&_ _Networks_
_in_ _Industrial_ _&_ _Embedded_ _Systems_ _(FeT_ _2007),_
_Toulouse, France_, Nov 2007.
섹션 본문
섹션 본문이 없습니다.
참고문헌
참고문헌 정보가 없습니다.