Full text
Efficient Utilization of Bus Idle Times in CAN-based Networked Control Systems ⋆ Pau Mart´ı ∗Antonio Camacho ∗Manel Velasco ∗ Mohamed El Mongi Ben Gaid ∗∗ ∗Automatic Control Department, Technical University of Catalonia, Pau Gargallo 5, 08028 Barcelona, Spain (e-mail: {pau.marti,antonio.camacho.santiago,manel.velasco}@upc.edu) ∗∗ Technology, Computer Science, and Applied Mathematics Division, IFP, 92852 Rueil-Malmaison, France (e-mail: mongi.b[email protected]) Abstract: This paper presents a novel approach to networked control systems (NCS) analysis and design that provides increased control performance for a set of control loops that exchange control data over the Controller Area Network (CAN). This is achieved by enabling the following functionality for each control loop: first, standard periodic messaging is guaranteed to ensure stability, and second, non-periodic additional messaging is added whenever the bus is idle in such a way that the aggregated control performance for all control loops is improved. The proposed approach, named Maximum Difference (MD) policy, is computable in a distributed manner, and is practically feasible (computationally efficient and CAN-implementable). We theoretically prove that the MD policy behaves better than static strategies. Simulation results complement the theoretical derivations and show that the MD policy outperforms static, random and Largest Error First policies. Keywords: Networked control systems, Controller Area Network, LQR control, bandwidth management, control performance maximization. 1. INTRODUCTION The most common design and implementation approach for NCS consists in the periodic execution of the control algorithm, which implies that control messaging is periodic (Hristu-Varsakelis et al., 2008). The benefit of this approach is that each control loop stability can be easily guaranteed at the expenses of making a static use of the bandwidth: the given messages periodicity is imposed from the control design stage regardless of the current load in the network and/or changes in the plants that are being controlled. To overcome this periodicity limitation, this paper presents a novel approach to NCS analysis and design, which, by combining periodic messaging with additional non-periodic messaging, provides increased control performance for a set of control loops that share a single CAN broadcast domain. The baseline idea of the approach is to use at run-time the available bus idle times for applying as many control actions as possible in such a way that the aggregated control performance is improved. This is achieved by defining a policy that permits choosing and transmitting specific additional messages whenever the bus is idle in an instantaneous manner, without requiring to know a priori the fraction of available bandwidth. The definition of the policy guarantees that, when spare bandwidth can be consumed, each control action accommodated in the bus is chosen is such a way that, taking into account the controlled ⋆This work was partially supported by C3DE Spanish CICYT DPI2007-61527 and by ArtistDesign NoE IST-2008-214373. plants’ dynamics, the best control performance increase among all possible choices is achieved. The definition of the policy is also inspired by the observation that certain functions such as min or max (minimum and maximum value, respectively) can be efficiently implemented in CAN (Andersson et al., 2008). Looking at CAN, the key idea is 1) to encode quantities in sensor messages identifiers, and 2) to achieve contention for the medium, in such a way that, after the operation of the bitwise arbitration phase, the desired function is accomplished. Using this principle, and under the optimal control formalism, the paper shows that the efficient utilization of bus idle times among several control loops can be formulated as a max problem that is then efficiently solved by the CAN bitwise arbitration. The approaches introduced in Walsh et al. (2001), Y´epez et al. (2003), and Anta et al. (2009) present similarities to the approach described in this paper. However, their policies are based on instantaneous metrics rather than a metric based on some sort of prediction as it is developed in this paper. Note that according to Cervin et al. (2010) the most successful approaches for allocating idle times to controllers is to apply policies based on metrics that use predictions of the expected plant dynamics rather than instantaneous metrics. In a parallel track, other works such as the approach presented by Da˘ci´c et al. (2007) focus on relaxing stability analysis conservativeness of previous works. The stability guarantees of the presented approach are given by the guaranteed periodic operation of each control loop, while the main goal is to improve aggregated control performance, while guaranteeing stability.
This paper is organized as follows. First, the formalization of the NCS model and the allocation problem is addressed in Section II. Section III defines the optimization problem to be solved. Section IV reformulates this problem in order to allow its solving in a distributed manner. Section V analyzes the computational and memory demands at sensor nodes for implementing the allocation policy. Finally, simulation results showing the effectiveness of the proposed approach are described in Section VI. 2. PROBLEM FORMULATION 2.1 Networked Control System Model The networked control system considered in this paper consists of i= 1 . . . n control loops, each one formed by a sensor, a controller and an actuator implemented in physically separated nodes and sharing a single CAN bus (single broadcast domain) to exchange the control data required for each control loop operation or job. In terms of bandwidth utilization, each control job requires transmitting the sample in the sensor message and the control signal in the control message. In addition, other nodes, also use the CAN network to exchange other noncontrol data. Henceforth, to keep the notation simple, the loop index iis dropped in the plant, controller, and cost whenever not required. Each plant is described by a continuous-time linear system ˙x(t) = A x(t) + B u(t), y(t) = C x(t),(1) where A∈Rr×r,B∈Rr×1and C∈R1×rare the system, input and output matrices, respectively, and where x∈ Rr×1is the plant state, u∈Rthe system input (control signal), and y∈Rthe system output (plant response). Each control loop performance is measured by an infinitehorizon continuous-time quadratic cost function Jc=Z∞ 0 x(t)TQc1x(t) + u(t)TQc2u(t)dt, (2) where Qc1∈Rr×rand Qc2∈Rare constant weighting matrices over the integration time. As an example of notation, for a ith control loop, cost (2) is referred as Jc,i. 2.2 Mandatory and Optional Control Jobs Within each control loop, two types of control jobs can be distinguished depending on whether they are guaranteed or not. Each ith control loop has a guaranteed constant sampling period hi, which means that at least, with a given periodicity, the plant is sampled and the control signal is computed and updated (and held constant until a next control job executes). These control jobs are called mandatory control jobs. Note that mandatory control jobs of different control loops can have different guaranteed sampling periods. In addition, each control loop can make use of additional samples between mandatory control jobs to further update the control signal. These samples are taken at a given (fast) rate, that for simplification purposes, is specified by a short sampling period hscommon to all networked control loops and specified in such a way that ∀i= 1 . . . n, hi=aihswith ai∈N− {0}. Each control job using an additional sample is called an optional control job because its execution depends on the available bandwidth. If executed, a new control signal is computed and updated (and held constant until a next control job executes). The controller gain of mandatory control jobs is designed using periodic linear quadratic (LQR) control theory for the given hiperiod, which ensures stability and minimal acceptable performance. The design of gains for optional control jobs is performed borrowing the accelerable control design approach presented in Ben Gaid et al. (2008), which ensures that the more executions of additional optional control jobs within mandatory control jobs, the better will be the control performance (note that using constant feedback gains (or the same as those of the mandatory jobs) does not necessarily ensure this property, as illustrated in Ben Gaid et al. (2008)). Let kdenote a control job execution and let tkdenote the time at which the k-control job executes, that is, it samples the state, x(tk), and computes and updates the control signal, u(t). For any k-optional control job executing at time tk, and taking into account that the next mandatory job will execute at tkm, with tk< tkm, the control signal is given by u(t) = u(tk) = −L(tk, tkm)x(tk)t∈[tk, tk+1),(3) where L(·) is designed using 1) equations (22) and (23) in Ben Gaid et al. (2008), and 2) considering that the control signal should be held from tkto tkm. However, as explicitly expressed in (3), the control signal for the kjob is held constant until the next control job executes at time tk+1, which can be the next mandatory job or an additional optional control job executing after the kjob. Note that one or more optional jobs can be executed between consecutive mandatory control jobs. 2.3 Discrete Cost and Notation Consider the continuous cost function (2). The equivalent cost Jdat discrete time instants, given by the execution time of control jobs of interest, is obtained by integrating (2) over intervals given by every two consecutive control jobs. Jdis defined as Jd= ∞ X k=0 J|tk+1 tk(x(tk), u(tk)),(4) where kand k+ 1 denote two consecutive control jobs, J|tk+1 tk(·) denotes the cost during the time interval [tk, tk+1), x(tk) denotes the sampled state, and u(tk) the updated control signal generated by the kjob, and where J|tk+1 tk(x(tk), u(tk)) = (5) Ztk+1 tk xT(t)Qc1x(t) + uT(t)Qc2u(t)dt. Noting that, as shown in (˚ Astr¨om et al., 1997) x(tk+τ) = Φ(τ)x(tk) + Γ(τ)u(tk), where τ∈[tk, tk+1),Φ(τ) = eAτ ,Γ(τ) = Zτ 0 eAsdsB ,
and reminding that the control signal is held constant over consecutive control jobs, the cost over two consecutive control jobs (5) in discrete form is (˚ Astr¨om et al., 1997) J|tk+1 tk(x(tk), u(tk)) = xT(tk)Q1|tk+1 tkx(tk) + 2xT(tk)Q12|tk+1 tku(tk) + uT(tk)Q2|tk+1 tku(tk) (6) where Q1|tk+1 tk=Ztk+1 tk (ΦT(τ)Qc1Φ(τ))dτ, (7) Q12|tk+1 tk=Ztk+1 tk (ΦT(τ)Qc1Γ(τ))dτ, (8) Q2|tk+1 tk=Ztk+1 tk (ΓT(τ)Qc1Γ(τ) + Qc2)dτ. (9) Cost (6) can be written in compact form as J|tk+1 tk(x(tk), u(tk)) = x(tk) u(tk)T Q|tk+1 tkx(tk) u(tk),(10) where Q|tk+1 tk=Q1Q12 QT 12 Q2 tk+1 tk .(11) Again, as an example of notation, for the ith control loop, cost (4) can be referred as Jd,i. To improve paper readability, a short notation is introduced. First of all, for a given ith control loop, costs between consecutive control jobs kand k+1 as in (6) or (10) will be denoted by J|tk+1 tk. Hence, Ji|tk+1 tk≡Ji|tk+1 tk(x(tk), u(tk)).(12) Second, for a given ith control loop, considering the time interval [tkm,∞), the cost achieved by executing only mandatory jobs starting to execute at tkmis denoted by Jman d,i |∞ tkm(tp) = ∞ X j=km Ji|tj+hi tj(x(tj), u(tj)),(13) where tpdenotes the time when the previous job execution took place (if any) before the execution time of the first mandatory job under evaluation, tkm. Hence, 1) it may indicate that no job executed previously, tp=−, or 2) it may correspond to the execution time of the previous mandatory control job, tp=tkm−h, or 3) it may correspond to the execution time of a previous kth optional control job, tp=tk. The tpparameter will determine which state x(tkm) for the first term of the summand (when tj=tkm) has to be considered. 2.4 Problem to Be Solved The NCS model assumed in this paper considers ncontrol loops, each one with a plant in the form of (1) whose control signal is given by (3) for both mandatory and optional control jobs (if possible), and whose control performance is evaluated via (4)-(6). For the ncontrol loops, at any time different than mandatory control jobs execution times, provided that bandwidth is available for executing an optional control job, the problem to be solved, namely decision, is to which control loop the optional control job should be allocated to, such that the overall accumulated cost Jd,total = n X i=1 Jd,i (14) is minimized. Note that (14) accounts for both mandatory and optional control jobs. The desired solution to the decision problem should have the form of a max or min problem. This would facilitate its implementation in CAN. This requires addressing three sub-problems: (1) As stressed in the introduction, successful approaches for allocating idle times to controllers demand defining policies based on metrics that use predictions of the expected plant dynamics (rather than instantaneous metrics such as a function of the current plants error). However, such policies require knowing the activation pattern of all future control jobs, which can not be known in the scenario considered in this paper. Therefore, a first problem to be solved, namely definition, is to define a suitable policy/metric in the form of a max or min problem for deciding which optional control job must be executed any time such that (14) is minimized. (2) The allocation policy must be defined considering that its implementation will be performed distributedly, using the bitwise arbitration phase of CAN. Hence, the quantities encoded in the message identifiers participating in the policy implementation must be computed using local parameters to the sending node. Therefore, the second problem to be solved, namely distribution, is to redefine the allocation policy in such a way that this restriction is fulfilled. (3) The computation of the quantities to be encoded in messages identifiers must be easy to implement in the sense of reducing the memory/processor requirements as much as possible. Therefore, the third problem to be solved, namely feasibility, is to provide a feasible method for computing the required quantities minimizing resource demands within the sample time. 3. MINIMUM COST POLICY This section addresses the definition problem. Since the times at which optional control jobs will execute is not known a priori (because their possible execution depends on the run-time available bandwidth), the policy for allocating bus idle times to control loops is defined in terms of what can be known when the bus is idle: the future execution times of mandatory jobs (the periodic ones) plus the possible benefit of executing an additional control job. Specifically, from the current time to ∞,ncosts are evaluated. Each one corresponds to the total aggregated cost that would be achieved if the optional control job would be allocated to a particular ith control loop while considering all mandatory control jobs. From the ncosts, the minimum indicates to which control loop is more beneficial the optional control job allocation in terms of decreasing aggregated cost. This is formalized next. Definition 1. [Cost with optional control job] For a given ith control loop, at any given current time tksuch that
tk−1< tk< tkm, where tk−1denotes the previous (mandatory or optional) job execution time, and tkm denotes the next mandatory job execution time, the cost that would be achieved in the time interval [tk−1,∞) by executing an additional k-optional control job at tkis copt i(tk) = Ji|tk tk−1+Ji|tkm tk+Jman d,i |∞ tkm(tk).(15) Definition 2. [Cost without optional control job] Under the same conditions given in definition 1, the cost that would be achieved in the time interval [tk−1,∞) by not executing an additional k-optional control job at tkis cNopt i(tk) = Ji|tkm tk−1+Jman d,i |∞ tkm(tk−1).(16) Definition 3. [Total cost with 1 optional control job] For a set of ncontrol loops, the total aggregated cost as in (14) that would be achieved in the time interval [tk−1,∞) by executing in the ith control loop an additional k-optional control job at time tksuch that tk−1< tk< tkmis ctotal i(tk) = copt i(tk) + n X j=1,j6=i cNopt j(tk),(17) where tk−1and tkmare defined as in Definition 1. Definition 4. [Minimum Cost policy - MC] Considering n control loops, each one with a plant in the form of (1) whose control signal is given by (3) for both mandatory and optional control jobs, and whose control performance is evaluated via (4)-(6), provided that each optional control job can be only allocated to one control loop at a time if bandwidth is available, at any given current time tk such that tk−1< tk< tkm, the kth-optional control job is allocated to the ith-control loop given by arg min i{ctotal i(tk)|i= 1, . . . , n},(18) where tk−1and tkmare defined as in Definition 1. By encoding in each sensor message identifier each argument ctotal i(tk) of the min function in (18), in bus contention, the bitwise arbitration of CAN would produce the desired result: give access to the message encoding the minimum cost. However for each ith control loop, each argument depends on local parameters such as copt i(tk) but also on non-local parameters such as all cNopt j(tk), j6=i. In other words, the ith sensor would require to have available all other sensor readings in order to compute its argument. 4. MAXIMUM DIFFERENCE POLICY This section shows that the MC policy can be transformed into an equivalent policy that preserves the same logics, i.e., it identifies the same ith control loop, and each quantity encoded in each sensor message priority depends only on local parameters to the sensor, thus solving the distribution problem. The idea is to assess which control loop provides the maximum difference between the total aggregated cost without optional control job and each of the aggregated costs achieved when allocating the optional control job to a particular ith control loop. In this case, from the ncost differences, the maximum indicates to which control loop is more beneficial the optional control job allocation. This idea is formalized next. Definition 5. In the time interval [tk−1,∞), the cost difference that for the ith control loop would suppose to execute the k-optional control job is defined from (15) and (16) as di(tk) = cNopt i(tk)−copt i(tk).(19) Theorem 6. Under the assumptions taken in the MC policy (definition 4), it holds that arg min i{ctotal i(tk)|i= 1,...,n}= arg max i{di(tk)|i= 1,...,n}.(20) Proof. Starting with the right hand side term of the equality (20), and considering that arg max i{di(tk)|i= 1,...,n}= arg min i{−di(tk)|i= 1,...,n} holds, the definition of di(tk) given in (19) can be placed into the right hand side of the previous equality and rearranged as arg min i{copt i(tk)−cNopt i(tk)|i= 1,...,n}.(21) Observing that adding a constant to the arguments of a arg min function does not alter its result, the expression Pn j=1 cNopt j(tk) is added to the arguments of the min function in (21), which results in arg min i{copt i(tk)−cNopt i(tk)+ n X j=1 cNopt j(tk)|i= 1,...,n}. Finally, it can be observed that by simplifying in the previous equation the term cNopt i(tk) from the summand, the arguments of the min function reduces to the definition of ctotal i(tk) given in (17). Therefore, the left hand side of (20) is obtained. Corollary 7. [Maximum Difference policy - MD] It follows that the MC policy given in definition 4 can be rephrased by changing equation (18) to arg max i{di(tk)|i= 1,...,n}.(22) In this case, the policy is named MD policy. It can be observed that the arguments of the max function in (22), di(tk), are much simpler that the arguments of the min function in (18), ctotal i(tk). But more important, it can also be observed that each cost difference di(tk) can be computed at run-time by each ith closed-loop sensor node without requiring data from the other sensor nodes. Therefore, for the MD policy, if all sensor nodes encode in their optional sensor messages’ identifiers the 1’s complement of their specific di(tk), in bus contention, the bitwise arbitration phase will allow bus access to the control loop providing the maximum difference, that is, providing the minimum aggregated cost. Hence, the appropriate optional control job will start executing. 5. MEMORY/PROCESSOR REQUIREMENTS The implementation of the MD policy requires computing the cost difference di(tk) (19) at each sensor node. This section presents a method for computing di(tk) efficiently in terms of both computational and memory demands, thus solving the feasibility problem.
The cost difference di(tk) (19) is the difference between sub-costs cNopt i(tk) (16) and copt i(tk) (15), where each one has a term which is an infinite summand of the form Jman d,i |∞ tkm(tp) as defined in (13). This infinite summand reflects the cost achieved by executing, from a given time tkm, only mandatory control jobs. Noting that the gain for mandatory control jobs are designed using standard LQR control theory, and noting also that mandatory control jobs execute periodically with a sampling interval given by h, terms Jman d,i |∞ tkm(tp) can be computed as (˚ Astr¨om et al., 1997) Jman d,i |∞ tkm(tp) = xT tp(tkm)Si(h)xtp(tkm),(23) where Si(h) is the solution to the algebraic Riccati equation, and xtp(tkm) in (23) varies depending on the previous job execution time with respect to the first mandatory job executing at tkm. Hence, xtp(tkm) can be computed as xtp(tkm) = Φcl|tkm tp(tkm−tp)x(tp),(24) where Φcl|tb ta= Φ(tb−ta)−Γ(tb−ta)L(ta, tkm).(25) Using this simplification, it can be easily counted that at each sensor node, and for each optional control job, a total of 24 matrix operations have to be performed to compute di(tk) while requiring to have stored in sensor memory a number of 4( h hs−1) + 1 matrices ( h hs−1 is the number of optional control jobs between mandatory control jobs), which may still not be feasible. The computation of di(tk) (19) can be further simplified if it is computed over [tk,∞) rather than [tk−1,∞). This can be done because the plant evolution over the time interval [tk−1, tk) is identical when computing cNopt i(tk) and copt i(tk). In addition, each sensor node can memorize the last updated control input, namely u(t− k) (regardless of whether it was updated by a mandatory or an optional control job) from the previous control message. Hence, u(t− k) can be used instead of requiring keeping track of tpin (23). This is formalized as follows. Proposition 8. With u(t− k) being the value of the previous control update for a given optional instant tk, the maximum difference di(tk) in (19) can be alternatively computed as di(tk) = x(tk) u(t− k)T Q(tk, tkm)x(tk) u(t− k),(26) where Q(tk, tkm) = QNopt(tk, tkm)−Qopt(tk, tkm) 0 0 0 (27) with QNopt(tk, tkm) = Q|tkm tk+ [Φ(tk, tkm),Γ(tk, tkm)]TSi(h) [Φ(tk, tkm),Γ(tk, tkm)] and Qopt(tk, tkm) = I −L(tk, tkm)T Q|tkm tkI −L(tk, tkm)+ Φcl|tkm tk(tkm−tk)TSi(h)Φcl|tkm tk(tkm−tk).(28) Proof. By noting that the term Ji|tkm tk−1for computing cNopt i(tk) (16) can be rewritten as follows Ji|tkm tk−1(x(tk−1), u(tk−1)) = (29) Ji|tk tk−1(x(tk−1), u(tk−1)) + Ji|tkm tk(x(tk), u(tk−1)), the cost difference (19) directly transforms to di(tk) =cNopt i(tk)−copt i(tk) (30) =Ji|tkm tk(x(tk), u(tk−1)) + Jman d,i |∞ tkm(tk−1) (31) −(Ji|tkm tk(x(tk), u(tk)) + Jman d,i |∞ tkm(tk)).(32) In the previous equation, (31) corresponds to cNopt i(tk) and (32) corresponds to copt i(tk). Focusing in (31), the term Ji|tkm tk(x(tk), u(tk−1)) can be also written as Ji|tkm tk(x(tk), u(t− k)) using the known value u(t− k). In addition, by using (23), its right summand is defined as Jman d,i |∞ tkm(tk−1) = xT tk−1(tkm)Si(h)xtk−1(tkm) (33) where xtk−1(tkm) can be computed based only on x(tk) and u(t− k) as xtk−1(tkm) = Φ(tk, tkm)x(k) + Γ(tk, tkm)u(t− k) = [Φ(tk, tkm),Γ(tk, tkm)] x(tk) u(t− k).(34) By considering (33) and (34), and by noting that using the compact notation (10) the left summand of (31) is defined as Ji|tkm tk=x(tk) u(t− k)T Q|tkm tkx(tk) u(t− k),(35) expression (31) can be computed as x(tk) u(t− k)T QNopt(tk, tkm)x(tk) u(t− k),(36) where QNopt(tk, tkm) is given in (28). Focusing in (32), its left summand using the compact notation (10) is defined as Ji|tkm tk=x(tk) u(tk)T Q|tkm tkx(tk) u(tk),(37) which can be rewritten using u(tk) = −L(tk, tkm)x(tk) as Ji|tkm tk= (38) x(tk)TI −L(tk, tkm)T Q|tkm tkI −L(tk, tkm)x(tk). Considering (23) and (24) with tp=tk, the right summand of (32) is Jman d,i |∞ tkm(tk) = xT tk(tkm)Si(h)xtk(tkm),(39) where xtk(tkm) can be computed as xtk(tkm) = Φcl|tkm tk(tkm−tk)x(tk).(40) Hence, using (38), (39) and (40), expression (32) can be computed as x(tk)TQopt(tk, tkm)x(tk) (41) or alternatively as x(tk) u(t− k)TQopt(tk, tkm) 0 0 0 x(tk) u(t− k),(42)
0 60 120 180 240 300 0 200 400 600 800 1000 t(s) Cost Static Random LEF MD Fig. 1. Performance evaluation where Qopt(tk, tkm) is given in (28). Substituting (36) and (42) into (30), the definition of di(tk) given in (26) and (27) is obtained. By simple inspection of (26), the required number of matrix operations at each sensor node for each optional control job reduces to 3. And the number of matrices to be stored in memory reduces to h hs−1, which correspond to the matrices Q(tk, tkm) to be precomputed for all tk than can occur between two consecutive mandatory jobs. 6. SIMULATIONS Three networked control loops, each one controlling a double integrator system ˙x(t) = 0 1 0 0 x(t) + 0 1u(t), y(t) = [ 1 0 ]x(t), (43) have been simulated under different policies using the TrueTime simulator presented by Henriksson et al. (2002). Each plant is subject to random set-point changes of ±1 that occur every 10s (in average) in a run of 300s. The sampling period for mandatory control jobs for the three loops is the same and equal to h= 1s, and the sampling period for optional control jobs is hs=h/3. For each loop under the MD policy, controller gains for both types of control jobs have been designed as indicated in Section 2.2 where the weighting matrices Qc1and Qc2of the continuous cost function given in (2) are the identity. The MD policy has been compared to three different policies. The first one, named static, corresponds to the case where the three control loops only run mandatory control jobs, which represents the standard periodic approach. Since any execution of an optional control job is able to decrease the cost, the MD policy is also compared to a random policy that corresponds to the case where optional control jobs are randomly allocated to control loops. The third one in the performance evaluation is the Largest Error First (LEF) policy presented by Y´epez et al. (2003). In LEF, control gains for both mandatory and optional control jobs are constant and designed using LQR design for a sampling period of h= 1s, and bus idle times are always assigned to the plant with largest error. Figure 1 shows the simulation results where the x-axis is simulation time and the y-axis is the accumulated cost of the three plants calculated as Jeval =P3 i=1 Jc,i.As can be seen in Figure 1, the MD policy provides the best cost (lowest curve). The static policy gives the worst cost because it only executes mandatory control jobs. The curve of the random policy is always above the curve of the MD policy. This indicates that the MD policy developed in this paper is effective in terms of allocating bus idle times to control loops. And finally, the better performance numbers of the MD policy with respect to the LEF policy shows that increased performance can be achieved by allocating bus idle times using a metric based on predictions of the plants’ dynamics rather than using an instantaneous metric as in the case of LEF. Future work will also consider computational complexity and its effect on the performance numbers. 7. CONCLUSIONS For a set of networked control loops, this paper has presented the MD policy that permits to chose at run time which loop should execute an additional control job each time the bus is idle. It has been shown that the policy can be efficiently implemented in CAN, and its feasibility in terms of resource demands has been discussed. Simulations showed that the MD policy provides the best performance compared to previous and/or alternative policies. REFERENCES B. Andersson, N. Pereira, W. Elmenreich, E. Tovar, F. Pacheco, and N. Cruz. A Scalable and efficient approach for obtaining measurements in CAN-based control systems. IEEE Transactions on Industrial Informatics, vol.4, no.2, pp.80-91, May 2008. A. Anta and P. Tabuada. On the benefits of relaxing the periodicity assumption for networked control systems over CAN. Real Time Systems Symposium, Dec. 2009. K.J. ˚ Astr¨om, and B. Wittenmark. Computer-controlled systems. Third Edition, Prentice-Hall, 1997. M. Ben Gaid, D. Simon, and O. Sename. A Design methodology for weakly-hard real-time control 17th IFAC World Congress on Automatic Control, Seoul, Korea, July 2008. A. Cervin, M. Velasco, P. Mart´ı, and A. Camacho. Optimal on-line sampling period assignment: theory and experiments. IEEE Transactions on Control Systems Technology, accepted for publication, June 2010. D. B. Da˘ci´c and D. Ne˘si´c. Quadratic stabilization of linear networked control systems via simultaneous protocol and controller design. Automatica, v. 43, n.7, pp. 11451155, Jul. 2007. D. Henriksson, A. Cervin, and K.-E. ˚ Arz´en. TrueTime: Simulation of control loops under shared computer resources. 15th IFAC World Congress, 2002. D. Hristu-Varsakelis and W. S. Levine. Handbook of networked and embedded control systems Birkh¨auser Boston, June, 2008. G.C. Walsh, and Y. Hong. Scheduling of networked control systems. IEEE Control Systems Magazine, vol. 21, n. 1, pp. 57-65, Feb. 2001 J. Y´epez, P. Mart´ı and J.M. Fuertes. Control loop scheduling paradigm in distributed control systems. 29th Annual Conference of the IEEE Industrial Electronics Society, Roanoke, USA, November, 2003.