Embedded and Real-Time Systems

Building robot software whose timing can be guaranteed: real-time requirements and latency budgets, measuring execution time and WCET, bare-metal architectures, RTOS tasks and context switching, rate-monotonic, response-time and EDF scheduling analysis, mutexes, priority inversion and lock-free buffers, interrupts and DMA, static memory and protection, PREEMPT_RT Linux and real-time ROS 2, CAN, EtherCAT, DDS quality of service and PTP, watchdogs, testing and functional safety, and a capstone joint controller architecture.

ROB-320 Year 3 3 credits 12 lessons · 6 h 4 min

Offered by HSM University · Robotics

What you'll learn

  • Classify robot functions as hard, firm or soft real-time and write testable timing requirements with periods, deadlines, jitter limits and overrun behaviour
  • Measure execution time, response time, period and jitter with debug pins, cycle counters and tracers, and estimate worst-case execution time with documented margins
  • Design bare-metal firmware using super-loops, cyclic executives, interrupt-driven foreground-background structures and cooperative schedulers, and judge when an RTOS is needed
  • Explain RTOS tasks, states, priorities, ticks and context switches, and write drift-free periodic tasks that detect overruns
  • Apply rate-monotonic and deadline-monotonic priority assignment, the Liu and Layland bound, response-time analysis and EDF to decide schedulability
  • Protect shared data with mutexes and lock-free structures, and bound priority inversion and deadlock with inheritance, ceiling protocols and lock ordering
  • Analyse interrupt latency, write short handlers that share data safely with tasks, and use DMA and double buffering correctly
  • Plan memory with static allocation, fixed-size pools, analysed and monitored stacks and memory protection, following coding standards such as MISRA C
  • Configure real-time Linux with PREEMPT_RT, real-time policies, locked memory, core isolation and absolute-time waits, and place ROS 2 and micro-ROS components appropriately
  • Analyse CAN and EtherCAT timing, set DDS and ROS 2 quality-of-service policies for real-time traffic, and synchronize clocks with PTP
  • Design fault detection with supervised watchdogs and safe states, plan timing and fault-injection tests, and describe the functional safety and security standards that apply to robots
  • Specify, analyse and plan verification of the complete real-time architecture of a robot joint controller

Course content

12 lessons · 6 h 4 min total · final exam

  1. 1 Real-time requirements and latency budgets 31 min · quiz
  2. 2 Timing, measurement and worst-case execution time 30 min · quiz
  3. 3 Bare-metal architectures: super-loops, interrupts and cooperative schedulers 29 min · quiz
  4. 4 RTOS fundamentals: tasks, states and context switching 30 min · quiz
  5. 5 Real-time scheduling theory 30 min · quiz
  6. 6 Concurrency, synchronization and priority inversion 30 min · quiz
  7. 7 Interrupts, shared data and DMA 30 min · quiz
  8. 8 Memory and resource management 29 min · quiz
  9. 9 Embedded Linux and real-time Linux 28 min · quiz
  10. 10 Real-time communication, middleware and time synchronization 33 min · quiz
  11. 11 Reliability, testing and functional safety 31 min · quiz
  12. 12 Capstone: the real-time architecture of a robot joint controller 33 min · quiz
  13. E Final exam 20 questions

Requirements

Recommended background. You can start any course at any time.

Description

Building robot software whose timing can be guaranteed: real-time requirements and latency budgets, measuring execution time and WCET, bare-metal architectures, RTOS tasks and context switching, rate-monotonic, response-time and EDF scheduling analysis, mutexes, priority inversion and lock-free buffers, interrupts and DMA, static memory and protection, PREEMPT_RT Linux and real-time ROS 2, CAN, EtherCAT, DDS quality of service and PTP, watchdogs, testing and functional safety, and a capstone joint controller architecture.

Part of the Science stream, typically taken in year 3.