Teaching language: English
Open for exchange students
Block schedule:
B
Course module 

Credit distribution 

Examination dates 
Sp1 
Sp2 
Sp3 
Sp4 
Summer course 
No Sp 
0107 
Examination 
5,0c 
Grading: TH 




5,0c




05 Jun 2015 pm H

13 Apr 2015 am M, 
20 Aug 2015 am V 
0207 
Laboratory 
2,5c 
Grading: UG 




2,5c





In programs
MPBME BIOMEDICAL ENGINEERING, MSC PROGR, Year 2 (elective)
MPSYS SYSTEMS, CONTROL AND MECHATRONICS, MSC PROGR, Year 1 (compulsory)
Examiner:
Docent
Knut Åkesson
Eligibility:
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: An introductory course in control and Linear Control System Design (SSY285) or similar.
 Recommended: Modeling and Simulation (ESS101) and Discrete Event Systems (SSY165) or similar.
Aim
The overall aim of the course is to provide an understanding of which problems an engineer faces when implementing control functions in embedded control systems as well as in industrial control systems.
Learning outcomes (after completion of the course the student should be able to)
Microcontrollers, realtime operating systems and scheduling
Describe the main characteristics of a microcontroller.
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 fixedpoint vs. floatingpoint numbers.
Explain how memory maps are used to represent how to access program, data and external devices.
Describe how the GeneralPurpose 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 subroutines.
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 realtime 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 multithreaded programs such that deadlocks might be avoided.
Describe the differences between offline and online 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 timetriggered statemachines.
Define deterministic and nondeterministic state machines.
Demonstrate how Zenobehavior 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 sidebyside, cascade and feedback composition of state machines.
Being able to apply the synchronousreactive paradigm to compose models that include feedback. Define what constitute a wellformed and illformed composition. How to reach a fixedpoint using exhaustive search and approximate methods.
Evaluate the relative merits of using a synchronousreactive paradigm vs. a threadbased 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 subtasks that are time critical and non timecritical 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 setpoint 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 statefeedback 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 nondeterministic. 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 controlflow graph may be generated from an algorithm. Describe how the controlflow graph may be used to estimate the worst case computation time of a task.
Project
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 modelbased 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.
Content
The course covers the following topics: Control:
Antiwindup algorithms
Bumpless transfer algorithms
Linear Quadratic Control, Kalman filters
Software:
Concurrent processes.
Realtime operating systems
Realtime scheduling of concurrent processes. Synchronous approaches to concurrent software. Analysis:
Software tools for simulating mixed continuous and discreteevent dynamics. Formal methods for specification, testing and modelchecking of realtime control systems. Discuss possibilities and threats with embedded systems in the public society.
Organisation
Teaching is in the form of lectures, problem solving sessions, laboratory exercises and a project.
Literature
 Edward A. Lee and Sanjit A. Seshia, Introduction to Embedded Systems, A CyberPhysical Systems Approach, http://LeeSeshia.org, ISBN 9780557708574, 2011.
 Computer Control: An Overview. Björn Wittenmark, Karl Johan Åström, KarlErik Årzén, IFAC Professional Brief.
 Distributed articles.
Examination
Written exam, passed laboratory exercises and projects.