Feedback Scheduling of Priority-Driven Control Networks

With traditional open-loop scheduling of network resources, the quality-of-control (QoC) of networked control systems (NCSs) may degrade significantly in the presence of limited bandwidth and variable workload. The goal of this work is to maximize th…

Authors: Feng Xia, Youxian Sun, Yu-Chu Tian

Feedback Scheduling of Priority-Driven Control Networks
1 To appear in Computer Standards and Interfaces , 2008, doi:10 .1016/j.csi.2008.03.020. Feedback Scheduling of Priori ty-Driven Contro l Networks Feng Xia a,b , Youxian Sun a , Yu-Chu Tian b a State Key Laborato ry of Industrial Control Technology, Zhejia ng University Hangzhou 310027, Ch ina b Faculty of Infor mation Technol ogy, Queenslan d University of Technol ogy GPO Box 2434, Brisbane QLD 4001, Au stralia Emails: f.xia@ieee.org; yxsun@iipc.zju.e du.cn; y.tian@qut.edu.au Abstract With traditional open-loop scheduling of network r esources, the quality-of-control (QoC) of networked control systems (NCSs) may degrade significantly in the presence of li mited bandwidth and variable workload. The goal of this work is to maxim ize th e overall QoC of NCSs through dynamically allocating available network bandwidth. Based on codesign of control and scheduling, an integrated feedback scheduler is developed to enable flexible QoC management in dynamic environments. It encompasses a cascaded feedback scheduling module for sampling period adjust ment and a direct feedback scheduling module for priority modification. The inherent cha racteristics of priority-driven control networks make it feasible to implement the proposed feedback scheduler in real-wor ld systems. Extensive simulations show that the proposed approach leads to significant QoC improveme nt over the traditional open-loo p scheduling scheme under both underloaded and overl oaded network conditions. Keywords: Networked control systems, control networ ks, feedback scheduling, dynamic bandwidth allocation 1. Introduction Networked control systems (NCSs) are becoming increasi ngly important in modern control engineering and applications [6,16]. An NCS uses a control network [ 13,15,19,20] to interconnect geographica lly distributed nodes such as sensors, controllers, and actuators. Compared to traditional control systems with point-to-point interconnections, NCSs are advantag eous in terms of simple and fast implementation, ease of system maintenance, and increased syst em flexibility and dependability. However, the use of co mmunication networks in control applications complicates the anal ysis and design of the control systems. The resulting performance of the NCS systems depends heavily on te mporal network attributes such as network-induced delay, packet loss, and jitter [9,21-23], which are cl osely related to the runtime availability of network bandwidth. From the communication perspective, to satisfy the requirements of control applications, it is often necessary for control networks to provide determinis tic real-time communications. This poses a technical limitation on the maximum possible transmission rate that the control networks can offer. For example, the Controller Area Network (CAN) bus has the maximum transmission rate of 1Mb/s [13,20,28] . Control networks with much higher data rate are available now, but such networks are often very expensive and thus are not an economically viable solution for most indus trial applications. Therefore, it is common in real- world applications that the bandwidt h of control ne t works is limited, making t he available communication resource a performance bottleneck [6,27]. This bottleneck is further accentuated by the fact that NCSs are becoming more and m ore complex and the number of control loops attached to a sh ared control network continues to grow [16]. Moreover, NCSs often have to operate in dynamic environments where the wo rkload varies due to runtime system reconfiguration or update, which are often required to make the system flexible enough to meet stringent requirements of the changing market [14] . A natural result of limited network bandwidth and vari able w orkload is the uncertainty in available communication resources [27,30]. In terms of temporal attributes, it results in unpredictable communication 2 delay, packet loss, and jitter, which will deteriorat e the QoC performance of NCSs, and even jeopardize system stability in extreme circu mstances. Conse quently, the overall performance of a multi-loop NCS depends not only on the d esign of the control algorithm s, but also on the allocation and scheduling of the shared network bandwidth. This paper is devoted to ma ximizing the overall Qo C of NCSs closed over priority-driven contr ol networks by means of flexible management of ne twork resources. Following the emerging methodology of feedback scheduling [2,27,31], an integrated feedb ack scheduling (IFS) scheme is proposed that enables flexible QoC management in NCSs subject to bandwidth limitation and workload fluctuation. Unlike m ost existing NCS solutions where controller algorithms or network MAC protocols are the focus, our approach concentrates on codesign of feedback control and netw ork scheduling. To make the best possible use of available network resources, the IFS scheme adapts simultaneously the samplin g periods and the priorities of control loops at runtime. A cascaded feedback schedu ling algorithm based on deadline miss ratio control is developed for adjusting sampling periods, and a direct feedback scheduling algorithm is developed for priority modification. In contrast to traditional open-loop scheduling me thods for NCSs, our approach features closed-loop scheduling of network resources, which exploits feedback control technology. The rest of this paper is organized as follows. Relate d work is briefly reviewed in Section 2. Section 3 describes the system we consider, and introduces the pr oblem of network scheduling, from the viewpoint of integrated control and scheduling. In Section 4, the fram ework of the IFS schem e is presented, and the algorithms are given for adjusting s ampling periods and modifying priorities, respectively. Section 5 evaluates the performance of the proposed approach through extensive simulations. Finally, Section 6 concludes the paper. 2. Related Work Recent overviews on NCSs can be found in [6] and rela ted articles in the same issue. Roughly speaking, the majority of existing work on NCSs can be divided into three main categories: 1) control theoretic approaches, 2) network design based approaches, and 3) control and network codesign. Intuitively, the focus of control theoretic approaches is on controller design, i. e., to des ign control algorithms that are tolerant to network-induced delay, packet loss, and jitter. The approaches based on network design mainly deal with how to improve network quality-of-service (QoS) such th at the control system performance is guaranteed. I n this work we are interested in the third category, i.e., the codesign of control and network scheduling. Network scheduling algorithms that exploit the co mmunication principles of priority-driven control networks have been presented, e.g. [4,8,26,28,2 9,32]. With focus on the problem of how to schedule messages from different nodes, however, none of these algorithms were developed to attack the variations in available communication resources in NCSs opera ting in dynamic environments. With these algorithms, deadline misses under overload conditions cannot be avoi ded, and the waste of resource caused by light workload cannot be reduced, which may potentiall y yi eld worse-than-possible QoC. Heuristic methods for allocation of shared bandwidth among multiple control loop s have also been developed in e .g. [7,10,17] , but they are all open-loop solutions and therefore are not suitable for dealing with dynamic changes in available network resources. Recently, effort has been made on closed-loop network scheduling that features dynamic bandwidth allocation via sampling period adaptation, e.g . [1,3,11,24,25] . Most of them adjust the sampling periods of control loops to maximize the overall QoC under the constr aint on a pre-set level of network utilization. In dynamic environments, however, some resources will be wasted because pessimistic utilization setpoints must always be chosen so as not to violate the sy stem schedulability. An emergi ng technology for dynamic resource allocation is feedback scheduling, which typi cally employs feedback control theory and technology to increase flexibility and master uncerta inty in various computing systems [2,5,31] . While most of the work on feedback scheduling is dedicated to codesign of c ontrol and CPU scheduling, the main concern of this paper is control network scheduling. In contrast to all of the above-mentioned work, th is paper is concerned w ith integrated feedback scheduling that features simultaneous adaptation of the sampling periods and the priorities of multiple networked control loops, with the goal of improving the overall QoC of the whole system. With period adjustment that takes advantage of feedback control theory and technology, the dynamic changes in available 3 network resource will be addressed. The network bandwid th will be fully utilized even if the original workload is light. Also, overload conditions will be handled with graceful QoC degradation. The dynamic assignment of priorities will further optimize the distr ibution of available network resources. A preliminary framework of integrated feedback scheduling has been explored in our previous work [30], and will be substantially extended in this paper. 3. Problem Statement 3.1. System Model Consider an NCS where N independent control loops share a contro l network. In this network a priority- driven MAC protocol is employed. Commonplace exampl es of this type are CAN and DeviceNet. From the principle of these communication protocols, every node de vice that has packets to send, i.e., the so-called communication entity will be assigned a unique priority le vel. A node with a packet to send waits until the network is idle and then commences to transmit. In the case of network access collisions, the system will decide which packet will be transmitted according to th eir priority levels. As us ual the packet with the highest priority will be transmitted successfully. The proposed approach is also applicable to NCSs containing interfering traffic, though this is not ela borated on in this paper for sim ple description. In the NCS, each control loop is composed of a sens or, a controller, and an actuator, in addition to a controlled process. Assume that the controller and the actuator are connected directly, implying that only the sensor in the control loop needs to use the control network to deliver sample data to the controller. With this system architecture, the priority of a sensor node can be viewed as the priority of the corresponding control loop. It is also assumed that all controllers and actuators are event triggered, while sensors are time triggered. In a single control loop, the sensor collects a sa mple of the output of the physical process at the beginning of every sampling period, and then sends it to the controller via contro l network after successfully accessin g. Once receiving the sample data, the controller star ts to execute the corresponding control algorithm immediately, producing control signal, and then outputs it into the actuator. Finally the actuator acts on the controlled physical process according to the control i nput. Assume that in this process the processing delay of the sensor and the actuator and th e execution time of the control algorit hm are relatively small and thus are neglected. In this context the control delay is ap proximately equal to the communication delay includi ng mainly waiting delay and transmission delay. No specific compensation methods for delay, packet lo ss, or jitter are used in the control loops. However, controller parameters will be updated accordingly when sampling periods are changed. Without loss of generality, it is also assumed that: y The control network is ideal in that data communications via the control network are error-free. y Sample data is delivered in the form of single p ackets, which means that every sample will be treated as one data packet while being transmitted over the network. y The sensor and the actuator in one loop hold a preci sely synchronized clock. Since only the sensors are time triggered in the system, this assumption is not a necessity. The purpose of making it here is simply for exact calculation of the deadline miss ratio. 3.2. Control Network Scheduling Since the control network is shared by multiple co mmunication entities, it is necessary and important to allocate network bandwidth properly, particularly when the transmission rate is limited. In the following the problem of control network scheduling is form ulat ed from the perspective of real-time scheduling. Generally speaking, the scheduling of networks is similar to the problem of real-time CPU scheduling [3,21]. Both of them consider how to distribute shar ed resources am ong a set of concurrent tasks, which are often subject to real-time constraints, either hard or soft. The shared resource to be distributed is no longer CPU time, but network bandwidth in NCSs. The tasks to execute in this context will not be softwa re programs as in CPU scheduling, but messages in the form of data packets over the network. Accordingly, the meaning of task execution changes from running progr am s to transmitting data packets. Based on these observations, it is found that existing real-time schedu ling theory and methods may be applied to control 4 network scheduling by re-defining relevant task attr ibutes. We define the following timing attributes for sample data messages in NCSs: y Period h i : the period for generating a new sample data packet in the i -th control loop, eq ual to the relevant sampling period; y Relative deadline d i : equal to h i ; y Execution time c i : the transmission delay of a data packet, excluding waiting delay; y Priority p i : the sensor’s priority in the i -th loop; y Network utilization U i : / ii i Uc h = . Traditional real-time scheduling algorithms such as Rate Monotonic (RM) and Earliest Deadline First (EDF) are theoretically applicable to control networ k scheduling based on this mapping. Due to practical difficulty in implementation, however, m ost often fixed- priority scheduling methods are used in real-world NCSs. The most notable difference between CPU schedu ling and network scheduling is that in general the execution of programs on CPU is preemptive, whereas the transmission of data over network is not. Once a data transmission starts, it will con tinue until it is c ompleted, and w ill never be suspended because of new transmission requests with any priorities. From the work by Sha et al. [18], we can derive the following theorem describing a sufficient condition for NCS schedulability analysis. Theorem 1 For an NCS with N independent control loops, where an ideal priority-driven control network is used, the system is schedulable with RM if (1) is satisfied. 1/ 12 12 ( 2 1 ), 1 , ..., i ii ii cb cc ii N hh h h ++ + + ≤ − ∀ = " (1) where 12 N hh h ≤≤≤ " , b i is the worst-case blocking time of task i , i.e., 1,..., max in ni N bc =+ = . Based on the above schedulability constraint, the netw ork scheduling problem in NCSs can be st ated informally as follows: In the presence of limited bandwidth and variable workload, dynamically allocate available communication resource among multiple control l oops so that the ove rall QoC is maximized while meeting the constraint on system schedulability . In the next section we will present an integrated feedback scheduling approach to address this problem. 4. Integrated Feedback Scheduling In contrast to traditional open-loop netw ork scheduling methods, a closed-loop dynamic network bandwidth allocation method will be developed below. Flexible QoC managem ent will be facilitated by means of codesign of feedback control and network scheduling. The architecture of the IFS scheme will be first described; then the feedback schedu ling algorithms for period adjustment and priority modification will be presented, respectively. Some critical de sign issues will also be discussed. 4.1. Architecture To enable feedback scheduling, it is necessary to make choice of some related variables first. From the principle of feedback control, controlled variable and manipul ated variable are two most important variables that need to be defined in the feedback scheduling system . In terms of real-time scheduling, there are ge nerally two options for the controlled variable, network utilization and deadline miss ratio (or miss ratio in short). In network scheduling, however, it is very hard, if not impossible, to determine an exact schedulable u tilization upper bound. Consequently, it will be difficult to choose an appropriate network utilization setpoint, especially when the network workload varies with time. On the other hand, feedback scheduling based on deadline miss ratio control does not depend on the knowledge about schedulable network utilization upper bound, which avoids the difficult y with network schedulability analysis. Moreover, it is intuitive that c ontrolling deadline miss ratio at a specific (relatively low) level will certainly maintain the actual network utilization close to the highest possible level, regardless of changes in system workload. Because there is always certain stability margin in practical control systems 5 design, real-world control systems can tolerate pack et losses (and also deadline misses) to certain degree [3,9,22]. Therefore, the deadline miss ratio is selected as the output of the feedback scheduling s ystem. With regard to the manipulated variab le, since the transmission time of sample data packets cannot be intentionally adjusted, the sampling periods of control loops become a natural choice. Integrat ed Feedback Scheduler Control Loop 1 Control Network Priority Modification Period Adjust ment Set- point C S A P Deadline Miss Rati o Control Loop N C S A {QoC} {p,h} S: Sensor, C: Controller, A: Actuator, P: Process P Fig. 1. Archite cture of the i ntegrated feed back schedul ing Fig. 1 depicts the architecture of the integrated feed back scheduling. In addition to the original control loops, an outer loop is i ntroduced to implement the fee dback scheduling. The feedb ack scheduler consists of two main components: period adjustm ent and prior ity modification . Just as their names imply, the period adjustment module is responsible for dynamic adjustme nt of sampling periods of the control loops according to network condition and system performance, and the priority modification module re-assigns the sensors’ priorities online according to actual performance of the c ontrol loops. The inputs to the integrated feedback scheduler include the actual deadline miss ratio and its setpoint, and the measured control performance in terms of certain performance metric. The output variables are the sampling period and the priority of each control loop. The feedback scheduler is time triggered. At ever y invocation instant, the scheduler gathers current deadline miss ratio and the control performance of contro l l oops. With respect to the setpoint of t he deadline miss ratio, new sampling periods will be produced. Prioriti es of the control loops will also be m odified when necessary. Intuitively, actual network utilization could be kept around the highest possible level by adapting sampling periods, as long as miss ratio setpoint is not zero. Due to this non-zero miss ratio setpoint, however, deadline misses are unavoidable when the system is in steady stat es, no matter at what level the workload is. In NCSs that use fixed-priority scheduling methods, most of t he deadline misses will happe n in control loops whose priorities are relatively low. This may deteriorate th e performance of these control loops. This problem will be addressed in the priority modification module. 4.2. Period Adjustment The primary role of the period adjustment module is to adapt the sampling periods of the control loops in a way that the actual deadline miss ratio is maintained at a desired level and the available resources ar e reasonably distributed. A natural method to construct this module following feedback control theory is to use a specific control algorithm to obtain the sampling periods directly from the difference between a ctual deadline miss ratio and its setpoint. A method using this idea has been discussed in our previous work [ 30]. In this paper, we develop a more generalized ca scaded feedback scheduling method to determine the sampling periods. New sampling periods are produced online with two c onsecutive steps, thus forming a cascaded feedback scheduling algorithm. Firstly, use the classical PID (Pr oportional-Integral-Derivativ e) control technique to 6 calculate the total network utilization of all control loops in response to current cont rol error of the deadli ne miss ratio. Secondly, under this constraint on allowa ble network utilization, obtain new sam pling periods by taking into account actual performance of the control loops. Let T FS be the invocation interval of the f eedback scheduler. Deadline miss ratio ρ ( j ) is defined as the ratio of the number of sample data packets that miss their d eadlines to the total number of sample data packets that are generated in control loops in the time interval [( j -1) T FS , jT FS ], where j denotes the invocation instant of feedback scheduler. Let ρ r be the desired deadline miss ratio. At the j -th instant, the total network utilization of control loops U (0 ≤ U ≤ 1) is calculated as: () ( () ( 1 ) ) () () ( 1 ) () PI U j K ERR j E RR j K ERR j Uj Uj Uj Δ= ⋅ − − + ⋅ =− + Δ (2) where K P and K I are essential coefficients for the PI control algorithm, ERR is the control error of deadline miss ratio. The calculation of ERR is worth discussing. In most situations the control error can be computed as ERR ( j )= ρ r - ρ ( j ) according to its general definition. However, dead line miss ratio is subject to saturation, that is, it could never be a negative. When th e network work load is light, the deadline miss ratio will be zero all the time, regardless of changes in workload. On the other hand, a relativ ely small setpoint for deadline miss ratio is always preferable i n order to minimize the impact of dead line misses on QoC. Consequently, in the case of light workload when almost no deadline is missed, the absolute valu e of the control error will remain small, no matter how low the workload level actually is . This may cause the transient process of the feedback scheduling system to be too slow, t hus i mpairing its dynamic behavior. To address this problem, a deadzone-based control technique is employed here, and the calculation of the control error is re-formulated accordingly. The feedback scheduling system is considered to be steady if deadline miss ratio falls into the interval (0, ] r ρ . Accordingly, if 0( ) r j ρ ρ < ≤ , then the control error of deadline miss ratio is 0. To improve the dynamic behavior of feedback scheduling, the follo wing equation is used to calculate ERR ( j ): ( ) 0 ( ) 0 ( ) 0 ( ) ( ) ρρ ρρ ρ ρρ = ⎧ ⎪ =≥ > ⎨ ⎪ −≥ ⎩ r r r if j ERR j if j ji f j (3) Once the total utilization U ( j ) is obtained, it is distributed among multiple control loops in a way that the overall QoC is optimized. Let J i be the performance index for the i -th control loop. The problem of findi ng the optimal sampling periods can be described as the following optimization problem: 1N h ,...,h 1 1 min s. t. / ( ) N ii i N ii i Jw J ch U j = = = ≤ ∑ ∑ (4) where w i is the weighting coefficient of loop i . It is apparent that the above equation gives a typical optimal feedback scheduling problem [2,12,27,31] , of which the b asic idea is to minimize the total control cost of the system through adjusting the sampling periods of c ontrol lo ops under the constraint of current total utilization. Recall that the bigger th e control cost the worse the QoC. Using the above formulation, the results of the optimal sampling periods will tightl y rely on the forms of the performance indices of the control loops. Generally speaking, J i could be either stationary (i.e., independent of time) or dynamic (i.e., time-varying). In the time dom ain, there are commonly three types of options for J i , i.e., infinite-time, finite-time, and inst antaneous performance indices. For the sake of simplicity, the absolute instantaneous control error is em ployed here as the dynamic performance index for QoC, i.e., () | () | ii J je j = (5) where e i is the control error within the i -th control loop. With (5), Eq. (6) is used to compute the sam pling period of loop i . 7 ,m i n ,m i n ,m i n 1 11 ,m a x ,m ax () () ii i i ii ii i in nn N in n n NN in nn ii nn in cc c h wJ UU U UU U wJ cw J cc wJ w J U hh = == == = ′ + +− ⋅ = ⋅+ − ∑ ∑ ∑ ∑∑ (6) where h i,max is the maximum allowable sampling period, and U i,min = c i / h i,max is the corresponding minimu m allowable utilization. In Eq. (6), the indicator j for the feedback scheduler invocation instant is omitted for notation simplicity. Once the minimum utilization of each control loop has been preserved, Eq. (6) will distribute the remaining fraction of bandwidth resource, i.e., ,m i n 1 () N n n Uj U = − ∑ , among the control loops in proportion to the magnitudes of ii wJ . In this way, the control loops with worse performance will be assigned larger fractions of free network bandwidth, while the sam pling pe riods of the control lo ops with better performance will be more close to their maxim um allowable values. In the extreme, if J i = 0 indicating that the contr ol loop is in a steady state, then it can be deduced from (6) that h i = h i,max , implying that the sampling perio d of this loop is set to the maximum. With this band width allocation scheme, the largest fraction of free communication resource is distributed to the control loop that needs it the m ost. This benefits optimizing the overall QoC. Eq. (6) assumes that 0 nn wJ ≠ ∑ . In the case where all control loops are in steady states, i.e., 0 nn wJ = ∑ , the free bandwidth will be distributed among all control loops evenly. Furtherm ore, to avoid too big difference between the network utilization of the control loops when nn wJ ∑ is small, which may be caused by the fact that some control loops are st eady while the others are not, the following rule is introduced into the calculation of h i : ,m in ,m in ,m in if () / ii i i nn ii ii n cc c hw J UU UU U U N ε == = < ′ ++ − ∑ ∑ (7) where ε is a user-defined parameter. 4.3. Priority Modification The reasons for modifying the priorities of the control loops online together with sampling period adjustment are explained roughly from the following two aspects: 1) To alleviate the effect of deadline misses. As me ntioned previously, the feedback scheduling method based on deadline miss ratio control will unavoidabl y induce deadline misses in the control l oops, and the performance of the control loops with lower prio rities will be influenced. To address this problem, the priorities of the sensors are modified dyna mically according to feedback about the control performance and assign lower priorities to the control loops with better performance. In this way, the deadline misses will most likely occur in the contro l loops with the best performance, which benefits reducing the impact of deadline misses on the overall QoC. 2) To alleviate the effect of delay. According to the principle of priori ty -driven communication protocols, high-priority data packets will be transmitted earlier th an t h e data packets with lower priorities in the case of media access contention. A natural consequen ce is that t he control delay of a high-priority loop is usually shorter than that of a low-priority loop. Longer dela ys often make control performance worse. Furthermore, for given delays, a contro l loop with better performance could intuitively be impacted less significantly than a control loop w ith worse performance. Based on this observation, higher priorities are assigned to the control loops th at currently have worse performance so that the impact of delay is alleviated. 8 Of course, the ultimate goal of priority modificati on is to improve the overa ll control perform ance. The basic rule used to assign priorities is that the worse th e current performance of a control loop is, the higher the priority it will be assigned. As a prerequisite for priority re-assignment, an appropriate performance metric i J ′ should be determined. Similar to the choice of J i , there are many different feasible forms for i J ′ . Here we define i J ′ as follows based on (5): () () | () | ii ii i J jw J jw e j ′ == ⋅ (8) Using this performance index, the rule for determini ng priorities turns to be that the bigger the value of i J ′ the higher the relevant control loop’s priority . Intuitively, for control loops with the same i J ′ , the order of their priority levels will not be changed. Since J i varies over time, it is possible that the prioriti es of the control loops might be modified frequently due to even small changes in perturbations in some control loops. To reduce the num ber of unnecessary switches of priorities caused by small variations of i J ′ values and to avoid too many fluctuations, the notion of priority switch threshold δ is introduced. With thi s notion, prio rity switches are permitted only when t he absolute difference between the corresponding i J ′ values is no less than δ . Accordingly, the following rules are built for priority modification, where m and n are indexes of control loops. RULE 1 If max{ i J ′ }-min{ i J ′ }< δ , then make no change of all priority levels. RULE 2 If () () mn J jJ j ′′ = , then maintain the order of current priority levels. RULE 3 If () () mn J jJ j ′′ > and (1 ) (1 ) mn pj p j −> − , assuming there is no any control loop whose i J ′ value is between () m J j ′ and () n J j ′ (hereafter the same), then () () mn p jp j > . RULE 4 If () () mn J jJ j ′′ > , (1 ) (1 ) mn pj p j −< − and () () mn Jj J j δ ′ ′ − ≥ , then () () mn p jp j > . RULE 5 If () () mn J jJ j ′′ > , (1 ) (1 ) mn pj p j −< − and () () mn Jj J j δ ′ ′ − < , then () () mn p jp j < and () () m p jp j < A , where A is the index of the control loop whose i J ′ value is the maximum among all that are small than () n J j ′ . The introduction of RULE 5 is to simplify the process of priority re-assignment in some particular cases where () () () mn J jJ jJ j ′′ ′ >> A and (1 ) (1 ) (1 ) mn pj p j p j −< −< − A . No claim is made that () ( 1 ) mm pj pj =− and () ( 1 ) nn pj pj =− when () () mn J jJ j ′′ = . Since only the order of their priority levels is maintained, the values of p m ( j ) and p n ( j ) may consequently change with the relative i J ′ value of each control loop. In terms of feedback scheduling, the above priority modification method can be regarded as some kind of direct feedback scheduling scheme, since it de termines the pri orities of the control loops directly according to their current performance. Of course, this me thod is not actually a scheduling algorithm from the viewpoint of real-time scheduling theory. This is because we do not realiz e any real-time scheduler for operating systems. While the sensors’ priorities are m odified periodically, the network is still scheduled based on the fixed-priority scheduling algorithm at runtime. On the other hand, since new low-lev el schedulers are not needed for our approach , it is easy to implement in practice. 4.4. Design Considerations Fig. 2 gives the pseudo code for the integrated feedback scheduling algorithm . In the following, the design of some critical parameters will be discussed. Since the feedback scheduler is time trigge red, an appropriate invocation interval T FS needs to be determined. It is intuitive that as T FS becomes smaller the feedback sche duler will become more sensitive to variations in available resource, which benefits the improvement of feedback scheduling performance. However, decreases in T FS will add computing and co mmunication overheads. On the other hand, to achieve accurate measurements of deadline miss ratio, T FS should not be too small. In practice, when choosing T FS , one often has to take into account a set of characteristics of the system, e.g., magnitudes of the sam p ling periods of the control loops and (estimated) frequency of workload varia tions, and make a trade-off between feedback scheduling overhead and sensitivity. 9 // ρ : Deadline miss ratio //e: Control error (in control loop) //h: Sampling period //p: Loop/sensor priority Integrated Fe edback Scheduling { Input: ρ ,{ e } Period Adjustment { //Calculate new total utilization U Compute ERR using (3); Compute U using (2); / / Re assign sampling periods FOR each control loop Compute performance i ndex J using (5 ); END FOR each control loop Compute new sampling period h using (6) o r (7); END } Priority Modi fication { FOR each control loop Compute using (8) ; END Sort contro l loops with decreasin g values; Determine new priori ties for sensors according to RULE 1-5; } Output: {h,p} } ′ J ′ J Fig. 2. Pseudo code for the i ntegrated feed back schedul ing The setpoint for deadline miss ratio ρ r highly relates to the robustness of the control loops to packet losses. Recall that packet losses are only one subclass of deadlin e misses. Theoretically, one could first use related control theory (e.g. [6,9]) to obtain the maximum allowable packet loss ratio ρ i,max , and then choose an appropriate ρ r in the range of (0, min{ ρ i,max }). Generally, it is not desirable to choose a ρ r value too close to min{ ρ i,max }. To maintain system stability, it is necessary to preserve an enough margin for dynamic variations of deadline miss ratio. However, no guarantee of sy stem stability can be m ade explicitly even if a ρ r smaller than min{ ρ i,max } is selected. Fortunately, to minimize the imp act of deadline misses in steady states on QoC, most often we will specify a relatively small ρ r , which makes it easy to pr ovide stability guarantees. Appropriate control parameters K P and K I must be chosen in (2). Ideal ly, if the relationship between deadline miss ratio and utilization can be described analy tically, well-establishe d feedback controller design methods such as pole placement could then be used to obtain these two param et ers. However, due to the complexity of network communications, the relatio nshi p between the deadline miss ratio and utilization is unable to formulate analytically in most circumst ances, parti cularly when NCSs operate in dynamic environments with uncertainty. Therefore, K P and K I are tuned by simulations. In the module of priority modification, the value of the switch threshold δ affects the feedback scheduling performance to some degree. If it is too large, then the advantage of priority modification will be weakened undesirably. If it is too small, however, frequent switch es of priori ties cannot be avoided effectively. When choosing δ , the runtime control performance of the system should be taken into account. It could often be determined based on the magnitudes of i J ′ values of the control loops. 5. Performance Evaluation In this section we evaluate the performance of the pr oposed IFS scheme via simulation experiments. Suppose that the control network is of CAN type with a data rate of 25Kbps. Although the data rate of CAN buses can be much higher, it could be regarded that all othe r bandwidth resources have been allocated to other 10 communication entities. For simplicity, all physical pr ocesses in the control loops are assumed to be DC motors. State feedback controllers are designed usi ng the pole placement method. The relevant process model and desired closed-loop poles are given below. DC motor: [] 10 1 , 0 1 10 0 x xu y x − ⎡⎤ ⎡ ⎤ =+ = ⎢⎥ ⎢ ⎥ ⎣⎦ ⎣ ⎦  Desired closed-loop poles (on z plane): 0.8± 0.3 i The size of sample data packets in all control loops is 10 bytes. The corresponding data packet transmission time is 10×8/25=3.2m s. Weighting coefficients w i =1 for all control loops. Some parameters of the feedback scheduler are listed in Table 1. Various scenarios with both light load and heavy load are simulated, and the results are compared with tho se from the traditional NCS de sign method (denoted Non- FS) that employs fixed sampling periods and the RM scheduling algorithm . Table 1. Simulation parame ters for integrated feedbac k schedulin g Variable T FS ρ r K P K I h max ε δ Value 500m s 5% 0.3 0.8 20ms 0.2 0.2 5.1. Scenario I: Underloaded Conditions This scenario simulates the NCS with light network load . There are only two control loops in the system. Set h 1 = 10ms and h 2 = 12ms. The initial requested network utilizati on is 3.2/10 + 3.2/12 = 0.587. It can be concluded from Theorem 1 that the system is schedulab le. By default, loop 1 holds the high priorit y. At runtime the inputs to the control loops a re square waves with periods of 4s and 2s respectively. To quantify the QoC, Fig. 3 gives the integral of absolute error (IAE) for e ach of the control loops. Compared to the Non-FS case, IFS leads to 14.1% improve ment in the control cost for loop 1, and 50.5% for loop 2. The total control cost im provement is 40.9%, indicating that the QoC under IFS is much higher th an that under Non-FS. 0 1 2 3 4 5 6 7 8 0 0.1 0.2 DC Motor 1 IAE 0 1 2 3 4 5 6 7 8 0 0.2 0.4 0.6 Time (s) IAE DC Motor 2 Non−FS IFS s Fig. 3. Integral of absolute error for each control loop in Sce n ario I As shown in Fig. 4, both the sam pling periods and the priorities of control loops rem ain constant at runtime when the traditional design method is used. As a result, the alloca tion of network resource is fixed. Note that in all figures for priorities a smaller value represents a higher priority level. 11 0 1 2 3 4 5 6 7 8 0.008 0.01 0.012 0.014 Sampling Period (s) 0 1 2 3 4 5 6 7 8 1 2 Time (s) Priority Loop 1 Loop 2 Fig. 4. Sampling periods and priorities under Non-FS in Scenario I 0 1 2 3 4 5 6 7 8 0 0.005 0.01 0.015 0.02 0.025 Sampling Period (s) 0 1 2 3 4 5 6 7 8 1 2 Time (s) Priority Loop 1 Loop 2 Fig. 5. Sampling periods and priorities under IFS in Scenario I As can be seen from Fig. 5, under IFS the sampling periods and the priorities change over tim e. If two control loops have comparable performance, both sampli ng periods will be shortened. For instance, at time t = 6.5s, both control loops are in steady states, and con sequently their sampling periods are 7.5 m s, which is smaller than both of their respective initial values (i .e. 10ms and 12m s). If the control performance of two loops is rather different, the feedback scheduler will assign a relatively sm aller sampling period and a higher priority to the control loop with worse performance. Fo r instance, at time t = 7s, loop 2 is experiencing a transient process while loop 1 is in a steady state. In or der to bring loop 2 back to its steady state as soon as possible, the system assigns the loop a relatively sma ll sampling period of 4.3ms and the hig h priority of value 1. At the same time, the sampling period of loop 1 is enlarged to 20ms so that the system schedulability is not violated. As a result, our IFS sch eme results in improvement of the overall QoC. When the traditional design method is employed, the total requested network u tilization of control loops remains at a relatively low level of 58.7% at runtime, see Fig. 6. On the contrary , the requested network utilization under IFS increases gradually to around 80%, much higher than 58.7% under Non-FS. 12 0 1 2 3 4 5 6 7 8 0.5 0.6 0.7 0.8 0.9 1 Requested Network Utilization 0 1 2 3 4 5 6 7 8 0 0.2 0.4 Time (s) Deadline Miss Ratio Non−FS IFS Fig. 6. Requested network utilization and deadline miss ratio in Scenario I As also shown in Fig. 6, although deadline misses oc cur when the integrated fe edback scheduler is used, the deadline miss ratio remains considerably small (even to be 0) most of the time, without jeopardizing the overall control performance. 5.2. Scenario II: Overloaded Conditions This scenario simulates an overloaded NCS with four control loops, in which h 1 = h 2 = 10ms and h 3 = h 4 = 12ms. This scenario can be viewed as a consequen ce of adding two extra control loops onto t he system considered in Scenario I for the purpose of system update. In this context the initial requested network utilization is 3.2 3.2 2 100% 117.4% 10 12 ⎛⎞ ×+× = ⎜⎟ ⎝⎠ , indicating that the system is overloaded and hence is not schedulable. Therefore, with traditional open-loop sch eduling me thods, deadline misses cannot be avoided. By default, the priorities are set as: p 1 > p 2 > p 3 > p 4 . The inputs to loops 1 and 2 are square waves with a period of 4s, and loops 3 and 4 have the same square wave inputs with a period of 2s. 0 2 4 6 8 0 0.1 0.2 0.3 0.4 DC Motor 1 IAE 0 2 4 6 8 0 0.1 0.2 0.3 0.4 DC Motor 2 IAE 0 2 4 6 8 0 0.2 0.4 0.6 0.8 DC Motor 3 Time (s) IAE 0 2 4 6 8 0 2 4 6 8 10 DC Motor 4 Time (s) IAE Non−FS IFS Fig. 7. Integral of absolute error for each control loop in Sce n ario II 13 Fig. 7 shows the IAE value for each control loop. W ith traditional open-loop scheduling, loop 4 finally becomes unstable, though the other three loops a chieve satisfactory performance. Compared with the traditional design method, IFS yields improved QoC for a ll control loops. Quantitative evaluation in terms of IAE shows that the first three loops have the pe rformance improvement of 15.2%, 19.3% , and 20.6%, respectively, and loop 4 is stabilized with the control performance comparable to that of loop 3. We further analyze why improved results can be ach ieved. Under overloaded conditions, the integrated feedback scheduler makes the unschedulable system schedulable through adapting the sampling periods of the control loops. As can be seen from Fig. 8, if the performance of the control loops is comparable, the feedback scheduler will decrease the total requested network utilization through properly enlarging sampling periods, thus decreasing the deadline miss ratio of the system (see Fig. 10). 0 1 2 3 4 5 6 7 8 0.01 0.02 h1(s) 0 1 2 3 4 5 6 7 8 0.01 0.02 h2(s) 0 1 2 3 4 5 6 7 8 0.01 0.02 h3(s) 0 1 2 3 4 5 6 7 8 0.01 0.02 h4(s) Time (s) Non−FS IFS Fig. 8. Sampl ing periods o f control l oops in Scenario II 0 1 2 3 4 5 6 7 8 1 2 3 4 Time (s) Priority IFS 0 1 2 3 4 5 6 7 8 1 2 3 4 Priority Non−FS Loop 1 Loop 2 Loop 3 Loop 4 Fig. 9. Priorities of control loops in Scenario II If the performance of the control lo ops is quite different, the feedback scheduler will assign relatively small sampling periods to the control loops with wor se performance, and relatively large ones to the control loops with better performance. Besides sampling periods, the priorities of the control loops also vary under IFS, as shown in Fig. 9. In contrast, both sam pling pe riods and priorities of all control loops are fixed with Non-FS. Fig. 10 depicts the total requested network utilizati on and the deadline miss ratio under different schemes. Under Non-FS, the network workload rem ains to be 117.4% all the time, and the deadline miss ratio is 14 around 25.5%. In the case of IFS, the requested networ k utilization keeps below (and close to) 100%, and the deadline miss ratio finally becomes very low (close to 0), both approaching steady states after a transient process. 0 1 2 3 4 5 6 7 8 0.8 1 1.2 1.4 Requested Network Utilization 0 1 2 3 4 5 6 7 8 0 0.2 0.4 Time (s) Deadline Miss Ratio Non−FS IFS Fig. 10. Requested network utiliza tion and deadline miss ratio in Scenario II As mentioned above, to reduce the deadline m iss ratio, IFS enlarges the average sampling period of each loop to some degree. Although in theory larger sa mpling periods will yield worse control performance, the total control cost of the system decreases because t he deadline miss ratio is signi ficantly reduced. Like in Scenario I, thanks to the dynamic adjustment of bot h sampling periods and priorities, which enables each control loop to obtain as much bandwidth as possible when it needs most, the performance of all control loops is improved. 6. Conclusion By exploiting the emerging methodolog y of codesign of feedback cont rol and network scheduling, an integrated feedback scheduling scheme has been proposed in this paper. It combines a cascaded feedback scheduling algorithm for sam pling period adjustment and a direct feedback scheduling algorithm for priority modification. It optimizes the use of available network resources through dynamic adaptation of both sampling periods and priorities, thus enabling flex ib le QoC management in NCSs. With the integrated feedback scheduling, the deadline miss ratio of NCSs can be controlled effectively. The available network resources will be fully used even in underloaded c onditions, while graceful degradation of QoC can be achieved in overloaded cond itions. Simulation results have shown th at the proposed scheme is able to effectively tackle the problem of bandwidth limitati on and w orkload variations, thus providing a n ew approach to NCS design and im plementation in dynamic environments. However, it is still non-trivial to examine the runtime overhead associated with integrated feedback scheduling. Advanced control techniques will be employed in the cascaded feedback scheduling algorithm in our future work. Acknowledgement This work is supported in part by China Postdoctoral Science Foundation under Grant No. 200704 20232 and Australian Research Council (ARC) under the Discovery Projects Grant No. DP0559111. 15 References [1] A.T. Al-Hammouri, M. S. Branicky, V. Liberatore, S. M. Phillips, Decentralized and dynamic bandwidth allocation in networked control s y stems, in: Proc. IEEE IPDPS’06, Rhodes Island, Greece (2006) [2] K.-E. Arzen, A. Robertsson, D. Henriksson, M. J ohansson, H. Hjalmarsson, K. H. Johansson, Conclusions of the ARTIST2 Roadmap on Control of Computing Systems, ACM SIGBED Review 3 (3) (2006)11-20 [3] M.S. Branicky, S. M. Philips, W. Zhang, Sche duli ng and feedback codesign for networke d control systems, in: Proc. IEEE CDC’02, Las Vegas (2002) 1211-1217 [4] S. Cavalieri, Proposal and evaluation of dynami c assignment of priorities in CAN, Computer Standards & Interfaces 28 (2006) 531-552 [5] T. He, J. A. Stankovic, M. Marley, C. Lu, Y. Lu, T. F. Abdelzaher, S. H. Son, G. Tao, Feedback control-based dynamic resource management in distributed real-time systems, Journal of Systems and Software 80 (7) (2007) 997-1004 [6] J. P. Hespanha, P. Naghshtabrizi, Y. Xu, A Survey of Recent Results in Networked Control Systems, Proceedings of the IEEE 95 (1) (2007) 138-162 [7] S. H. Hong, W.H. Kim, Bandwidth allocation scheme in CAN protocol, IEE Proceedings-Control Theory and Applications 147 (1) (200 0) 37-44 [8] D. Hristu-Varsakelis, P. R. Kumar, Interrupt-based feedback c ontrol over a shared communication medium, in: Proc. I EEE CDC’02 (2002) 3223-3228 [9] S. Hu, W. Y. Yan, Stability robustness of networke d control systems with respect to packet loss, Automatica 43 (2007) 1243-1248 [10] H. Y. Kim, H. S. Park, Optimal Period and Pr iority Assignment for Guaranteeing Real-Time Requirements in Distributed Control System s, in : Proc. 4th Asian Control Conference (ASCC'02) (2002) 1052-1057 [11] Z. Li, M.-Y. Chow, Adaptive Multiple Sampli ng Rate Scheduling of Real-time Networked Supervisory Control System - Part II, in: Proc. IEEE IECON’06, Paris (2006) 4610-4615 [12] C. Lozoya, M. Velasco, P. Marti, A 10-Year Ta xonomy on Prior Work on Sampling Period Selection for Resource-Constrained Real-Time Control Syst e ms, in: Proc. Work-in-Progress Session, 19th Euromicro Conference on Real-Time Syst ems (ECRTS’07), Pisa, Italy (2007) [13] N. P. Mahalik (Editor), Fieldbus Technology: Indus trial Network Standards for Real-Time Distributed Control (Springer Verlag, Germany, 2003) [14] N.P. Mahalik, Attributes of industrial machine and process control systems, International Journal of Computer Applications in Technology 25 (4) (2006) 2 34-240 [15] N. P. Mahalik, J. Ryu, B. H. Ahn, Simulation in tegrated managem ent layer for real-time embedded DCN, Computer Standards & Interfaces 28 (2006) 508-522 [16] R . M . M u r r a y , K . J . A s t r o m , S . P . B o y d , R . W . B r ockett, G. Stein, Control in an information rich world, IEEE Control Systems Magazine 23 (2) (2003) 20-33 [17] H. S. Park, Y. H. Kim, D. S. Kim, W. H. Kwon, A scheduling method for network-based control systems, IEEE Trans. Control Systems Technology 10 (3) (2002) 318-330 [18] L. Sha, R. Rajkumar, J. P. Lehoczky, Priority inheritance protocols: An approach to real-time synchronization, IEEE Transactions on Computers 39 (9) (1990) 1175-1185 [19] J. Silvestre, V. Sempere, An architecture for flex ible scheduling in Profibus networks, Computer Standards & Interfaces 29 (2007) 546-560 [20] Jean-Pierre Thomesse, Fieldbus Technology in Industria l Automation, Proceedings of t h e IEEE 93 (6) (2005) 1073-1101 [21] Y.-C. Tian, D. Levy, Configuring the Worst-Case Comm unication Delay in Real-Time Networked Control Systems, in: Proc. Int. Conf. on Embedded Systems and A pplications (ESA' 07 ) , USA (2007) [22] Y.-C. Tian, D. Levy, M. O. Tade, T. Gu, C. Fidge, Queuing packets in communication networks for networked control systems, in: Proc. IEEE WCICA’06, Dalian, China (2006) 205-209 [23] Y.-C. Tian, Z.-G. Yu, C. Fidge, Multifractal natu re of networ k induced time delay in networked control systems, Physics Letters A 361 (2007) 103-107 16 [24] M. Velasco, J. M. Fuertes, C. Lin, P. Marti, S. Brandt, A Control Approach to B andwidth Management in Networked Control Systems, in: Proc. I EEE IECON’04, Busan, Korea, vol. 3 (2004) 2343-2348 [25] M. Velasco, P. Marti, R. Castane, J. Guardia, J. M. Fuertes, A CAN Application Profile for Control Optimization in Networked Embedded Systems, in: Proc. IEEE IEC ON’06, Paris, France (2006) 4638- 4643 [26] G. C. Walsh, Hong Ye, Scheduling of networked control systems, IEEE Control Systems Magazine 21 (1) (2001) 57-65 [27] F. Xia, Feedback scheduling of real-time control systems with resource constraints, PhD Dissertation, Zhejiang University, 2006. [28] F. Xia, X. H. Dai, Z. Wang, Y. X. Sun, Fee dback Based Network Scheduling of Networked Control Systems, in: Proc. IEEE ICCA’05, Bu dapest, Hungary (2005) 1231-1236 [29] F. Xia, X. H. Dai, Y. X. Sun, J. X. Shou, Contro l Oriented Direct Feedback Scheduling, International Journal of Information Tec hnology 12 ( 3) (2006) 21-32 [30] F. Xia, L. P. Liu, S. B. Li, Y. X. Sun , Integrated Feedback Scheduling of Networked Control Systems, in: Proc. Int. Conf. on Sensing, Computing and Automation (ICSCA’06), Dynamics of Continuous, Discrete and Impulsive Systems - Series B: Applications and Algorithms, an added volum e (Watam Press, 2006) 3274-3280 [31] F. Xia, Y. X. Sun, Control-Scheduling Codesign: A Perspective on Int egrating Control and Computing, in: Proc. Int. Conf. on Sen sing, Computing and Automation (ICSCA’06), Dynamics of Continuous, Discrete and Impulsive Systems - Se ries B: Applications and Algorithm s, an added volume (Watam Press, 2006) 135 2-1358 [32] J. Yepez, P. Marti, J. M. Fuertes, Control Loop Scheduling Paradigm in Distributed Control System s, in: Proc. IEEE IECON’03, Roanoke, USA, vol.2 ( 2003) 1441-1446

Original Paper

Loading high-quality paper...

Comments & Academic Discussion

Loading comments...

Leave a Comment