### The Course is Full

A waiting list has been created. (March 15)

### Lecturers

The course is organized by the Control for Embedded Systems Cluster within the ARTIST2 Network of Excellence on Embedded System Design, with the participation of:

Lund University (Karl-Erik Årzén, Anton Cervin)

Universidad Politécnica de Valencia (Pedro Albertos, Alfons Crespo)

Royal Institute of Technology (KTH) Stockholm (Martin Törngren, Bengt Eriksson)

Czech Technical University Prague (Zdenek Hanzalek, Premysl Sucha)

Ericsson (Bo Bernhardsson)

Volvo Car Corporation (Erik Coelingh)

ABB Automation Technology (Albert Norberg)

Dynasim (Hilding Elmqvist)

### Introduction to Embedded Systems - Karl-Erik Årzén

In this introductory session, the general problem of the course will be presented and motivated. What Embedded systems (ES) are? What Embedded control systems (ECS) are? Why? Motivating examples: inverted pendulum, mobile robot, car safety control. Main issues in the design of ECS: typical requirements, conflicting requirements, design trade-offs, typical architectures, design parameters.

### Control: Introduction to Control - Karl-Erik Årzén, Anton Cervin

A very condensed introduction to feedback control. Dynamics, models, state-space descriptions, input-output formalisms, stability, linear vs nonlinear, control design principles, the ideas behind sampled control and discretized control

### Introduction to real-time computing - Alfons Crespo

A very condensed introduction to real-time computing. Models of computation, kernels & OS, synchronization, scheduling theory, timing analysis.

### PID Control: From algorithm to code - Karl-Erik Årzén

The PID control algorithm, algorithm modifications, anti-windup, mode changes, discretization, code

### Control & RT Issues . Pedro Albertos, Alfons Crespo

Real-time implementation of control algorithms in a multitasking environment involves a number of issues that should be taken into account. The unavoidable delays, both in computation and in data handling, the lost of data, the change of operation mode, the changes in sampling periods and the performance degrading are among the main issues to be considered. In this session, a review of these concepts for a general audience will be presented. The goal of this session would be to emphasize the relevance of these control design issues, to be strongly connected to the actual implementation of the control, to be discussed in the next sessions.

ECS require to work in a variety of (unexpected) circumstances. The operating system (OS) should provide a number of basic options to guarantee the safe behaviour of ECS. In this session, a new set of operating services to provide the applications a higher control of faults and temporal constraints will be described. Some examples of this functionality are: Execution timers, application defined scheduling, fault tolerant monitors, etc. From the control viewpoint, a hierarchical sorting of activities should be scheduled in agreement with the OS kernel to get the best, among the possible, control options. Safe (back-up) operation, basic control actions, optional and supervision are among the main issues to be discussed.

### Integrated Control and Scheduling - Anton Cervin, Karl-Erik Årzén

This session will focus on the interaction between the control design and control implementation. In embedded systems, floating point arithmetic is sometimes too costly. The problems associated with fixed point arithmetic are discussed. The implementation platform normally introduces input-output latencies due to computation and communication delays. The effects of this on control performance and how it can be compensated for will be discussed. Special emphasis will be given to the recent jitter margin concept. The implementation platform also introduces jitter in sampling intervals. This will also be discussed. The control server is a computational model for controller tasks that combines the benefits of static scheduling and dynamic event-based scheduling. Changing controller task parameters such as sampling periods on-line could sometimes be useful in order to adapt to changing conditions. The problems associated with this and the risk of switching induced instabilities will be discussed.

### Laboratory 1: Control of Ball and Beam Process - Karl-Erik Årzén, Anton Cervin

A practical laboratory where Java on a Linux PC will be used to control a ball and beam process. The multi-thread aspects of Java as well as thread synchronization will be discussed in detail. In the laboratory first a simulated process is used and then a real process. The control structure used is cascaded PID controllers.

### FPGA Scheduling - Zdenek Hanzalek

The objective of this course is to provide an overview of different off-line scheduling problems found in embedded systems. In order to classify the scheduling problems, we show alpha|beta|gamma notation first. Then we develop several algorithms for real-time uniprocessor applications. Namely we show Bratley’s branch&bound algorithm for Cmax optimization with release dates and deadlines and we underline main ideas of 0/1 programming solution for weighted completion time optimization with precedence constraints. The class of uniprocessor problems is concluded by minimization of maximum latency, i.e. Earliest Due-Date First algorithm and Earliest Deadline First algorithm. Finally we give an insight into the scheduling on dedicated processors and we provide examples on code synthesis for FPGA.

### Control of Computer Systems - Karl-Erik Årzén, Anton Cervin

Using control-based approaches for modeling, analysis, and design of embedded computer and communications systems is currently receiving increased attention from the real-time systems community, as a promising foundation for controlling the uncertainty in large and complex real-time systems. The control-based approach has the potential to increase flexibility, while preserving dependability and efficiency. In this session we will give an overview of the work that is being done within the area with a special emphasis on two areas: Control of Web-servers and feedback scheduling of controller tasks. An inverted pendulum control example will illustrate some of the issues.

### Laboratory 2: TrueTime and TORSCHE - Anton Cervin, Karl-Erik Årzén, Zdenek Hanzalek

A hands-on session/exercise where the users will become familiar with the co-design tool TrueTime. TrueTime is a MATLAB/Simulink-based tool that facilitates simulation of the temporal behavior of a multitasking real-time kernel executing controller tasks. The tasks are controlling processes that are modeled as ordinary continuous-time Simulink blocks. TrueTime also makes it possible to simulate simple models of communication networks and their influence on networked control loops.

In the second part of the session the Matlab based Scheduling toolbox TORSCHE (Time Optimization of Resources, SCHEduling) is presented. The toolbox is intended mainly as a research tool to handle control and scheduling co-design problems. It offers a collection of data structures that allow the user to formalize various off-line and on-line scheduling problems. Potential of the toolbox will be shown on a high level synthesis of parallel algorithms. The TORSCHE to TrueTime interface will be used to simulate schedules generated by TORSCHE.

### Model-based development: From UML to Simulink - Martin Törngren, Bengt Eriksson

The design of advanced embedded control systems requires a systematic approach in handling their increasing complexity due to the increasing functionality that is implemented in embedded systems. For example, consider the design of an embedded automotive ABS braking system. One obvious concern is that of the core motion control functionality, especially the control logic and algorithms and the dynamic behavior of the system. However, this is only one out of several aspects. Other aspects include safety, security, network communication, mechanical design, IO, power, etc. These aspects and components are in addition typically handled by different specialists, employing different modeling languages and tools, and moreover belonging to different organizational entities. This talk will provide examples of modeling tools, describe needs for integration and model management, provide examples of how models/tools can be integrated and point to some outstanding research challenges.

### Networked Control Systems & Fixed Point Arithmetic - Karl-Erik Årzén

Networked control loops, real-time network protocols, condensed IP stacks, CAN, TTP, Flexray. An overview of fixes point arithmetic.

### Laboratory 3: Embedded control (ATMEL AVR) of mechanical servo process - Karl-Erik Årzén, Anton Cervin

A hands-on laboratory where a ATMEL AVR Mega8/16 processor will be used to implement a PD controller for a mechanical rotating servo. The controller will be implemented in C using fixed point arithmetic.

### Industrial Lectures on Friday

These lectures will give an industrial perspectives on embedded control in different sectors, e.g., mobile telecom, automotive and industrial automation.