99195 - CYBER-PHYSICAL SYSTEMS PROGRAMMING M

Academic Year 2023/2024

  • 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, system calls, RTOS, middleware, applications
  • Embedded firmware development (baremetal programming) for systems with sensors and actuators: C runtime, call stack, development of drivers
  • Programming with Real-time operating systems (RTOS) and configuration tool (Ex on NuttX OS)
  • RTOS for CPS (e.g. Nuttx, Zephyr, SEL4, PikeOS and automotive RTOSes)
  • Middleware for CPS (microROS, xrce-DDS, DDS)
  • Elements of cybersecurity applied to CPS: Trusted Execution Environments (TEE), Trusted Platform Modules for firmware signature/verification and secure communication, control flow integrity (CFI)
  • Elements of Artificial Intelligence for autonomous CPS (neural networks and deep reinforcement learning) 
  • Laboratories: i) programming an embedded system with sensors and actuators using NuttX OS; ii) programming a crazyflie drone; iii) development of a simple AI drone application

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 lab sessions. In the theoretical lessons the main concepts will be exposed which will then be applied in a practical way on prototype boards and drones in the labs, that will be used as representative of CPSs.

The labs will be led by the teacher and the students will be provided with hardware on which to gain programming experience. Labs will be organized in at least 3 groups of 3 lab sessions each:

  • Group I: Programming a CPS system on a prototype board, installing the software stack (bootloader, OS, middleware, communication libraries), learning to schedule tasks on real-time OS, reading data from sensors and communicating data to a remote system
  • Group II: Programming a small real drone, making changes and updates to parts of the system software, programming a system equipped with a flight processor and co-processor for the execution of complex mission tasks (e.g. obstacle recognition)
  • Group III: Development of advanced applications based on reinforcement learning, development of secure code with compiler support, use of simulation systems for the single CPS and for swarms

NOTE:

In consideration of the type of activity and teaching methods adopted, the attendance of this training activity requires the prior participation of all students in the training modules 1 and 2 on safety in the study places, [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