99195 - Cyber-Physical Systems Programming M

Academic Year 2024/2025

  • Teaching Mode: Traditional lectures
  • Campus: Bologna
  • Corso: Second cycle degree programme (LM) in Electronic Engineering (cod. 0934)

    Also valid for Second cycle degree programme (LM) in Automation Engineering (cod. 8891)

Learning outcomes

The course provides the student with a basic knowledge of software architectures as well as the development, programming and design environments for cyber-physical systems, with particular emphasis on the coexistence of control tasks, data stream processing, and IoT communication with real-time and cybersecurity requirements. The student will learn to use compilers, libraries, runtimes and middleware for heterogeneous platforms and architectures, equipped with multicore processors, co-processors and HW and SW accelerators for the processing of data streams from sensors and towards actuators.

Course contents

  • Introduction to software development and cross-compilation for cyber-physical systems (CPS): compiler, bootloader, system calls, RTOS, middleware, real-time applications (e.g. controllers, real-time sensor data processing)
  • Embedded firmware development (baremetal programming) for embedded systems: C runtime, call stack, development of drivers
  • Real-time operating systems (RTOS) for CyberPhysical Systems (e.g. Nuttx, Zephyr, SEL4, PikeOS and automotive RTOSes); RTOS configuration and drivers for CPS (Examples on FreeRTOS and NuttX)
  • Middleware for CPS (microROS, xrce-DDS, DDS)
  • Case study: Programming the Crazyflie drone
  • Advanced topics: i) Elements of cybersecurity applied to CPS (Trusted Execution Environments, Trusted Platform Modules for firmware signature/verification and secure communication, control flow integrity); ii) Elements of Artificial Intelligence for autonomous CPS (neural networks and deep reinforcement learning)
  • Laboratory topics: i) Baremetal programming on QEMU emulator; ii) Learning the development environment of FreeRTOS/Crazyflie; iii) Development of a sensor drivers in FreeRTOS/Crazyflie, debugging howto; iv) Development of applications on Crazyflie (e.g. flight controller, autonomous flight)

Readings/Bibliography

Teaching materials:

  • slides provided by the teacher
  • scientific articles provided by the teacher
  • pointers to specific manuals and websites

Teaching methods

The course consists of theoretical lessons and guided laboratories. In the theoretical lessons, the main concepts will be presented and then addressed practically using prototype boards and drones in the laboratory, which will be used as examples of CPS.

The theoretical lessons include a main part on the fundamentals of embedded systems and CPS programming and a more advanced part on security and AI topics applied to CPS.

The laboratories will be guided by the instructor, and students will be provided with hardware to gain programming experience. They will be organized into at least three groups of three exercises each:

  • Group I: Bare-metal programming on an emulator
  • Group II: Programming a small drone (Crazyflie)
  • Group III: Development of flight and mission control applications

NOTE:
Given the type of activities and teaching methods adopted, participation in this course requires prior completion by all students of Modules 1 and 2 of safety training in study environments, [https://elearning-sicurezza.unibo.it/] in e-learning mode.

Assessment methods

The exam will consist of a 1 hour writing with closed-ended questions and the discussion of a project developed by the students starting from the tools learned during the lab sessions.

Students will carry out the project individually or in groups depending on the number and the projects available.

The teacher will propose some projects but the students will be able to propose customizations of the same. Students will be able to submit changes to the project proposals that will be evaluated by the teacher for approval.

The project must be presented through some slides and a short demonstration.

Teaching tools

Theoretical part:

  • lecture notes
  • websites and code repositories
  • scientific articles

Laboratory part:

  • development boards based on ARM and RISC-V microcontrollers
  • bitcraze crazyflie drones

The hardware supports may be subject to changes / updates depending on the number of students and the components available

Office hours

See the website of Andrea Acquaviva