|SSY190 - Embedded control systems
| Syllabus adopted 2015-02-17 by Head of Programme (or corresponding)
|Grading: TH - Five, Four, Three, Not passed
|Education cycle: Second-cycle
Major subject: Automation and Mechatronics Engineering, Electrical Engineering
Department: 32 - ELECTRICAL ENGINEERING
Teaching language: English
Open for exchange students
02 Jun 2016 pm M,
04 Apr 2016 am EKL,
18 Aug 2016 am M
MPBME BIOMEDICAL ENGINEERING, MSC PROGR, Year 2 (elective)
MPSYS SYSTEMS, CONTROL AND MECHATRONICS, MSC PROGR, Year 1 (compulsory)
Docent Knut Åkesson
In order to be eligible for a second cycle course the applicant needs to fulfil the general and specific entry requirements of the programme that owns the course. (If the second cycle course is owned by a first cycle programme, second cycle entry requirements apply.)
Exemption from the eligibility requirement:
Applicants enrolled in a programme at Chalmers where the course is included in the study programme are exempted from fulfilling these requirements.
Course specific prerequisites
- Requirements: Linear Control System Design (SSY285) or similar.
- Recommended: Modeling and Simulation (ESS101) and Discrete Event Systems (SSY165) or similar.
The overall aim is to introduce the principles of design, specification, modeling, analysis and implementation of embedded control systems. Embedded control systems consist of distributed computing devices that interacts with each other and the physical world via sensors and actuators. Such systems are everywhere from vehicles, to medical devices, to factories and smart houses. These systems are increasingly complex and structured approaches for developing these systems are needed. The systems are often safety critical and thus it is highly important to establish that the system works correctly already in the design phases. A model-based approaches together with formal methods is increasingly adopted by industry to catch errors as early as possible and consequently ensure higher reliability.In this course we introduce a structured approach to design, specify, model and analyse based on mathematically well-defined models and algorithms. The course also covers realization of control functions by using microprocessors and real-time operating systems.
Learning outcomes (after completion of the course the student should be able to)
Micro-controllers, real-time operating systems and scheduling
Describe the main characteristics of a micro-controller.
Demonstrate how signed and unsigned integers are represented can be represented as a sequence of binary digits.
Demonstrate how addition and subtraction can be done using binary numbers.
Explain the advantages and disadvantages of using fixed-point vs. floating-point numbers.
Explain how memory maps are used to represent how to access program, data and external devices.
Describe how the General-Purpose Digital I/O (GPIO) can be used to interface external hardware.
Explain the difference between storing the value of a variable and storing the memory address to a variable.
Describe how to access the address of a variable and how to access the value of variable if a pointer to the variable is given in C.
Explain the difference between pass by value and pass by reference for interaction with sub-routines.
Describe how to interrupt service routines (ISR) are declared.
Explain the concepts of multitasking and which problems it solves.
Describe the differences between a thread and a process.
Describe the general concepts of a real-time operating system.
Being able to write and interpret simple embedded programs (including interrupt service routines and threads) implemented in C.
Describe why mutual exclusion between multiple threads is necessary to avoid race conditions and how it can be achieved using mutual exclusion locks.
Explain how mutual exclusion might lead to deadlock situations.
Explain how to structure access to mutual exclusion locks in multi-threaded programs such that deadlocks might be avoided.
Describe the differences between off-line and on-line schedulers and situations where it might be appropriate to use them.
Describe how a static order scheduler works and when it might be appropriate to use it.
Define what characterize a preemptive scheduler.
Describe how the priority of a task influences the decisions taken by the scheduler.
Define times (release time, response time, finish time, and deadline) associated with the execution of a task.
Ability to apply and analyze behavior of schedules set by the rate and deadline monotonic principle. Explain under which conditions is the schedule optimal. Apply the sufficient and exact condition for schedulability and calculation of response times.
Explain under what conditions priority inversion might happen. Explain how the priority inheritance protocol and the priority ceiling protocol can solve the priority inversion problem.
Ability to apply and analyze the earliest deadline first principle.
Modeling of dynamic behavior
Construct models of continuous, discrete and hybrid systems.
How to define extended state machines with inputs and outputs. Define the behavior of event and time-triggered state-machines.
Define deterministic and non-deterministic state machines.
Demonstrate how Zeno-behavior might occur in modeling of hybrid systems, what problems it causes and how regularization might be used to handle it. Describe potential issues with stability when switching between different stable modes.
Define how hybrid systems can be used to model timed automata.
Being able to do synchronous and asynchronous composition of state machines. How to model side-by-side, cascade and feedback composition of state machines.
Being able to apply the synchronous-reactive paradigm to compose models that include feedback. Define what constitute a well-formed and ill-formed composition. How to reach a fixed-point using exhaustive search and approximate methods.
Evaluate the relative merits of using a synchronous-reactive paradigm vs. a thread-based approach to model concurrent problems.
Implementation of controllers
Describe how the scheduler affects the latency and jitter of concurrent control tasks. Being to divide control tasks into sub-tasks that are time critical and non time-critical tasks and that are scheduled separately.
Explain typically problems experienced when implementing control functions using actuators that might saturate.
Design of control algorithms to handle actuator saturation (windup).
Explain problems with mode changes and set-point handling, describe how to implement bumpless transfer between manual and automatic mode.
Be able to calculate approximations of analog controllers. Discuss the relative merits of different discretization approaches.
Describe how the latency can affect the design of control algorithms.
Describe how to choose the sampling interval.
Being able to implement PID and state-feedback controllers in C.
Analysis and verification
Being able to describe propositional logic vs. temporal logic.
Being able to formulate and interpret specifications in linear temporal logic.
Describe the difference between a safety specification and a liveness specification.
Explain why language equivalence is not appropriate when comparing two models if the underlying system is non-deterministic. Be able to verify when one model simulate another and when two models are bisimilar.
Describe, in principle, how a formal verification procedure works.
Be able to describe how a (explicit/symbolic) model checking algorithm works for checking safety specifications.
Describe how a control-flow graph may be generated from an algorithm. Describe how the control-flow graph may be used to estimate the worst case computation time of a task.
Ability to formulate requirements of control system.
Ability to build a mathematical model of a mechatronic system.
Ability to simulate a mathematical model of a mechatronic system using standard software.
Ability to choose and design appropriate controllers for a system.
Ability to use a model-based approach to generate an implementation of controller.
Ability to implement a control algorithm in C.
Ability to evaluate the design and implementation against given specifications.
Embedded Systems and the Society
Discuss possibilities and threats with embedded systems in the public society.
The course covers the following topics: Control:
Bumpless transfer algorithms
Linear Quadratic Control, Kalman filters
Real-time operating systems
Real-time scheduling of concurrent processes. Synchronous approaches to concurrent software. Analysis:
Software tools for simulating mixed continuous and discrete-event dynamics. Formal methods for specification, testing and model-checking of real-time control systems. Discuss possibilities and threats with embedded systems in the public society.
Teaching is in the form of lectures, problem solving sessions, laboratory exercises and a project.
- Rajeev Alur. Principles of Cyber-Physical Systems. MIT Press, 2015. ISBN: 9780262029117
- Computer Control: An Overview. Björn Wittenmark, Karl Johan Åström, Karl-Erik Årzén, IFAC Professional Brief.
- Distributed articles.
- Supplementary literature: Edward A. Lee and Sanjit A. Seshia, Introduction to Embedded Systems, A Cyber-Physical Systems Approach, http://LeeSeshia.org, ISBN 978-0-557-70857-4, 2011.
Written exam, passed laboratory exercises and projects.