Presentation is loading. Please wait.

Presentation is loading. Please wait.

Period Optimization for Hard Real-time Distributed Automotive Systems

Similar presentations


Presentation on theme: "Period Optimization for Hard Real-time Distributed Automotive Systems"— Presentation transcript:

1 Period Optimization for Hard Real-time Distributed Automotive Systems
Abhijit Davare1, Qi Zhu1, Marco Di Natale2, Claudio Pinello3, Sri Kanajan2, Alberto Sangiovanni-Vincentelli1 1 EECS, UC Berkeley 2 General Motors Research 3 Cadence Research Labs

2 Motivation: Active Safety Applications
[Source: G. Leen, D. Heffernan, “Expanding Automotive Electronic Systems”, IEEE Computer, 35(1), 1/02, pg ]

3 Design Flow Allocation Priorities Mapping Periods Implementation
Application Architecture IR Sensor Wheel Fusion Task Object ID Task Brake Actuator Throttle Nav. 150 ms 225 ms (Messages) ECU1 ECU2 ECU3 ECU4 CAN1 CAN2 Allocation Priorities Periods Mapping Implementation

4 Contributions In industry today, all stages in mapping are typically carried out manually Capture the period assignment problem with mathematical programming Flexibility to add additional constraints for system-specific situations Construct an approximation to efficiently solve the problem Iterative approach to reduce approx. error

5 System Model Tasks allocated to ECUs Messages allocated to buses
ECU Message 1 2 Bus Tasks allocated to ECUs Preemptive execution Scheduling: static priorities Messages allocated to buses Non-preemptive transmission Periodic task/message activation No synchronization between ECUs/buses Communication Read latest data value from buffer Overwrite old data values Task Message 1-place Buffer

6 Problem Inputs System: Directed Graph ECU1 CAN1 ECU2 ECU3 T1 M1 T2 M2
Nodes are objects (EITHER tasks or messages) Edges are communication links (1-place buffers) Resource assignment Worst case processing time (not shown) Priority Utilization bounds End-to-End latency constraints ECU1 CAN1 ECU2 ECU3 100 ms 280 ms T1 M1 T2 M2 T3 2 1 3 4 5 T5 M3 T4 [0.7] [0.6] [0.8] [0.5] T6 M4 T7 M5 T8

7 Assign activation periods for all tasks and messages
Problem Statement Assign activation periods for all tasks and messages such that: 1. Set of objects must be schedulable 2. Stay within utilization bounds 3. Satisfy end-to-end latency constraints

8 1. Object Schedulability
Ensure that all objects are processed before their subsequent activations oi Period (ti) Response Time (ri) Interference from other objects on the same resource

9 2. Utilization Bounds Resource utilization
Fraction of time the resource (either ECU or bus) spends processing its objects (either tasks or messages) Utilization bounds less than 100% To allow for future extensibility Intuition: Larger periods  lower utilization

10 3. End-to-End Latency For each object in the path, add
End-to-End Latency t1 r1 o1 t2 r2 o2 t3 r3 o3 For each object in the path, add Period (ti) Worst case response time (ri)

11 Worst Case Response Times
Pre-emption (pi) Blocking (bi) + Pre-emption (pi) Response time (ri) = Processing time (ci) + Interference time (wi) Tasks Messages

12 Periods and Response Times
Tasks: Messages: Intuition: decreasing the period of an object Decreases its own contribution to path latency Increases the response times of lower priority objects on the same resource

13 Approach: Mathematical Programming
What? Problem represented with: Set of decision variables Constraints Objective function Why? Modifying an object period affects: Schedulability of the object Utilization of the resource Latencies of other paths passing through same resource Additional constraints due to legacy tasks and messages Challenge: Capture the problem and obtain efficient runtimes

14 Geometric Programming
Standard Form: x = (x1, x2, …, xn) are positive g is a set of monomial functions f is a set of posynomial functions Sum of monomials Variables: Integer & real-valued  Intractable Real-valued  Efficiently solvable (convex programming)

15 Approximation Rationale Approximate the ceiling function
Exact formulation needs integer variables (ceiling function) MIGP gives no solution even after 6 hours for case study Approximate the ceiling function Constant parameter: 0 ≤ αi ≤ 1 Approximated worst case response time: si

16 Approximation Example
Task Priority c t T1 1 3 t1 T2 2 8 T3 20 Impact on r3 as t1 changes Lower bound:  = 0 Upper bound:  = 1 If all αi = 1, si ≥ ri r3 t1

17 Geometric Programming Formulation
Sets Paths: Objects: Resources: Parameters Computation time: c Variables Periods: t Approx. response times: s = Minimize the sum of approx. response times Meet end-to-end latency deadlines Transformed equations for approx. response times Ensure schedulability Meet utilization bounds Lower and upper bounds for periods

18 Iterative Procedure to Reduce Error
Iteratively change αi Parameters maxIt – max. # iterations errLim – max. permissible relative error between r and s Start all αi = 1; ItCount = 0; ItCount++; (s, t) = GP(α); Calculate r; ei = (si – ri)/ri; αi = αi - ei No  = 1 max(|ei|) < errLim OR ItCount > maxIt End Yes  = 0.6 (GP) t s r (Fixpoint)

19 Case Study: GM Experimental Vehicle
Functionality 92 tasks 196 messages Architecture 38 ECUs 4 buses . - End-to-end latency constraints 12 source-sink task pairs 222 total paths Deadlines range from 100ms to 300ms

20 Experiments: Manual vs. Period Opt.
GP feasible with all α = 1 in 1st iteration Solution time: 24s

21 Experiments: Iterative Procedure
Max. error reduced from 58% to 0.56% in 15 iterations Avg. error (not shown) reduced from 6.98% to 0.009%

22 Conclusions Problem Approach Results for industrial case studies
Period assignment for the design of distributed automotive applications Approach Flexible: Approximate period assignment with GP Effective: Iterate to reduce approximation error Results for industrial case studies Experimental vehicle: 0.56% max. error after 6 minutes Fault tolerant vehicle: 45% reduction in average path latency

23 Questions?


Download ppt "Period Optimization for Hard Real-time Distributed Automotive Systems"

Similar presentations


Ads by Google