SAMPLING PERIOD ASSIGNMENT FOR NETWORKED CONTROL SYSTEMS BASED ON THE PLANT OPERATION MODE Daniel A. Perez, Ubirajara F. Moreno, Carlos B. Montez, Tito L. M. Santos PGEAS - Prograa de Pós-Graduação e Engenharia de Autoação e Sisteas DAS - Departaento de Autoação e Sisteas, UFSC - Universidade Federal de Santa Catarina Caixa Postal 476, CEP 884-9, Florianópolis, Santa Catarina, Brasil Eails: dap@das.ufsc.br, oreno@das.ufsc.br, ontez@das.ufsc.br, tito@das.ufsc.br Abstract In this paper, a co-design ethodology for networked control systes (NCS), based on the feedback scheduling theory is proposed. In the proposed approach, the run-tie inforation of the controlled process in eployed to dynaically reassign the coputational resources. The policy is to assign a lower bound of resources for each control loop for plants operating in the steady state, and allocate the exceeding resources to control loops of plants that are in a transient behavior. Keywords Dynaic Resource Allocation, Networked Control Syste Resuo No presente artigo, ua etodologia de co-design para u sistea de controle via redes (NCS), baseada na teoria de escalonaento via realientação é proposta. Na abordage sugerida, são utilizadas inforações do processo controlado e tepo de operação para realocar dinaicaente recursos coputacionais (largura de banda). A política se dá co a deterinação de u liite inferior das necessidades de recursos para cada alha de controle para as plantas que estão operando e regie peranente. Assi os resursos excedentes nas alhas e regie peranente são alocadas para as alhas e regie transitório. Palavras-chave Alocação Dinâica de Recurso, Sisteas de Controle via Redes Introduction Many approaches for resource allocation in networked control systes are based on fixed paraeters of the network s load. They are defined and settled at the initialization stage, and they are kept fixed during all the operation tie of the syste. At execution tie, in general, the resources are shared aong the control loops aording to static specifications. As discussed (Martí et al., ), it is not necessary to assign the sae aount of resources that is deanded to reject a perturbation or a set point change in order to aintain a plant in steady state. This stateent suggests that to keep the sae distribution of resources during all the tie ay be seen as a waste of resource in a networked control syste (NCS). In this paper, a control-scheduling co-design ethodology that regards the plant output behavior is proposed. The proposed approach eploys run-tie inforation fro the controlled process to dynaically reassign coputational resources (sapling period). The principle of the procedure is to allocate the exceeding bandwidth to those control loops that have their respective plants in transient response. This paper is organized as follows. In Section the general proble is described and the concept of feedback scheduling and the procedure used to evaluate the control quality degeneration are presented. The co-design ethodology of NCS is exposed in section 3. In the Section 4, an illustrative exaple of the ethodology is presented. Finally, this paper is concluded in the Section 5.. Proble Proble and Concepts The proble studied in this paper is the real-tie control of a set of processes with controllers ipleented in a reote coputer, interconnected through a coputer network with liited bandwidth. There is a set of continuous plants to be controlled. Associated to each process i, where i =,,...,, there are two devices physically connected, the sensor i and the actuator i, and a reote coponent, the controller i. It is considered the situation which execution tie is not an aessible paraeter, hence jitter copensation techniques are not considered. The plant is described by the continuous-tie linear syste P i (s), the plant output is sapled periodically with interval h by the sensor S i. The controller is represented by the discrete-tie linear syste K i (z), followed by the actuator A i that includes a zero order hold.. Proble Modeling A control cycle can be odeled by a real-tie end-to-end task segented in subtasks with precedence constraints (Sun, 997). The segentation of a control cycle Ti could be off-line analyzed, and it is divided in three subtasks: sensorcontroller Ti, essage; coputation of the control law Ti, and controller-actuator Ti, essage, as presented in Figure ). In (Cervin and Eker, ) the feedback scheduling was proposed. The ain idea is to distribute coputational resources to optiize the
T, T T,, 3 T, 3 T, 3 T, T, T, T, Figure : Modeling of a set with NCSs. global perforance of the control, in a processor susceptible to overloads. In the feedback scheduling approach, the scheduler feedbacks the consuption of the resources of the syste (e.g. execution ties of tasks) to deterine the load of the syste. Syste paraeters, such as periods and priorities of tasks, are reconfigured to lead the utilization to a specific level of reference. If soe task coes to overrun, the scheduler ay detect the overload and reconfigure the tasks to deal with the overload. In previous works a scheduling algorith called Feedback Control EDF is presented (Stankovic et al., 999; Lu et al., 999). This approach consists in an ipleentation of a PID controller in the scheduler, that regulates the deadline iss rate for soft real-tie tasks with variable execution tie, through the adjustent of the processor s utilization. Another approach is used in (Beari et al., 999) where sapling intervals are assigned during run-tie to prevent overload of the processor. In this sae context (Henriksson and Cervin, 5) can be cited, where tasks reassignent in overload conditions was used. However in the ajority of previous work, the plant operation ode was not evaluated for a NCS..3 Estiation of the Control Perforance Degeneration The use of a shared network aong the coponents of a control loop introduces variable delays (delay jitter) in the execution of the control cycle. This uncertainty leads the studied control loops into tie-varying systes, disallowing the direct use of linear systes criteria to evaluate the degeneration of the syste s stability argins. On the other hand, there are soe criteria to easure the degeneration of the stability argins by ipleentation factors in linear tie-invariant systes. Equations () and (), evaluate the phase lag due to the controller discretization and to the constant delay in the control cycle. ϕ is the su of the degeneration factors su. ϕ (d) = ωch () ϕ (a) = ω cl () ϕ = ϕ (a) + ϕ (d) (3) An approach to deals with NCS is to turn it into a tie-invariant proble, using buffers in the controller and actuator nodes to reduce delay jitters (Luck and Ray, 99). The syste becoes tie-invariant, when the release tie in buffer is longer than the worst-case response tie of transission and coputation of the essage between the nodes of the control loop. The ain drawback of changing a NCS in a tie-invariant syste is the unnecessary increase of the control delay, because the average of the delays becoes equal the worst-case response tie. 3 The co-design ethodology Using the feedback scheduling concept, adapted to the NCS context, it is possible to assign ore coputational resources for the control loops that are deanding a better quality of control in each oent of the syste operation. Figure : Dynaic allocation of resources through the feedback scheduling. Differently of the ajority of the works carried through on feedback scheduling, the control variable in this proposal is the operation ode of the plants. Thus, the idea is to apply feedback in two levels of the real-tie control syste, as presented in the Figure. There is a standard feedback used by controllers, and a second level that represents the feedback inside of the real-tie syste to assign dynaically the coputational resources between the control loops. The distribution of the resources is based on the current situation of operation of the controlled plants. The principle of the adopted resources allocation in the ethodology coes fro (Martí et al., ), that suggests that the plant needs different degrees of coputational resources to be controlled. The process needs less aount of resources when it is in steady state than in the situations that the control syste is rejecting a disturbance or is responding to change in the reference.
Following this approach, operation of the control loops was divided in two odes, Transient Mode and Steady Mode. In Transient Mode all the surplus of resources available will be assigned to the control loop with a settling process in the instant of the evaluation. On the other hand, in Steady Mode the iniu aount of resources allowed, kept a lower predefined stability argin, is assigned the control loop with the plant in steady state in the instant of the evaluation. Each control loop can be switched between these two operation odes during the run-tie of the syste, in aordance with the actual state of the plant. During the control procedure of the plant, the controller receives the saples of the plant s outputs, which are coputed, resulting in the control law. In the other feedback loop, used by the feedback scheduler, at each new control cycle the controller verifies the actual plant state. If the states of the plant have been odified, since the last evaluation, the controller detects this change and feeds the feedback scheduler. The change in the resources distribution is done through the odification of the sapling periods h i of each control loop, therefore the quality of control degenerative factors are directly associated to this paraeter. 3. Definitions and Assuptions Soe assuptions and definitions ust be ade before the procedure description. First, a technique to transfor a NCS in a tie-invariant syste is applied to obtain a capable etric to give a value of the quality of the control degeneration in each control loop of the syste. Thus, () and () becoe valid. In order to facilitate the execution of the network and coputer schedulability tests, it is also assued that the axiu tie of the control delay R never is greater than the value of the sapling interval h. The assignent ethod runs every tie that a controller detects that its respective controlled plant changes its operation ode. Considering that, there is a set of NCS s, each tie that the feedback scheduler runs to reconfigure the allocation of resources, the set of control loops is divided in two subsets: TM and SM. The subset denoted by TM is coposed by the control loops operating in a transient state, and the subset denoted by SM is coposed by the control loops operating in a steady state. The nuber of eleents of each subset is denoted respectively by t and s. The phase argin of the syste after its ipleentation in a NCS and its relative degeneration λ are defined as: ϕ NCS = ϕ ϕ (4) λ = ϕncs (5) ϕ In aordance with the operation odes, λ t and λ s are defined as the relative degeneration of the phase argin of the control loops that belongs to the subsets TM and SM respectively. By denoting the utilization of the processors by the set of control loops that belong to the syste as U c, the utilizations related to the subsets TM and SM are denoted, respectively, by U SM and U TM. 3. Sapling Periods Assignent The eployed ethodology consists in assign sapling intervals h such that the control loops which are operating in the sae operation ode have the sae relative degeneration of the phase argin λ. The sapling interval h of a NCS can be related to its relative degeneration of the phase edge λ. In aordance with the assuptions, let L = h. Thus, the su of the degeneration factors ϕ is expressed as in (6) and ω c is the cross-over frequency. ϕ = 3 ωc h (6) On the other hand, the su of the degenerative factors ϕ can be related with the relative degeneration of the phase argin λ, hence fro (4) and (5): ϕ = ϕ ( λ) (7) Fro (6) and (7), the value of h can be obtained. h = ϕ( λ) (8) 3 ω c Thus, the sapling period assignent for each control loop in the subset SM is done through (8) and by the project paraeter λ s. The utilization U SM is coputed through the su of the individual utilizations (e SM /h SM ) of each control loop in the subset SM and e denotes the execution tie. By applying (8), U SM is given by U SM = 3 s e SM,i ω c SM,i ϕ i= SM,i ( λ SM ) Once deterined the coputational resources consued by the control loops in steady state, by applying (9), the reaining coputational resources are allocated to the control loops in the subset TM, thus, the utilization U TM is given by: (9) U TM = U c U SM () By developing a siilar derivation for the subset TM, as for the subset SM, an expression that relates the utilization U TM and λ t, could be given by
U TM = 3 t e TM,i ω c TM,i ϕ i= TM,i ( λ TM ) () Differently of the sapling periods assignent in the subset SM, the utilization U TM is the known paraeter and the relative degeneration of the phase argin λ t is the paraeter to be calculated. The value of λ t can be obtained iteratively, starting for an initial value λ t = λ s. As described in the proposal of the ethod, aditting that the coponent loops of the subset TM will have a saller degeneration that the ones which for the subset SM, thus λ TM > λ SM for all the considered cases. Once the value of λ t is estiated, the assignent of the sapling period for each NCS k in TM is given by (8). Thus, the sapling periods of all the control loops in the syste are assigned every tie that the feedback scheduler is executed. 3.3 Modeling of the Syste Reconfiguration Procedure The syste reconfiguration can be described in the following way. In each activation, the feedback scheduler deterines a new sapling interval for each control loop. The feedback scheduler, then, brings up to date the sapling rates of each controller through the counication between processes in the coputer, and brings up to date the sensors and actuators of the NCS through the broadcast of a essage containing the new set of sapling intervals, for all the reote devices that copose the syste. The reconfiguration procedure can be odeled as a real-tie end-to-end task T r, subdivided in two subtasks. First subtask T r is coposed by the execution of a procedure that coputes the new values of the sapling intervals and by the update of these values in the controllers, executed in the coputer. The second subtask T r is constituted by the sending of a essage, through the counication network, containing the update to the sensors and reote actuators that belong to the syste. Differently of the control cycles, the reconfiguration task of the syste is odeled as an aperiodic real-tie task. Thus, the release of the feedback scheduler instances has a non periodic behavior. The activations are caused by the ourrence of disturbances or changes in the reference signal that, in general, are events that our without a predeterined pattern. The incorporation of the syste reconfiguration in the schedulability analysis, and the deterination of the worst-case response ties of the control cycles, can be ade using aperiodic realtie tasks scheduling techniques for the subtask executed in the coputer. To consider the aperiodic essages in the counication network, the approach will vary in aordance with the ipleented network. For the case of a CAN network, presented in the following topic, is possible to use the Deferrable Server (Lehoczky et al., 987) scheduling strategy. 3.4 Application in a CAN network A CAN network can be scheduled as a fixed priority non preeptable real-tie processor. Thus, established scheduling techniques can be used to copute the schedulability and the response ties of a set of real-tie essages transitted through the network. The odeling of the studied proble looks like the presented in Figure, with control cycle end-to-end tasks and the reconfiguration end-toend task. The utilization of the network that guarantees the schedulability is given by U i + u s + es + b i h i U RM (i + ) () where U i and u s are the periodic tasks and the deferrable server utilizations, respectively, and b i is the blocking tie. 4 Siulations To illustrate the application of the approach, an exaple is presented. The exaple is coposed by three control loops, whose controllers are ipleented in a reote coputer and using the sae CAN network to exchange the necessary inforation to the control. In the coputer, the adopted scheduling strategy is rate onotonic. Considering a CAN network with the biggest transission rate for this technology, M bits/s, and essages with constant and equal size bits (average size of a CAN frae), the transission tie of a essage is equal µs. The priority assignent of the network nodes is fixed. The coputer essages has the biggest priority of the network, the sensors are organized by the decreasing transission rates when all the NCSs operate in the Transient Mode. It is assued that the ipleentation execution ties of each controller in the coputer are constant and equal 5 µs. The continuous-tie plants used in the exaple are given by (3). P (s) = P (s) = P 3(s) = 9 (s + 4s + 9) 4 4 (s 5)(s + 5) 5 7 s(s + s +.5 5 ) (3)
The continuous-tie controllers are given by (4). K (s) = K (s) = K 3(s) = 5(s + 7)(s + 6) s(s + 5) 8 3 (s +.5 5 )(s + 9) (s + )(s +.645 4 s +.35 8 ) 478(s + 5 )(s + 6.6s +.655 5 ) (4) (s + 74)(s + )(s + 494s + 7.9 6 ) Beginning the co-design procedure, soe paraeters ust be defined before the execution of the siulation. In aordance with rate onotonic theory, the respective utilization that guarantees the schedulability for the network is U =.73. Consequently, in aord with, the reload interval of the deferrable server was chosen as h s = s, and the size of the recharge is enough to send a essage per cycle, e s = µs. The value of the phase argin relative degeneration for the Steady Mode was assued to be λ s =.35, leading to a phase argin after the ipleentation of > for each esh. The proposal, presented in this paper, is characterized by the dynaic change of the resources of allocation, aording to the operation ode of the set of NCS. To evaluate possible benefits of the proposal, three cases are proposed in order to explore the operational liits of each plant and the evolution of scenarios in which the assignent of the periods are odified. ϕ ncs Case - The plants are initially at steady state, the reference of all plants are changed to. The goal is to observe the control loops operating, together, in the Transient Mode. Case - The sae reference change of Case is applied for NCS, while the control loops and 3 are kept operating at the steady state (Steady Mode). The objective in this siulation is to place the biggest aount of resources for the control loop. Case 3 - In this scenario, the goal is to change the operation odes of all NCS to show soe reconfiguration procedures of the syste. To do that, the sae disturbance is applied, in t =.3s and t =.4s, in the control loop ; and a reference change is iposed to NCS 3 at t =.6s. Case for NCS. After the siulation of Case, the results obtained are presented in the Figure 3. This is the configuration which each NCS receives less aount of resources when operating in the Transient Mode. Consequently, the greatest closed loop perforance degeneration ours in this situation. The ipact in the plant due to the use of the proposed ethodology in Case is displayed in Figure 4. In this case, the plant holds the greatest availability of resources, since it operates alone in Transient Mode (TM). The instant of coutation t co and the phase argins ϕ ncs Case and Case are shown in the Table I. Plant.5..5..5. (a) Sapling I. Sapling I. Sapling I..5 Plant x 3.5. x 3.5.5. x 3.5.5. (b) Figure 3: Siulation results to the case, (a) Plants responses e (b) Sapling interval (in seconds) used during the siulation. The responses of the control loops of Case 3 are presented in the Figure 5(a). The values of the saple periods for each NCS during the siulation are displayed in the Figure 5(b), which was.5. (a) Sapling I..5 x 3.5. (b) Figure 4: Siulation results to the case (a) Plants responses e (b) Sapling interval (in seconds) used during the siulation. Table : Switching tie t co and ipleentation phase argin ϕ NCS (degrees). Case Case t co(s) ϕ NCS t co(s) ϕ NCS. 8.4.3 8.7.45 37.3.7 3.6 Table : Ipleentation phase argin ϕ NCS of (degrees) for the case 3. ϕ NCS 37. 34..8.8.8.8.8.8. 34.4 37.3. 37.3 3.8 37.3. 3.6 3.6 3.6 3.6 3.6 3. 3.6 3.6
divided in eight slices (classified in alphabetical order fro a until h ), where the liits of each slice are instants of reconfiguration of the distribution of resources in the syste. In the Table the phase argins ϕ ncs of the plants for each slice of siulation divided in the Figure 5(b) are presented. As changes of references and disturbances are applied in the control loops, the reassignent of the periods could be verified. For instance, in the tie slice e, the NCS operates in the Transient Mode and possess ϕ NCS, = 37.3, however with the change in the reference (liit between e and f ) the control loop 3 control changes the operation ode and requests ore coputational resources of the syste, reducing ϕ NCS, to 3.8. It is possible to verify the effect of the reduction of resources in the quality of control through the responses of the control loop, when the sae disturbance is applied in the instants of siulation t =.3 and t =.4. A siilar situation ours in the slices a and b, between NCS and 3. In the slice d, all the loops operate in the Steady Mode and use the lesser possible aount of resources. Plant.5...5...5.. (a) Sapling Period (s) Sapling Period (s) Sapling Period (s).5 x 3 Plant.5...5 x 3.5.. x 3.5.5...5 (b) Figure 5: Siulation results to the case 3, (a) Plants responses e (b) Sapling interval used during the siulation. 5 Final Rearks By analyzing the results carried out fro the siulation exaples, it is possible to conclude that, the proposed co-design ethodology, presented in the paper, could lead to satisfactory results. In the proposal, results fro the theories of control systes and real-systes are cobined leading to significant iproveents of the global perforance of the control and a better use of the available coputational resources. In this approach, the feedback scheduler, play a ajor role, allowing the syste to be adaptable to instantaneous changes in operating states of the plants. In despite of the introduction of longer delays, this strategy enhance the perforance of the control loops by applying a dynaic re-distribution of the sapling intervals, based on the operation ode of the controlled plants. References Beari, G., Caselli, S., Reggiani, M. and Zanichelli, F. (999). Rate odulation of soft realtie tasks in autonoous robot control systes, Proceedings of the th Euroicro Conference on RealTie Systes. Cervin, A. and Eker, J. (). Feedback scheduling of control tasks, Proceedings of the 39th IEEE Conference on Decision and Control, Sydney, Australia. Henriksson, D. and Cervin, A. (5). Optial on-line sapling period assignent for realtie control tasks based on plant state inforation, Proceedings of the 44th IEEE Conference on Decision and Control and European Control Conference ECC 5, Seville, Spain. Lehoczky, J. P., Sha, L. and Strosnider, J. K. (987). Enhanced aperiodic responsiveness in hard real-tie environents, Proceedings of the IEEE Real-Tie Systes Syposiu, pp. 6 7. Lu, C., Stankovic, J., Tao, G. and Son, S. H. (999). Design and evaluation of a feedback control edf scheduling algorith, Proceedings of the th IEEE RealTie Systes Syposiu, pp. 56 67. Luck, R. and Ray, A. (99). An observer-based copensator for distributed delays, Autoatica 6(5): 93 98. Martí, P., Fohler, G., Raaritha, K. and Fuertes, J. M. (). Iproving quality-ofcontrol using flexible tie constraints: Metric and scheduling issues, Proceedings of the 3nd IEEE Real-Tie Systes Syposiu. Stankovic, J., Lu, C., Son, S. and Tao, G. (999). The case for feedback control realtie scheduling, Proceedings of the EuroMicro Conference on Real-Tie Systes. Sun, J. (997). Fixed-Priority End-To-End Scheduling In Distributed Real-Tie Systes, Phd thesis, Departent of Coputer Science, University of Illinois at Urbana- Chapaign.