Rajorshee RAHA,Pallab DASGUPTA,Soumyajit DEY
Department of Computer Science and Engineering,Indian Institute of Technology Kharagpur,India
Abstract With the emerging migration of automotive and other distributed control platforms from federated to integrated architectures,the need for optimal utilization of ECU(electronic control unit)bandwidth will become a key requirement in the implementation of embedded control features.This paper advocates the partitioning of the operating space of the plant and the use of minimal sampling rates in each partition without compromising the overall quality of control.At the heart of the proposed methodology are our algorithms that enable the choice of the partitions and the sampling rate for each partition.We demonstrate the efficacy of our methods on two case studies,namely an anti-lock braking system and a lane departure warning system.We also study the use of a supervisory controller that controls the switching among sampling rates for a combination of the two features.
Keywords:Sampling period,adaptive control,stability,automotive software,embedded control system
Software controlled systems are essentially discrete control systems[1],where the processing of sensor data and execution of the control law are done periodically.In a federated architecture,each control feature executes on a dedicated electronic control unit(ECU),which allows the control engineer to choose a sampling rate that maximizes control performance for the given computational bandwidth of the ECU.
With the increasing number of features in a modern embedded system,federated architectures are becoming increasingly difficult to implement and verify[2,3],moreover the large number of ECUs are adversely affecting the cost of the system.Consequently,integration of multiple control features on shared ECUs are being considered,namely the paradigm is shifting towards integrated architectures.
In order to implement multiple control features on a shared ECU,the sampling rate of each control feature must be chosen in a way that the corresponding tasks can be scheduled and completed within their respective sampling periods.The traditional practice[1]has been to allocate fixed shares of the computational bandwidth to the control features,but more recently this practice has been criticized for sub-optimal utilization of computational resources.Specifically,researchers have shown[4–11]that the overall control performance of the system can be improved if the controllers dynamically adjust their sampling rates(and therefore their shares of ECU bandwidth)in response to various operating conditions and various input disturbances.
Existing literature on multi-rate systems may be broadly divided into two categories.The first line of research has focused on designing multi-rate systems for optimizing the control performance[12–15].The second line of research on multi-rate control systems focus on the computational requirements of embedded control design,that is,the aim is to design a multi-rate system with the optimization of ECU bandwidth as an objective,without compromising the desired quality of control[6,7,16–20].Our work is related to the second and more recent line of research[4–8,10,11],but several things learned from the first line of research form the basis of designing the system with the later objective.Section 2 outlines related work in this context.
Adaptive regulation of sampling rates of control features is recommended by modern automotive standards like AUTOSAR[21],and is also being endorsed in different cyber-physical system applications.While the potential benefits of multi-rate sampling is well appreciated,the design principles for such controllers,specifically with the objective of saving ECU bandwidth,is yet to be standardized.One approach is to design a set of base line controllers to work with as less resources as possible,so that the residual bandwidth can be exploited dynamically to switch one or more base line controllers to higher sampling rates depending on their scope to improve overall control performance of the system.
An important basis for our work is the observation that typically the plant does not need the same degree of attention at all regions of its operating state space.In other words,instead of choosing a sampling rate that is good enough at all states of the system,it is possible to use a multi-rate controller that chooses its sampling rate depending on its present operating zone.There are several important advantages in dividing the operating state space into such zones having different sampling requirements,namely:
?A set of sampling modes can be defined a priori(through an off-line control theoretic analysis).
?At runtime,we only need to check the boundary conditions of the current operating zone to determine whether the controller needs to switch to a different sampling mode.These switchings can be predefined,and table driven.
?When the controller is operating at a mode having lower sampling rate,it frees up bandwidth for other controllers which is useful for various reasons,such as
1)Performing prognosis(health monitoring)tasks.
2)Migrating infotainment tasks.
3)Allowing a less critical control task to enjoy better control performance.
Our initial findings were presented in[17,18],where we had observed the benefit of such multi-rate controllers,however we did not offer a structured algorithmic basis for choosing the sampling modes,which is our main contribution in this paper.This paper examines the problem of choosing the sampling rates for a multi-rate controller which aims to minimize its use of ECU bandwidth without compromising the required control performance.
The choice of the number of sampling rates and the rates themselves is influenced by several factors,like,the scheduling patterns that are supported by the underlying computational platform.The sampling rate has to be married to admissible scheduling patterns.Sometimes control designers are provided with legacy knowledge about the proportions of time the plant is expected to work in various operating zones.This knowledge can be used in making a rational choice of the sampling rates.For example,if a plant is unlikely to spend any significant quantum of time in a specific operating zone,then it does not make sense to use a different controller for that zone thereby increasing the volume of code residing at the ECU.In this paper we present two methods for choosing the sampling rates.
1)The first method enables us to design a Z-rate controller(for a given number Z)with the objective of minimizing the use of ECU bandwidth.
2)The second method examines the incremental benefit of new sampling rates in zones in which the controller spends less time.Thereby this approach trades off the quality of control with gain in savings of ECU bandwidth only when the gain is substantial.
It is important to note that the sampling rate for each zone is always chosen from the set of admissible rates for that zone,that is,those that guarantee the specified control criteria.The paper is organized as follows:In Section 2,we provide a summary of related work.In Section 3,we formalize the problem statement.In Sections 4 and 5,the details of sampling rate selection and overall system synthesis are given respectively.In Section 6 we present results using suitable case studies.
The sampling rate trade-off between different feedback controllers in an embedded system was first formulated as an off-line optimization problem in a seminal paper by Seto et al.[22].A cost function,describing the relationship between the sampling rate and the quality of control,is used to define the performance of each controllers.Assuming that the cost exponentially decreases with the increase in sampling rates for the controllers,they present an algorithm to assign optimal sampling rates to the controllers,subject to a given CPU utilization constraint.
In[4],the authors presented an improved on-line version of[22],and proposed a feedback scheduler mechanism that periodically assigns new sampling periods based on measures from the current plant states and noise intensities.Recent literature also report different on-line techniques for sampling period assignments[19,23–25].
It may be noted that dynamic scheduling also involves significant amount of runtime decision making(in terms of solving optimization problems)which may not be practical in resource constrained embedded platforms.In[6],the authors demonstrate how a controller can choose between a set of sequences of different sampling periods supported by the embedded platform for better resource utilization.In a recent work[8],an off line version of[4],has been presented,which promises lesser memory overhead as compared to[4].In[10],the authors present off-line multi-rate sampling strategies under power-performance trade-off.
Though adaptive regulation of sampling rates is being studied recently under the new goal of saving the use of ECU time,several important lessons can be learned from the experience of researchers who have attempted multi-rate controllers for the traditional goal of improving control performance.We highlight two of these aspects which have influenced our line of research:
1)Existing literature shows that in many control systems,sampling rates can be regulated based on the state of the plant without significantly affecting the quality of control.
2)Implementing a control system that switches between a set of pre-defined controllers(all of which are designed off-line)is practically more feasible than attempting to adaptively calibrate the sampling rates at runtime.
Mathematical models of physical systems are used for control design and analysis.Perfect and exact plant models are rarely available when controllers are being designed.However,available mathematical models reflect most of the inherent properties of the corresponding physical system.The parameter values of the mathematical models can vary and respectively the characteristics of the system may change depending upon any shift in the operating points(see[26,27]).
In some cases the model parameters represent characteristics such as plant operating environment,disturbances acting on the plant,etc.Hence,some of these parameters do not remain constant throughout it is life cycle.Therefore,the control system must be designed in a way that it can operate satisfactorily under variations in plant parameters,that is it must be robust.Formally,we use the term parameter to indicate any independent variable,included in the plant’s mathematical model,that is,
where,x is the dynamic state and p(t)is a random process.The principle focus of this work is on ensembles of linear autonomous systems for which,
Such linear autonomous systems can be given in a vector form as
with the state vector x(t)and the matrix
Furthermore,there can be more than one parameter included in the plant’s mathematical model and such a set of parameters can be given as P={p1,p2,...,pn}.The elements of the matrix A will depend upon the set of parameters P and their valuations.Traditionally,the digital implementation of control tasks are carried out assuming fixed and predefined sampling rates[1].Let a finite set of sampling rates supported by the embedded computing platform be In this paper,we assume that,the following are given:
?The dynamics of the plant(Γ)in the form of state space matrices.
?The control requirements(Ω)in terms of stability and/or other control performance metrics.
?An ordered set of feasible sampling rates,F ={f1,...,fk}.
?A set of n parameters,P={p1,p2,...,pn}and for each parameter,enumerated sets of values,namely p1=
Based on the values of the parameters and other plant variables,the operating states of the plant are partitioned into a set,R,of operating zones.This partitioning may be manually assisted by the control designer,or automated under some specified granularity of the state space.The partitioning of the state space into operating zones is an input to our analysis.
We also define a probability distribution,P∶R→[0,1],that provides for a given operating zone,R,the probability that the controller resides in the zone[27].
Given the above inputs,our goal is to design a multirate controller that switches between the given sampling rates(possibly using a subset of F)depending on the operating zone.For each operating zone,we must design an appropriate controller that uses the minimum of these sampling rates without violating the control requirements.Broadly,the approach is as follows:
1)We create a rate map,M ∶R→ F,that defines for each operating zone r∈R,the minimum sampling rate,M(r)∈F,that guarantees the specified control performance in the operating zone r.
2)We choose the set of sampling rates to be used by the multi-rate controller.This step,which is at the heart of our approach needs to consider several aspects,such as the rate map created in the previous step,and the relative benefits of switching to a lower sampling rate when in an operating zone,r.
3)We synthesize a multi-rate controller and an automaton that controls the switching of the controller between its sampling rates based on the operating zone.The size and complexity of this automaton is one of the aspects that influences the choice of the number of sampling modes.
A brief idea of the steps involved in the rate map creation follows:
?We find for each operating zone,r,a minimum sampling rate,M(r)for the control task that guarantees the desired control requirement.
?We create a task map,T ∶F×R→ C,that defines for each sampling rate f an appropriate controller T(f,r)∈C that guarantees the desired performance in its respective operating zone,r.
The above steps are further illustrated in Section 6.
The trade-off between reducing the number of sampling modes(and therefore the number of states of the switching automaton)and the benefit of adding more sampling modes(in terms of reduction in ECU bandwidth requirement)is very much dependent on the control application.We provide two generic approaches for addressing this issue,namely:
?Approach-A:In this approach,we bound the number of sampling modes by a given constant Z.The goal is then to choose at most Z sampling rates from F for designing the controller.We present an algorithm for choosing these rates.
?Approach-B:In this approach,we consider the relative time spent by the plant in different zones.A zone is merged with the zone having the next higher sampling rate when the relative time spent by the plant in the former is less than a given threshold.This reduces the number of sampling rates needed for the system.
Before we present the details of these approaches,we define a function called residency factor as follows.
Definition 1(Residency factor) The residency factoris a function,RF(r,f),that returns the contribution to ECU time when the controller uses sampling rate f∈F in operating zone r∈R,weighted by the residency of the controller in that operating zone.Suppose η is the worst case execution time(WCET)of the controller running at rate f.Then,
where P(r)is as defined before.
In this approach we selectat most Z sampling rates for our controller,where Z is given.We reduce the problem to the weighted shortest path problem in a graph[28]and use standard algorithms to solve the selection problem.Mapping it to the shortest path problem enables us to use off-the-shelf algorithms for solving the problem,instead of presenting a separate algorithm with analysis of correctness.We first demonstrate the construction of the graph and then prove that the shortest path in the graph yields the optimal subset of sampling rates.We construct a graph,G=(V,E),where
?V={Vi,j,1≤ i≤ k,1≤ j≤ Z}∪{s,t}is the set of vertices.s and t represent the source and target vertex.
?E?V×V is the set of edges defined as follows:
The weights on the edges are defined by the following function:
Fig.1 presents an abstract diagram of the graph in Approach-A,where the value of k is considered as 5 and Z is considered as 3.
Fig.1 Graph abstract example:Approach-A.
Theorem 1If we choose,for each vertex,Vi,j,on the shortest path in G from vertex s to vertex t,the sampling rate fi,then this yields the optimal combination of(at most Z)sampling rates.
ProofAny path in graph G with source node s and destination node t,can be represented as a sequence π ∶〈s,Vi,1,...,Vi,j,...,t〉.Moreover,the total weighted sum of the edges in this path(from s to t in the graph G),basically represents the overall residency factor of the multi-rate system(as per the graph construction).
The shortest path in a graph corresponds to the path having the minimum sum of the edge weights.Therefore,the shortest path from s to t in this graph,G,will correspond to an optimal choice of vertices,which guarantees minimum overall residency factor of the multirate system.
Our goal of finding an optimal combination of(at most Z)sampling rates,can be achieved if one can guarantee minimum overall residency factor of the multi-rate system.Therefore,finding the shortest path in this case helps us to achieve our goal and therefore provides the optimal combination of(at most Z)sampling rates. □
The choice of sampling modes with lower sampling rates are not really useful unless the controller spends a reasonable amount of time in such modes.Let Pmindenote the minimum probability,the multi-rate system should reside in an operating zone r∈R,corresponding to a choice of sampling rate f∈F.In this approach we select an optimal set of sampling rates for our controller and Pminis given.We reduce this problem also to the weighted shortest path problem in a graph and use standard algorithms to solve the selection problem.Hence,we first demonstrate the construction of the graph and then prove that the shortest path in the graph yields the optimal set of sampling rates.we construct a directed graph,G=(V,E),where
?V={Vi,1≤ i≤ k}∪{V0}is the set of vertices.V0represents the source vertex.
?E?V×V is the set of edges defined as follows:
The weights on the edges are defined by the following function:
Fig.2 presents an abstract diagram of the graph in Approach-B,where the value of k is considered as 4 and Pminis considered as 0.
Fig.2 Graph abstract example:Approach-B.
Theorem 2If we choose,for each vertex,Vi,on the shortest path in G from vertex V0to vertex Vk,the sampling rate fi,then this yields the optimal combination of sampling rates.
ProofAny path in graph G with source node V0and destination node Vk,can be represented as a sequence π ∶〈V0,V1,...,Vk〉.Moreover,the total weighted sum of the edges in this path(from V0to Vkin the graph G),basically represents the overall residency factor of the multi-rate system(as per the graph construction).
The shortest path in a graph corresponds to the path having the minimum sum of the edge weights.Therefore,the shortest path from V0to Vkin this graph,G,will correspond to an optimal choice of vertices,which guarantees minimum overall residency factor of the multirate system.
Our goal of finding an optimal combination of sampling rates,can be achieved if one can guarantee minimum overall residency factor of the multi-rate system.Therefore,finding the shortest path in this case helps us to achieve our goal and therefore provides the optimal combination of sampling rates. □
The two approaches presented in this section were designed from two different perspectives as outlined below:
1)Approach-A designs a Z-rate controller for a given Z with the sole objective of minimizing the use of ECU bandwidth.
2)Approach-B designs a control system which minimizes the use of ECU bandwidth subject to the constraint that every mode has a specified relative residency lower bound.
Before we embark on a comparison of these two approaches,we define the recommended control design methodology using each of these approaches.Let m denote the number of distinct sampling rates used in the rate map,which may be less than k,the number of feasible sampling rates.
1)Methodology using Approach-A:We start with Z=1,which is the single rate controller.We then progressively increase Z,choose the sampling rates using Approach-A,and evaluate the savings in ECUb and width.Typically the incremental benefit in ECU bandwidth becomes marginal after some time,and the designer may choose to not increase Z any further.In any case,Z will never exceed m.
2)Methodology using Approach-B:If we run Approach-B without any residency lower bound(that is,with Pmin=0),we will obtain a m-rate controller.Thereafter as we progressively increase Pmin,Approach-B will create systems with fewer sampling rates with corresponding increase in ECU bandwidth.Typically the increase will be marginal at the beginning and will become more significant as the number of rates decrease.The designer may choose to not increase Pminany further when it results in significant increase in ECU bandwidth.
We have illustrated these patterns later through our experimental results.In the extreme cases,both approaches yield the same controller,namely the m-rate controller at one end and the single rate controller at the other end.Interestingly the intermediate controllers for the two approaches are not necessarily identical,and further study provides some relevant insights.
In both approaches,the m-rate controller uses the minimum ECU bandwidth.However in practice other factors influence the design of the control system.For example,
?A m-rate controller will need to store the code of all m controllers in the ECU memory,which may be a problem for controllers having significant code bases.
?The complexity of the supervisory controller increases with the increase in the number of controllers.
?All though the rate map prescribes only sampling rates for which stable controllers satisfying the desired specifications exist,the quality of control may have marginal differences.
The first two of these factors are very application specific and are therefore leftto the domain expert.We have interesting observations regarding the third factor.
When we compared controllers having the same number of rates designed with Approach-A and Approach-B,we found that the ones designed using Approach-A are marginally superior in terms of ECU bandwidth,and the ones designed using Approach-B are marginally superior in terms of control performance.This is because of the following facts:
?For a given Z,the Z-rate controller developed using Approach-A is optimal in terms of ECU bandwidth(by virtue of Theorem 1).Since the residency constraint used in Approach-B merges some of the zones with low residency with zones having higher sampling rates,the use of ECU bandwidth in Approach-B can be more than that of Approach-A(but never can it be less).
?The excess bandwidth used by Approach-B as compared to Approach-A essentially improves control performance in zones which are merged with zones of higher sampling rate.
We believe that both approaches are useful from a design perspective,depending on whether the designer targets the number of modes or the minimum residency requirement in a mode.These choice is important when the designer attempts to fit in multiple control loops in a shared ECU,but the preference may vary from case to case.
A block diagram representation of the overall system is shown in Fig.3.We synthesize a multi-rate controller and a supervisory scheduler,which executes with a sampling rate fsswith an objective to monitor the system’s operating space and depending on which it supervises the multi-rate controller to switch between multiple sampling rates.
Using the methodology elaborated in Section 4,we can select the optimal set of sampling rates,Fop(?F),for the multi-rate system asper the design requirements.After that,we synthesize appropriate discrete-time controllers for the multi-rate system.For this purpose we use the task map(Section 3)to select appropriate controllers for our respective multi-rate system.
These multi-rate systems are a subclass of switched systems and it is well known from switched control theory[29]that,fast switching between stabilizing controllers can lead to an unstable closed-loop system.However,in our case,such scenarios will not occur because of the fact that,fy?fss.Here fyrepresents different sampling rates of the multi-rate controller and fssrepresents the sampling rate of the supervisory scheduler.
Furthermore,by introducing appropriate hysteresis in the conditions for switching back and forth between any two modes,we can(by design)avoid the possibility of frequent switching between the sampling modes due to faulty sensor reading.This is explained as follows.Consider two operating zones r1and r2such that f1=M(r1)and f2=M(r2)and f1<f2.When the system trajectory moves across zones we do not immediately change sampling rate in all cases.When the system moves from r1to r2,the sampling rate is changed from f1to f2(along with change of corresponding controllers)immediately since the zone r2requires a higher sampling rate.However,when the system moves to zone r1from r2we do not immediately switch to the lower sampling rate f1.Instead we delay the switching so that the average dwell-time for the switched system is long enough for ensuring stability.Thus,by introducing hysteresis in the switching criteria,we ensure stability of the overall system.
Fig.3 Overall system.
We present two detailed case studies using anti-lock braking system(ABS)and lane departure warning system(LDWS)in Sections 6.1 and 6.2,respectively.The experiments were performed using MATLAB.
ABS is an automobile safety-critical driver assistance system which prevents the wheels from locking and avoids uncontrolled skidding[30,31].For designing the mathematical model,we used a simplified quarter car model and the corresponding equations are given as[32]Here,m is the mass of the quarter vehicle,Vxis the lateral velocity,vais the angular speed of the wheel,FNis the vehicle vertical force,Fxis the frictional force transmitted to the road,Mbis the braking torque,ω is the wheel radius,J is the wheel inertia and λ is the wheel slip.The effective braking force is dependent on the frictional force[31]transmitted to the road which is related to FNas Fx= ?μFN,where μ is the frictional coefficient of the road surface.Relationship between the wheel slip and the frictional coefficient(μ =f(λ))can be approximated using a piecewise linear function[31,32]given as
where α ∈ [0,8]and β ∈ [?0.1,0.1].The relationship between frictional coefficient,μ and slip,λ is shown graphically in Fig.4.
Fig.4 μ ? λ curve[31].
Furthermore,using Taylor series expansion method(see[32,33])for linearizing a nonlinear system,we can obtain a linear(affine)system description from as
where Al,Bl,Cland Dlare the system input and output matrices respectively.Elare the affine terms and
The state matrices corresponding to two different linear regions(1∶λ≤0.2;2∶λ>0.2)are given as
6.1.1 Creating the rate map
For this example,we consider the set of sampling periods as{1,0.90,0.80,0.70,0.60,0.50,0.40,0.30,0.20,0.10}ms(sampling rate=1/sampling period).Here,we consider two parameters,velocity(Vx)and slip(λ).We create a set R of operating zones for the system by partitioning the entire state space with a grid defined using the following enumerated sets,p1={0,1,2,...,299,300}(values of Vx)and p2={0,0.1,0.2,...,0.9,1}(values ofλ).Elements from p1×p2define the corner points of each grid element r∈R.The set of such corner points is given by X={X1,...,X|p1×p2|}.Each grid element r is thus an operating zone for the system as defined previously.For synthesizing the corresponding discrete-time controllers for each zone r∈R,we have used standard PID controller[1]design techniques.We consider stability as our control requirement(Ω).For a zone r,we initialize the system matrices with the corner point parameters and create the system representations at the corner points.In this example,each zone has four corner points.Thus,for a zone r,we shall create four different system representations.We choose the minimum sampling rate f=M(r)such that a suitable f-rate controller can be synthesized that delivers a stable controller for each corner point and we consider that controller to be used when the operating point resides any where in zone r.We also check whether the controller thus derived satisfies a given “settling time”performance criteria.Otherwise,we perform further PID-tuning and improve performance.If no further performance improvement is possible and the settling time criteria is not satisfied,we simply jump to the next higher available sampling rate and repeat the control design process as delineated above.In this way,we construct the rate map and the task map for the system and subsequently apply our multi-mode control design algorithms.
Statistically,smoothed data sets for vehicular traffic are available for driving patterns comprising multiple possible road conditions[34].Such data sets provide the designer with vehicle parameter values as observed at different time points.In Fig.5,we highlight one such traffic data set.Given such legacy data over some observation window,T,we compute the probability of the plant operating inside different zones r∈R given by P∶R→[0,1].
Fig.5 Traffic data pattern[17,34].
6.1.2 Selecting the sampling rates
We elaborate how the sampling rates for the multirate systems are selected.Initially we construct the respective graphs following the steps of our proposed approaches,as discussed in Section 4.Once,the respective graphs are constructed,we use standard Dijkstra’s algorithm[28]to find the shortest path in the constructed graph and there after find the optimalset of sampling rates.We have used standard MATLAB functions and procedure to solve the above shortest path problem.Given the number of sampling modes of a system(Approach-A)or the minimum probability that the system should reside in any operating zone(Approach-B),our proposed approaches select the optimal set of sampling rates(highlighted in Tables1&2,respectively).We calculate the percentage of saved ECU time,achieved using multi-rate sampling strategy with respect to fixed sampling strategy.We considered that the periodicity of fixed sampling strategy is 0.10 ms.
Table 1 Multi-rate systems synthesized using Approach-A.
Table 2 Multi-rate systems synthesized using Approach-B.
The results presented in Fig.6 highlight that,with different choice of multi-rate systems,we can achieve significant amount of ECU time saving.
Fig.6 Saved ECU time achieved with multi-rate system synthesized using Approach-A and Approach-B.
We further consider two similar multi-rate systems synthesized by Approach-A and Approach-B and compare their performance in terms of percentage of saved ECU time and overall control performance.For Approach-A,we consider the case,Z3=4 and take the corresponding multi-rate systems〈0.70,0.30,0.20,0.10〉as shown in Table 1.Similarly,for Approach-B,we consider the case,P5=0.25 and take the corresponding multi-rate systems 〈0.50,0.30,0.20,0.10〉as shown in Table 2.
From Fig.6,it may be observed that the multi-rate system(synthesized using Approach-A)can guarantee around 56.095%savings in the ECU time compared to the traditional fixed sampling case,whereas the respective multi-rate system(synthesized using Approach-B)can guarantee around 55%savings in the ECU time com-pared to the traditional fixed sampling case.
From traditional control theory it is a well established fact that higher the sampling rate of the controller,better is the control performance[1,22].In this paper,to measure the control performance in different sampling modes,we initially record the closed loop system performance for different choice of sampling rates(fi∈F).For each sampling rate fi,we synthesize suitable PID controller and compute a suitable performance index ciof the resulting closed loop in each case.As a measure of performance,we use the root mean square(RMS)[35,36]of the difference between the desired output and actual output over multiple simulation cycles in which 10 step signals(of amplitude 1–100 units)were injected into the system.The RMS values computed over all the step responses is averaged and recorded as the control cost ci.Naturally,faster the sampling rate lesser is the error value(i.e.,lesser RMS value),and better is the control performance(smaller values of ci).For a given multi-rate controller(m-mode)generated by Approach A/B,with sampling rates{f1,...,fm},the overall control performance index is given by the weighted sum,
The findings are highlighted in Fig.7.In this case,the multi-rate system synthesized with Approach-Bachieves better overall control performance(nearly 7.21%)compared to the one synthesized using Approach-A.
Fig.7 Overall performance achieved with multi-rate system synthesized using Approach-A and Approach-B(lower the control performance index,better the overall control performance).
6.1.3 Comparative study:performance
We present a comparative study between multi-rate and fixed sampling strategy,in terms of performance.We consider stopping distance as the performance criteria for this ABS example and consider a test case braking scenario(initial and final velocity:200 km/h&0 km/h)in different road conditions.For the multi-rate setting,the periodicity of the supervisory scheduler is taken as 100 ms and the periodicity of the fixed sampling strategy is assumed as 0.10 ms.
?Multi-rate controller synthesized using Approach-A:Here,we consider a multi-rate system having 3 sampling modes.As per Table 1 the sampling modes M0,M1,M2of multi-rate system are given as〈0.30 ms,0.20 ms,0.10 ms〉,respectively.The abstract model of multi-rate controller is highlighted in Fig.8.The performance results are highlighted in Fig.9.The performance results in terms of stopping distance show that the multi-rate strategy achieves satisfactory level of performance compared to the fixed sampling strategy.
Fig.8 Synthesized multi-rate system(Approach-A).
Fig.9 Performance comparison(stopping distance)–achieved using multi-rate system synthesized using Approach-A.
It may be noted that in our implementation scheme the overall stability of the control system is guaranteed by allowing sufficient dwell time by virtue of using hysteresis in the switching criteria.For example,in Fig.8,the control switches from the low sampling mode,M0,to the higher sampling mode,M1,when velocity exceeds 108 km/hr,but the transition from M1to M0is taken only when the velocity falls below 98 km/hr.The quantum of time needed for the automobile to slow down from 108 km/hr to 98 km/hr allows sufficient average dwell time to guarantee the stability of the switching between these two modes.In simple terms,switching from a region requiring less attention to one requiring higher attention is immediate for the controller,but the reverse is not immediate.The advantage of using the switched control scheme as generated by Approach-A is provided next in terms of ECU bandwidth saving.
We further show the performance results in terms of“Slip”as shown in Figs.10–13 for dry road condition.
The left most diagrams in Figs.10–13 represent the results corresponding to “Fixed Sampling Rate”and the right most diagrams represent the results corresponding to the “Multi-rate Sampling”.The top two diagrams of Figs.10–13 show that how the vehicle speed and wheel speed change in our test case braking scenario.Furthermore,the bottom two diagrams of Figs.10–13 show the corresponding slip ratio.First,in Fig.10,we highlight braking scenario where brake is being applied when the car is being driven at some speed around 200 km/h(Case 1).In this case the multi-rate sampling strategy uses a controller with periodicity 0.10 ms(as the multi-rate system operates in sampling mode M2)(see Fig.8).
Fig.10 Performance comparison(slip)–Case 1.
Next,in Fig.11 we highlight the braking scenario when the car is being driven at some speed around 120 km/h(Case 2).In this case,the multi-rate system uses a controller with periodicity 0.20 ms as it operates in sampling mode M1,as shown in Fig.8.
We further highlight two braking scenarios in Fig.12 and Fig.13,where brake is being applied when the car is being driven at some speed around 80 km/h(Case 3)and 70 km/h(Case 4)respectively.In this case,the multirate system uses a controller with periodicity 0.30 ms as it operates in sampling mode M0,as shown in Fig.8.In all these cases,the fixed sampling strategy uses a controller with periodicity 0.10 ms.The results highlight that the slip ratio for Fixed and Multi-rate is almost same in all the cases.
Fig.11 Performance comparison(slip)–Case 2.
Fig.12 Performance comparison(slip)–Case 3.
Fig.13 Performance comparison(slip)–Case 4.
Furthermore,Table 3 presents the comparison of the setting time(considering desired settling time less than equals to 6 s).
In our experiments,similar slip ratio results were observed for gravel,loose gravel and wet road conditions.The overall results highlight benefit of using multi-rate strategy over fixed sampling strategy as it promises satisfactory level of performance(in terms of stopping distance and slip)while promising bandwidth savings.
?Multi-rate controller synthesized using Approach-B:Here,we consider a multi-rate system with sampling modes〈0.70 ms,0.40 ms,0.30 ms,0.20 ms,0.10 ms〉.(see Table 2,Pmin=0.15).The corresponding abstract multi-rate controller is highlighted in Fig.14.
Fig.14 Synthesized multi-rate system(Approach-B).
The performance results are highlighted in Fig.15.It may be observed from Figs.8 and 14 that some amount of hysteresis has been introduced in the switching guards to as mentioned in Section 5.The results highlight the usefulness of multi-rate controllers over fixed sampling strategy.In this example also,we studied the performance results in terms of“Slip”for both sampling strategies and similar results(as shown in Figs.10–13)were observed for different road conditions.
Fig.15 Performance comparison(stopping distance)–synthesized using Approach-B.
LDWS is a system that monitors the vehicle’s position with respect to the lane and provides warning,whenever the vehicle is about to leave the lane[30,31].We consider the simplified bicycle model and the corresponding mathematical equations are given as(see[30]):
We can obtain a linear system description from above equations as
where¨y is lateral acceleration,ψ is yaw rate,vxis longitudinal velocity,Cαf,Cαrare front and rear tire cornering stiffness,αf,αrare front and rear tire slip angle,δfis front steering angle,Izis the moment balance,θvf,θvrare front and rear wheel velocity angle,Lf,Lrare distance from center of gravity to rear and front axel,L is vehicle length(Lf+Lr).
6.2.1 Creating the rate map
For this example,we consider the set of sampling periods as{90,80,70,60,50,40,30,20,10}ms(sampling rate=1/sampling period).Following similar approach as elaborated in Section 6.1.1,we consider one parameter namely,longitudinal velocity(vx)and create a set R of operating zones for the system by partitioning the entire state space with a grid defined using the following enumerated set,p1={1,2,...,109,110}(values of vx).Therefore,we create the rate map,task map and the probability distribution(P∶R→[0,1]).
6.2.2 Selecting the sampling rates
We follow similar steps as previously discussed in Section 6.1.2 and the sampling rates of different multi-rate systems synthesized using Approach-A and Approach-B are as shown in Tables 4 and 5.Furthermore,following similar steps as previously discussed in Section 6.1.2,we highlight the benefit of using the multi-rate strategy(Fig.16).
Table 4 Multi-rate systems synthesized using Approach-A.
Table 5 Multi-rate systems synthesized using Approach-B.
We further consider two similar multi-rate systems synthesized by Approach-A and Approach-B and compare their performance in terms of percentage of saved ECU time and overall control performance.For Approach-A,we consider the multi-rate system with the following sampling modes〈40,20,10〉and for Approach-B,we consider the multi-rate system with the following sampling modes 〈50,20,10〉.
Fig.16 Saved ECU time achieved with multi-rate system synthesized using Approach-A and Approach-B.
From Fig.16,it may be noted that the multi-rate system synthesized using Approach-A can guarantee around 61.24%savings in the ECU time compared to the traditional fixed sampling case,whereas the respective multi-rate system synthesized using Approach-B can guarantee around 60%savings in the ECU time compared to the traditional fixed sampling case.Similar to our previous example,in this case also we computed the overall system performance and the findings are highlighted in Fig.17.
Fig.17 Overall performance achieved with multi-rate system synthesized using Approach-A and Approach-B(lower the control performance index,better the overall control performance).
In this case the multi-rate system synthesized with Approach-B achieves better overall control performance(nearly 8.5%)compared to the one synthesized using Approach-A.
6.2.3 Comparative study:performance
To analyze performance,we consider driving scenarios(with a speed range of 10-110 m/s),which considers scenarios like roads with less or more number of lane change events(u-turn,left/right turns,overtake,unintended lane change,etc.).We considered LDWS warning issue time(calculated using settling time[6])as the performance criteria for this example.For the multi-rate setting,the periodicity of the supervisory scheduler is considered as 1000 ms and the periodicity of the fixed sampling strategy is assumed as 10 ms.
?Multi-rate controller synthesized using Approach-A:Here,we considera multi-rate system having 3 sampling modes.As per the findings,the sampling modes of the respective multi-rate system are given as〈40 ms,20 ms,10 ms〉.The abstract model of multi-rate controller is highlighted in Fig.18.
Fig.18 Multi-rate system(Approach-A).
The performance results are highlighted in terms of warning issue time.In this case the LDWS model with multi-rate controller synthesized with Approach-A achieves a warning issue time of 3.0710 s,and the fixed periodic controller promises a warning issue time of 2.4390 s.
?Multi-rate controller synthesized using Approach-B:Here,we consider a multi-rate system with sampling modes 〈60 ms,40 ms,20 ms,10 ms〉.The corresponding abstract multi-rate controller is highlighted in Fig.19.
Fig.19 Multi-rate system(Approach-B).
The performance results are highlighted in terms of warning issue time.In this case the LDWS model with multi-rate controller synthesized with Approach-B achieves a warning issue time of 3.1931 s,and the fixed periodic controller promises a warning issue time of 2.4390 s.The results highlight benefit of using multi-rate strategy overfixed sampling strategy as it promises satisfactory level of performance while promising bandwidth savings.
We highlight the benefit of such methodologies using an example,which shows how such methodologies can help to schedule two different control tasks on a single ECU.We consider a scenario,where the controllers of ABS and LDWS are mapped on a single ECU.
For,demonstration purpose,we consider that ABS and LDWS uses multi-rate controllers with sampling modes 〈0.30 ms,0.20 ms,0.10 ms〉(Fig.8)and 〈40 ms,20 ms,10 ms〉(Fig.18),respectively.To map these controllers together in a single ECU,we need to check,which sampling rate combinations are schedulable,which is possible(as per Earliest deadline first(EDF)algorithm[4,8,37])if,
where,ρ=0.55,which is assumed considering the fact that other sensing tasks will also be running on the ECU apart from these two control tasks.We assume the values of ηi(WCET)for the two control tasks to be 0.4 ms and 4 ms,respectively.
Considering practical driving scenarios,different modes of operation for the control tasks for ABS and LDWS is categorized as normal,semi-critical and critical,and different schedule able combination of operating modes of the control tasks(ABS,LDWS)are presented in Table 6.
Table 6 Sampling mode combinations v/s schedulability.
We outline different modes(Table 7)of a supervisory scheduler,which will supervise the mode changes of the ABS and LDWS together based on some rule sets.Next,we outline the rule set prescription for the supervisory scheduler as shown in Table 8.We assumed that the system have the required sensors and mechanism to inform the supervisory scheduler about driving scenarios such as,turning,cruising and overtaking.
Table 7 Supervisory scheduler:operating modes.
Table 8 Supervisory scheduler:rule set prescription.
Multi-rate controllers have been studied in control theory with the primary goal of optimizing control performance.This paper presents methodologies for choosing rates for control loop executions with the aim of optimizing ECU time,by leveraging the fact that the rate at which the plant needs attention varies with the operating region.We believe that the results presented in this paper provide insights on the benefits of using a switched controller which regulates its periodicity in response to the operating region,as opposed to one that uses a uniform rate.
Control Theory and Technology2018年3期