Documente Academic
Documente Profesional
Documente Cultură
57
demonstrate some other papers that were focused on other important real-time issues.
For example, the performance metrics of the several closed-loops control systems that
are attached to the WorldFIP Fieldbus network. This subject was addressed mainly by
[Halevi 88], [Hong 95], [Walsh 2001], and [Zhang 2001].
Another important real-time aspect that we referred to it in this chapter is the
clock synchronization of the WorldFIP. This aspect was considered by [Kim 98].
Finally, there is one Real-Time topic that we will comment on it at the end of this
chapter, which is deriving task attributes of the FIP-based Real-Time system [Ryu 96]
[Saksena 96] [Hong 96].
Memory Size.
Network Utilization.
Communications Jitter.
So the authors described three new ways to build the BAT (statically) to meet
each constraint alone.
58
59
60
2- Now we find new values of the periods of the aperiodic variables, such that the
new value is equal to the largest multiple of the elementary cycle and is equal
to or less than the original period of the variables.
3- Construction of the BAT schedule is carried out using the LCM of all the new
periods we got from step two of this algorithm.
We now can see the resulting the BAT of this jitter-resolving method below in
Fig. 3.3.
61
FIP BAT that was made by the HCF/LCM-based scheduling method is the most
appropriate method when constructing the BAT. Thus the HCF/LCM method is the
optimum method in scheduling the BAT. Why? Because HCF/LCM method has a
small amount of communication jitter, and its utilization is good as it leaves time to
serve the aperiodic traffic (unlike the other methods). The only disadvantage in the
HCF/LCM method is that its BAT is rather long. However since the BA is the most
important node in the network, we conclude that it must be a good computer with a
rather higher amount of memory than those of the ordinary producer/consumer nodes.
We will use the HCF/LCM-based BAT through this thesis (i.e. in both chapter four,
and chapter five).
Finally we would like to add that these three methods are not the only
modification that done to the FIP's BAT on static bases. In fact there is another
statically modified BAT algorithm that was proposed by Hong in [Hong 95];
however, we will refer to this work mot as a new BAT scheduling scheme; but as it
addressed the stability of the closed loop control systems that are attached along the
FIP's network. For more information please refer to section 3.6. of this same chapter.
62
63
parameter change, and not offline. In other words, the new plans (BATs) are not
stored previously. The scheduler is the program (engine) that builds or calculates the
BAT (plan) given the table that describes the periodic variables properties. That table
is not fixed and can be changed. The dispatcher is the program that changes the BAT
construction every time the scheduler changes the plan.
The authors assume they got a non-fixed length of periodic variables list. This
list can encounter changes in: number of variables, periodicity of variables, and/or
variables execution time. So they build the BAT given the initial information about
these variables, and the system will work with this plan (a plan is a fixed time period
that during it the system use the same BAT) as long as the system requirements do not
change. In fact, they even continue to change the BAT every W, where W = the time
duration of the plan, even if there is no change in system parameters. The authors of
[Almeida 99] did a test to this method; in which they introduced a new modified Bus
Arbitrator for the FIP. This new BA can be seen in Fig. 3.6.
64
The Scheduler Analyzer in the figure is a program that checks the schedule to
see if it will meet the Real-Time constraints or not. The Shell is the operating system
shell interface which the user uses to input the variables parameters into the Variables
Description Table.
Along they derived a sufficient Schedulability condition to overcome the old
inability of dynamic schedulers to guarantee the Schedulability of the variables for a
long system operation. What is more, they introduce a formula to calculate the
complexity of the calculation of the BAT with this new method [Almeida 99].
There are a few remarks that we can mention here about this new scheduling
algorithm. First of all, this new "Planner Scheduler" introduces an overhead to the
network (due to the online process of changing the plan) which induces a delay in the
control applications. This delay may not be accommodated (or compensated) by all
applications. We are fully aware that this delay may be lighter than that of the fully
dynamic scheduler. Second, from our point of view, the tests on this scheduler were
not on a real world factory or at least on a similar experimental setup model like the
one that was done by [Zhang 2001], but instead they tested it using simulation test bed
of three PC's using a cheap, and low bit rate bus.
Now after reviewing the scheduling policies and methods that were proposed
for the FIP protocol, we will now turn into another important Real-Time aspect; that is
calculating the Worst Case Response Time of the FIP aperiodic streams.
65
66
They assumed that the communication system high-level (in the application
layer) provides the service of transferring the time dependent information produced by
a producer (RT-O) to the different consumers where the copies in the consumer nodes
are called RT-O images: RT-Oi.
What is more, they assumed that the communication system in the lower level
or more precisely the Data Link Layer has to manage the sharing of the transmission
medium for the data packets exchanges. The frame exchanges schedulability is a hard
point, which must satisfy time constraints (resulting from the time constraints in the
higher layers).
In addition to that, they assumed that they had also other causes of information
exchanges between the nodes; such as: alarm occurrences and configuration definition
messages (which do not necessarily have time constraints).
They assumed that the variables streams of the FIP periodic are executed in
the following way:
During the microcycle first phase, the B.A. induces a predefined sequence of
periodic variables exchange. During this phase, distant stations, if addressed, may
signalize to the B.A. for pending aperiodic variables requests (i.e. implicit
pooling). Explicit pooling is also possible but we will not consider this option1.
In the following unused microcycle time (if any), the B.A. induces the exchange of
the pending aperiodic variables requests which have been previously made.
Both of [Vasques 94], and [Burns 97] did a pre-run-time schedulability
analysis to obtain the schedulability condition and then they calculated the WCRT of
the aperiodic urgent variables.
The equation that calculated the WCRT of the aperiodic urgent variables that
was given by [Vasques 94] is:
p
i=1
j= 1
This option can be found in other FIP operation modes and not in the synchronous mode.
67
(3.1.)
Where the equation that calculated the WCRT of the aperiodic urgent
variables that was given by [Burns 97] is:
MAX
WCRT = TS
(3.2.)
Where TMC is the microcycle length, CPi is the length of the periodic variable
i, k is the dead time interval length, TPi the period of the periodic variable i, and CSj
is the length of the aperiodic variable j. The number of periodic streams is P, and the
number of the aperiodic streams is S. For equation (3.2.) the
incurred with both the polling of the nodes that generate aperiodic variables, and
TSMAX is the cyclic phase or window and it is fixed constant.
The authors of [Burns 97] introduced a numerical example to compare
between their equation 3.2. and the equation of [Vasques 94]. Of course the result of
[Burns 97] is more optimistic than that of [Vasques 94].
Both [Vasques 94], and [Burns 97] had some drawbacks that we will
summarize in the following points:
1) They considered equal lengths for periodic windows since they did not take
into account the BAT construction, and so they could not evaluate the actual
length of the periodic window in each microcycle. Thus, the overall results are
also very pessimistic.
2) They did not consider that at the end of each microcycle there will be some
transactions that simply would not fit, and thus would not be schedulable.
3) Finally, they did not also consider the communication jitter in the evaluating
the Dead Time Interval during which the BA remains unaware of the bending
aperiodic request at any node k. Note that within each microcycle the variables
are not scanned exactly in the same "slot", and they may be even scanned at
irregular intervals (not with the same number of microcycles in between),
depending on the methodology used to build the BAT.
68
The analysis that was presented in [Tovar 99-1] improved the previous work
of [Burns 97] considering all of the three above mentioned aspects in an integrated
manner. What is more [Tovar 99-1] presented methodologies for building the
WorldFIP BAT, and thus performing an integrated analysis for both the periodic and
aperiodic traffic. We will leave the details and the assumptions of this model to
chapter 4 of this thesis as it is almost the same model that we adapt in calculating the
WCRT.
But [Tovar 99-1], and later in [Almeida 2002] also had some drawbacks that
we would like to summarize them in the following points:
1- They assume that when a station sends for aperiodic transfer, that there is only
one aperiodic variable; but as we saw from the WorldFIP protocol, the
(RP_RQ) frame can contain a list up to 64 variable identifiers [FIP 98].
2- They did not take into account the queues sizes of the BA (there are two
queues for the Urgent sporadic variables transfer, two for the Normal sporadic
variables transfer, one for the Unacknowledged sporadic message transfer,
and one for the Acknowledged sporadic message transfer).
3- They did not mention how to calculate the maximum number of the urgent
aperiodic variables existing in the FIP network (they call it NA). Even if we
consider that this number is system a parameter that to be known at setup the
time, it still be changed during the operation time. We will see in chapter 4 in
this thesis that there is no need to calculate this number, or even to know its
value. The method that we will introduce is independent of this number.
4- They did not find the WCRT of the Normal sporadic variables or the aperiodic
messages.
At last we would like to mention that the work that was done by [Fonseca 99], the
authors took into account the padding frames, which are used in the FIP network to
maintain synchronization of the microcycles. But the formula they presented was the
same formula that was used by [Burns 97], which we criticized before. We will
propose a new formula to correct all these drawbacks in chapter 4 of this thesis and
verify it using the WorldFIP traffic simulation engine that we developed.
69
70
[Zhang 2001] also assumed that there are other terminals (non-control) that are
attached on the same common bus (i.e. control network) and these terminals also
share the bus or in other words these terminals generate traffic that may cause
additional latencies to the control loop I/O signals.
71
We can see from this model that the authors of [Zhang 2001] used a
continuous time plant and digital controller. Where ZOH is a Zero Order Hold and
"h" is the sampling time interval in seconds and presents the sampler (sensor) which
sample the plant output to the digital controller. The system model equation of the
continuous plant that was used by Zhang et al. is:
.
(3.3)
u(kh) = -K x(kh),
k = 0, 1, 2,
(3.4)
t [ kh + k, (k+1)h + k+1 ],
y(t) = C u(t),
2
72
t [ kh + k, k = 0, 1, 2, ]
(3.5)
Now; sampling the system with period "h" the new system equations with
network-induced delay "" are:
(3.6.)
Where
= eAh
h k As
0 (k) = 0
h
1(k) =
h k
e Bds ,
e As Bds ,
(3.7.)
where
0 ( k )K 1 ( k )
=
K
0
The second case is when the delay is more than one sampling time. For this
case the authors of [Zhang 2001] derived the stability regions for the networked
control system transfer function design for the first order integrator case. They plotted
the stability regions between the system sampling period "h", and the normalized
network-induced delay "/h". This can be seen in Fig. 3.10. We shaded the system
stability regions in light gray.
73
74
Like [Zhang 2001], Walsh et al. also used the same model of one control loop over
the fieldbus network. However, they focused in their study on the famous CAN
fieldbus protocol. Then they studied the effect of the scheduling method over the
closed loop system stability as the scheduling method introduced delays in the
transmission of the signals over the bus. They continued the study to find delay
bounds which they called a "Dynamic Scheduler Error Bound" and "Static Scheduler
Error Bound". At last the authors used these results to derive the stability condition of
the NCS model.
Walsh et. al. also proposed a free of queue fieldbus system (i.e. to make the
fieldbus system without any queues). They called this method as Try Once Discard
(TOD) as the node that has the data packet sample will discard the data if the network
is not available yet and hence, the node which waits for this data will use the old data
packet sample.
At the end, they proposed a stability theory for the NCS with the same model
that was used by [Zhang 2001] and its Equations are (3.3.) and (3.4.). In this theory;
the authors finds a maximum allowable delay that keeps the Networked Control
System globally exponentially stable [Walsh 2001]. [Walsh 2001] verified their work
using two famous examples. The first example is the Batch Reactor Experiment and
sketched the results of its simulation. The other example that they used is the Dryer
Experiment.
As we stated before the authors of [Walsh 2001] used the famous CAN
fieldbus protocol in the data packets transmission over the bus; however, they claimed
that their work can fit with any other fieldbus protocol without the need for further
modification. They stated that their work can be extended further to include many
closed- loop control systems.
75
periods) of the control system loops attached to the fieldbus. They both divide the
overall delay of the control loop into two components; namely the controller to
actuator delay and the sensor to controller delay. What is more, they did not combine
these two components into one equivalent overall delay. They justified this situation
by concluding that these two delays are different in nature and properties. We would
like to add that the work of [Hong 95] was also inspired by [Shin 92], [Schwartz 88],
and [Ray 88]. Although the authors of [Halevi 88] were interested in finding both the
maximum allowable delay of each control loop and the model that can best describe
the delays associated with the ICCS's, [Hong 95] used the results of [Halevi 88] and
[Hirai 80] to concentrate on finding a scheduling algorithm of the fieldbus to maintain
certain performance metric to all the closed-loops that are attached to the system bus.
This is done while [Hong 95] tried to preserve the maximum utilization of the system
bus. See Fig. 3.11. to see the Integrated Communication and Control System (ICCS)
model that [Halevi 88] used in his paper.
76
What is worth noting in [Hong 95] is that the author did not take into account
the sporadic (aperiodic) traffic of the fieldbus system (neither did [Halevi 88]).
Despite this, the work of [Hong 95] can be applied to the centralized systems like the
FIP protocol with some modifications as we will see later in chapter 5 of this thesis.
As we will see later in chapter five, when Hong did not take into account the
aperiodic traffic plus the overvaluing of the system bus periodic utilization all this
made the worst case response time of the aperiodic traffic extremely high. Of course,
we tried to correct this situation, as the aperiodic WCRT is important to us, by
modifying the scheduling algorithm one more time to free more time for the aperiodic
traffic, while preserving the overall system stability at the same time.
Finally, we used the Matlab Simulink to justify our new algorithm using the
same closed-loop control system example that was used by [Hong 95] with only slight
changes. We would like to state here that the author of [Hong 95] did not mention
how exactly he verified his work, or in other words, what the system properties he
used to justify his work are.
77
78
79
Fig 3.13. shows the End-to-End Design methodology that was proposed by
[Hong 96]. The design methodology begins at the combined stage of task graph
design, end-to-end requirements, and Task Allocation. After that comes the design to
implementation mapping stage, which maps the designed system into real life
working system. If this mapping failed, then the system has to be redesigned once
again. After the implementation stage, comes the derivation stage of the task
attributes, which are task periods, task deadlines, and task phases. At the end we start
to distribute the task on the processors (i.e. the network resources), this stage is called
the per-processor scheduling. If this stage failed then we must go over again to
redesign the tasks from the beginning. There are three different stages that depend
only on the output of the per-processor scheduling (in our case the description table
that describes the periodic tasks) to generate the BAT, which [Ryu 96] called the
automatic code generation stage.
80
The authors of [Ryu 96] mainly addressed the derivation of the timing
constraints of the FIP system. They meant by the timing constraints the period
assignment and the phase/deadline assignment.
They divided the constraints associated to the period assignment into two
major categories, the range constraints, and the harmonicity constraints.
The range constraints are to ensure the minimum rate of task executions. This
leads to impose an upper-bound on the periods. As for the harmonicity constraints, are
arising from synchronous communication between each producer/consumer task pair.
For the phase/deadline assignment he considered two factors, the task response Time,
and the scheduling policy. The task response is the direct metric for the schedulability
of the task. The scheduling policy is responsible for changing the response time of the
task. Finally [Ryu 96] introduced the performance evaluation of his proposed system.
81