The Self Triggered Task Model for Real-Time ... - Semantic Scholar

7 downloads 0 Views 47KB Size Report
Using this model, at each control task instance execution, the ... define self-execution patterns that dynamically balance .... For instance, a simple rule could.
The Self Triggered Task Model for Real-Time Control Systems Manel Velasco, Pau Martí and Josep M. Fuertes Dept. of Automatic Control and Computer Engineering Technical University of Catalonia Pau Gargallo 5, 08028 Barcelona, Spain {manel.velasco , pau.marti, josep.m.fuertes}@.upc.es

I. INTRODUCTION In real-time control systems, the objective of control activities (to control processes) and the objective of scheduling policies (to meet deadlines) are accomplished separately. This may derive in sub-optimal designs in terms of both control performance and resource utilization. On one hand, control activities optimize control performance regardless the computational demands of other tasks. In control design, a discrete-time controller is designed assuming a constant sampling period. In terms of task execution, that means that at run time the controller will execute demanding a constant processing capacity. Therefore, in the design process, it is not usually taken into account the possibility that the controller could take advantage of the processing capacity that may be released by other tasks. That is, the controller design does not allow increasing the execution rate to exploit available resources. On the other hand, scheduling techniques optimize the use of resources regardless the dynamics of the control application. For instance, a periodic control tasks may not require the designed execution rate (processing capacity) if the controlled plant is in equilibrium. When a plant is in equilibrium, the contribution of each control task instance execution can be considered as useless. Its processing capacity could have been used by other tasks with higher processing capacity demands. To overcome these problems, we present a control-based model for control tasks in which computing resources and control performance are jointly considered. The model allows each control task to trigger itself: at each control task instance execution, the executing instance informs the scheduler when the next instance should be executed, thus adjusting at run time its timing constraints. The next instance execution point in time is dynamically obtained as a function of the utilization factor (global parameter) and control performance (local parameter)1. Consequently, we 1

The utilization factor of the system is obtained taken into account all tasks in the system. Therefore, it is a glo bal parameter and affects all tasks. The control performance is obtained by each task from the corresponding controlled plant. Therefore, it is a local parameter and affects each task.

could say that each control task acts as a co-scheduler, helping the scheduler at the scheduling decisions. Figure 1 illustrates the operation of the whole system. Feedback: control performance Scheduler

Plant1 Tasks timing constraints

Abstract- In this paper we present a control-based model for control tasks that allows each control task to trigger itself optimizing computing resources and control performance. Using this model, at each control task instance execution, the executing instance informs the scheduler when the next instance should be executed. The next instance execution point in time is dynamically obtained as a function of the utilization factor and control performance. Preliminary results show that control activities, at run time, are able to define self-execution patterns that dynamically balance optimal levels of control performance and resource utilization.

CPU

Plant2 Control tasks execution

PlantN

Feedback: Utilization factor Figure 1. System operation model

Preliminary results show that control activities, at run time, are able to define self-execution patterns that dynamically balance optimal levels of control performance and resource utilization. The rest of the paper is organized as follows. In section II we discuss the state of the art. The problem formulation is given in section III. In section IV the self-triggered tasks model is developed. Preliminary simulations results are presented in section V. Finally, in section VI we conclude and point to future research work. II. STATE OF THE ART The model we present resembles the model presented in [3]. They propose to use feedback information from the controlled plants to take scheduling decisions. Specifically, all control tasks periods are proportionally enlarged or shorted at a given time instant as a function of the utilization factor. Therefore, they do not allow the exchange of processing capacity if the control application requires higher execution rates of specific tasks , as we do. The later can be achieved using the elastic model of [2 ]. In such model, the elastic coefficient of each task allows the scheduler change the task execution rate within specified ranges. The elastic coefficients are regarded as fixed parameters to be specified before run-time. The model we propose matches the elastic model if the elastic coefficient of each control task could be treated as a dynamic parameter, being a function of the resource utilization and control performance. It should be stressed that the work we present derives from [6]. The authors point out that novel methods for control task scheduling in which scheduling decisions should depend on control performance and resource utilization are needed. Some similarities may be identified between our model and event-based systems. In event-based systems the sampling period takes random values. The sampling period for our model varies, but there exist a slightly difference:

in event-based systems the next execution point in time is unknown; the suggested model in this paper deals with known future periods because they are a result of the model execution. III. PROBLEM FORMULATION For control tasks, the task period is given by the sampling period (hi) that has to balance the desired control performance and the feasible computational demand. The sampling period hi can be selected form a range of values (see [1] for further reading on the sampling period selection). Each possible choice has advantages and disadvantages. In short, a short period allows a quick reaction in front of perturbations (which is positive from a control point of view), but increases the processor’s load (which in negative from a resource utilization point of view). Using long periods decreases the processor’s load but may give poor response in front of perturbations. This demands models that can dynamically accommodate different values for the control task period. The model we present allows control tasks to have varying values for the period. The exact value for the period (at each control task instance execution) is dynamically adjusted depending on the controlled system status and the CPU load. IV. SELF-TRIGGERED TASK MODEL The main idea of the model we present is to use the common models that are used in the analysis and design of control systems. Concretely, we propose to use an extended state-space representation. State-space models allow us to describe the future response of a system, given the present state (characterized by the state variables), the excitation inputs and the equations describing its dynamics (see [1] for further reading on discrete-time state space models). The extension we suggest is to incorporate as new state variables the task period and the utilization factor. Therefore, we will be mixing the control behavior (already represented in the state space model) with the execution rate of the task and the processing demand. In the following subsections, step-by-step, we develop the model.

In equation (1), xk and yk (which are the state variables) represent the position of the ball and the beam angle at the k sampling instant. The first matrix (2x2 dimension), called system matrix, describes the dynamics of the ball and beam. The second matrix (2x1 dimensions), called input coefficient matrix, links the inputs U with the system dynamics. In both matrices, h is the sampling period. U is the available vector of inputs; in our case it is the tension (1x1 dimensions) that we provide to the motor. The input can adopt positive and negative values, allowing the motor of the beam to rotate to both sides. Note that in the state space representation of the ball and beam, at each sampling instant, xk and yk vary according to the system dynamics and the input. However, h, the sampling period, which appears on the matrices as a result of the discretization process, has a constant value that has been chosen at the controller design stage. Recall that (3) is a discrete-time model obtained via discretization of the continuous-time model. Therefore, h has nothing to do with the system state, although it influences its dynamics. Recall that the state of the system can be directly related to control performance. For instance, a simple rule could be the smaller the norm of the state vector, the better the controlled system performance. In terms of the ball and beam: the smaller the deviation of the beam with respect to the horizontal position and the smaller the distance of the ball with respect to the desired location, the better the performance. Therefore, at each task instance execution, the added state variable determines the next task instance execution point in time as a function of control performance. B. First model modification As we stressed in section III, we want a model able to accommodate different values for the sampling period (i.e., the task period). The first extension we propose for the previous model allows us to have varying sampling periods according the controlled system dynamics. To do so, we extend the state representation of the system with a new state variable, the task period, hk, as represented in (2)2. Note that for the system in (2) a new control law giving the appropriate sequence of values for the input U is needed.

A. Basic model Let us think on a closed loop system formed by a ball and beam, which is the plant to be controlled, and a control task that has to be executed on a processor and has to control the ball and beam. The ball and beam system has a motor that balances (by rotating movements) a beam in order to keep the ball (that can rotate freely along the beam) in the desired beam position [1]. The objective of the controller is to actuate on the motor to locate the ball in the desired position. To do so, at each sampling time, the controller takes the value of the position of the ball and the angle of the beam and generates the new angle for the beam that derives in the corresponding actuation on the motor. A linear discrete-time invariant state-space model [1] of the ball and beam is given in (1)  h2   xk +1   1 h  xk     = ⋅  + 2 U  y k+1   0 1  yk   2 ⋅ h  

(1)

 xk +1   1 hk+1 y  = 0 1  k +1    hk +1  α β

 hk +12  0   xk   2    0  ⋅  yk  +  2hk +1  ⋅U    ω   hk   0     

(2)

In (2), at each task instance execution, the task period will be changed according to the state of the system given by xk, yk and the new state variable hk. The dependency of this new variable with the others system variables is given 2

Note that hk+1 (and not hk) appears inside of the system and input matrices. This is due to the solution of the system equations. In the non-extended model, the sampling period of the system and input matrices has no index (k+1 or k) because it is constant (h at the k instant and h at the k+1 instant have the same value). In the present model, since hk is a system variable that varies form instance execution to instance execution, it is necessary to distinguish in the matrices which is the appropriate k index.

by parameters a, ß and ? . Let’s discuss some properties of the extended model, depending on values of a, ß and ? : • If a,ß=0 and ? =1, then, for each k, hk+1 =h k, and the system may be considered as the original given in (1). The control law that will give the sequence of inputs U can be obtained by classical controller design methods. • If a,ß=0 and and 0

Suggest Documents