course web site
play

Course web site Course homepage - PDF document

9/29/2020 Course web site Course homepage http://retis.sssup.it/~giorgio/rts-MECS.html Giorgio Buttazzo E-mail: buttazzo@sssup.it Scuola Superiore SantAnna 2 Lectures About programming Monday Tuesday Wednesday Thursday Friday


  1. 9/29/2020 Course web site Course homepage http://retis.sssup.it/~giorgio/rts-MECS.html Giorgio Buttazzo E-mail: buttazzo@sssup.it Scuola Superiore Sant’Anna 2 Lectures About programming Monday Tuesday Wednesday Thursday Friday “Millions jobs will be lost in the coming decades due 8:30 to AI. Coding skill is one that looks futureproof” - The Guardian 9:30 10:30 11:30 optional 12:30 Nei prossimi decenni, l’Intelligenza Artificiale farà REGULAR perdere milioni di posti di lavoro, ma l’abilità di 14:00 RTS 14:30 RTS RTS RTS programmare è una delle poche attività a prova di 15:00 futuro. 15:30 RTS RTS 16:00 16:30 17:00 RTS RTS 17:30 18:00 3 Real-Time Systems Embedded Systems Real-Time Systems are computing systems Real-time systems are typically embedded in a larger system to  control its functions; that must perform computations within given timing constraints.  manage the available resources;  simplify the interaction with the user. Hence, they must provide bounded response times to Hence, they must provide bounded response times to tasks with bounded execution, in all possible scenarios. tasks with bounded execution, in all possible scenarios. Real-Time Embedded Systems  possible event arrivals Smart Object actuators They must be able to bound They must be able to bound Computing R i Environment inter-task interference inter-task interference System sensors R i Response Time Bound communication user other units R i 1

  2. 9/29/2020 Computers everywhere Evolution of Embedded Systems Embedded computing systems have grown Today, 98% of all processors in the planet are exponentially in several application domains: embedded in other objects: Number of embedded consumer electronics computers multimedia automotive robotics avionics 0 year 2010 1970 1980 1990 2000 Typical applications Art & Entertainment  avionics  automotive  robotics  industrial automation Virtual reality Game simulators  telecommunications  multimedia systems  consumer electronics Animation Smart toys Health Care Other applications  Tele-monitoring intelligent transport systems  Tele-rehabilitation  Assisted Living  Sport agriculture civil protection Smart buildings 2

  3. 9/29/2020 Smart objects Smart objects The number of such objects will increase in the future: Electronic key GPS Localizer Smart Tire Smart Shoe Step counter Smart cork Recording pen Cardio pulse meter Watch computer Smart glasses Inside body From Hardware to Software We are experiencing a dematerialization process in Computers will be embedded even in our body: which many functions are converted into software. Examples heart ear eye brain – Money – Documents – Books – Music – Pictures – Movies – Tickets – Education The replication process Why? I ndustria There are many advantages dematerialization materialization 1. Software is more flexible than hardware 2. It can be quickly changed/adapted/updated If information is preserved 3. It can be upgraded remotely at each step, the final copy is functionally equivalent to 4. It can evolve into intelligent control algorithms the original 5. It has no mass, so it can travel at the speed of light transmission 6. It enables an efficient replication process encoding decoding 3

  4. 9/29/2020 Increasing complexity Increasing complexity # functions The price to be paid is a higher software complexity . in a cell phone Related problems 200  Difficult design 80  Less predictability 60  Less reliability 40 Novel solutions for:  Component-based software design 20  Analysis for guaranteeing predictability and safety 0 year  Testing 2010 1970 1980 1990 2000 ECU growth in a car Software evolution in a car # Lines of source code # ECUs in a car 10 10 in a car 100 10 9 10 8 80 10 7 60 10 6 10 5 40 10 4 20 10 3 10 2 0 year 2010 1970 1980 1990 2000 1980 1990 2000 2010 2020 Steer by Wire Steer by Wire Advantages 1. Placing the steering wheel in any position 2. Record the driving style of the driver Control Unit Sensor 3. Develop self-parking functions Motor Motor Sensor 4. Autonomous driving 4

  5. 9/29/2020 Software in a car Heterogeneous networks Distributed architecture Driver Steering Environment sensors feedback wheel (e.g. cameras) actuators sensors ECU Assistance System Steering ECU ECU actuators Data Bus Wheel angle sensors Main Redundant ECU ECU Software in a car Comparing Software Complexity Car software controls almost everything: Lines of code 100 M 100 M  Engine: ignition, fuel pressure, water temperature, 30 M valve control, gear control, 10 M 10 M  Dashboard: engine status, message display, alarms 2 M  Diagnostic: failure signaling and prediction 1 M  Safety: ABS, ESC, EAL, CBC, TCS  Assistance: power steering, navigation, sleep sensors, 100 K 50 K parking, night vision, collision detection  Comfort: fan control, heating, air conditioning, music, active light control, noise control & cancellation, regulations: steer/lights/sits/mirrors/glasses… Complexity and bugs Software reliability Software bugs increase with complexity: When aircraft control depends on a program with 100 million instructions, reliability is a primary objective. bugs 10.000 10 8 instructions 1000 100 10 Lines of code 0 10 M 1 K 10K 100 K 1 M 5

  6. 9/29/2020 Real-Time Systems Software reliability Reliability does not only depend on the correctness of single instructions, but also on when they are Computing systems that must guarantee executed: bounded and predictable response times input are called real-time systems . controller t  Predictability of response times must be guaranteed output  for each critical activity; t +   for all possible combination of events. A correct action executed too late can be useless or even dangerous. Predictability vs. Efficiency What’s special in Embedded Systems? QoS management High performance Safety critical FEATURES REQUIREMENTS Scarce resources (space, weight, High efficiency in resource predictability efficiency time, memory, energy) management Temporal isolation to limit High concurrency and resource the interference sharing (high task interference) High predictability in the Interaction with the environment response time (causing timing constraints) Allocated resources Adaptivity to handle High variability on workload and digital tv soft firm hard overload situations resource demand Criticality Aim of the Course Main focus: predictable software Sensory  Studying software methodologies for supporting processing time critical computing systems. Design Design Control  We will not consider how to control a system, software Analysis Analysis but only how to provide a predictable software Programming Programming Commun. support to control applications. Graphics system dynamics Embedded Computer Controlled System 6

  7. 9/29/2020 Control and implementation Control and implementation Often, control and implementation are done by In reality, a computer: different people that do not talk to each other:  has limited resources;    if (b != 0) y = a/b; x Ax Bu else printf("error\n");  finite computational power (non null execution times);  executes several concurrent activities;  introduces variabile delays (often unpredictable). Modeling such factors and taking them into account Modeling such factors and taking them into account in in the the design design phase phase allows allows a a significant significant Control guys typically assume that computations take improvement in performance and reliability. improvement in performance and reliability. zero time. This means assuming computers with infinite resources and computational power. A control example A control example A positive angle  requires a positive control action u A negative angle  requires a negative control action u  > 0  < 0 u > 0 u < 0  > 0  < 0 u > 0 u < 0 A control task A control task task control( float theta0, float k) task control( float theta0, float k) { { control gain float error; float error, u, theta; reference angle float u; float theta; while (1) {  theta = read_sensor() ; while (1) { u error = theta – theta0; sensing  u = k * error; theta = read_sensor() ; output(u) ; error = theta – theta0; wait_for_next_period() ; computation u = k * error; } u } actuation sensing output(u) ; actuation computation wait_for_next_period() ; synchronization task execution } time task period } 7

Recommend


More recommend