Embedded Control Systems Samarjit Chakraborty www.rcs.ei.tum.de TU - - PowerPoint PPT Presentation

embedded control systems
SMART_READER_LITE
LIVE PREVIEW

Embedded Control Systems Samarjit Chakraborty www.rcs.ei.tum.de TU - - PowerPoint PPT Presentation

Embedded Control Systems Samarjit Chakraborty www.rcs.ei.tum.de TU Munich, Germany Joint work with Dip Goswami (now at TU/e), Reinhard Schneider (now at Audi), Wanli Chang (now at Singapore Institute of Technology), Anuradha Annaswamy (MIT),


slide-1
SLIDE 1

Technische Universität München Technische Universität München

Embedded Control Systems

Samarjit Chakraborty

www.rcs.ei.tum.de

TU Munich, Germany

Joint work with Dip Goswami (now at TU/e), Reinhard Schneider (now at Audi), Wanli Chang (now at Singapore Institute of Technology), Anuradha Annaswamy (MIT), Arne Hamann (Bosch), and many others ...

slide-2
SLIDE 2

Technische Universität München

Control Systems Design

2

System identification Controller design Control system analysis

system model controller

Equations

slide-3
SLIDE 3

Technische Universität München

Control Systems Implementation

3

System identification Controller design Control system analysis

system model controller

Code generation Task partitioning Task mapping & scheduling Message scheduling Timing & performance analysis Are control

  • bjectives satisfied

NO

Equations Software

slide-4
SLIDE 4

Technische Universität München

The Design Flow

4

System identification Controller design Control system analysis

system model controller

Code generation Task partitioning Task mapping & scheduling Message scheduling Timing & performance analysis Are control

  • bjectives satisfied

NO

Controller Design Controller Implementation

slide-5
SLIDE 5

Technische Universität München

The Design Flow

5

Controller Design Controller Implementation

Control theorist Embedded systems engineer

Design assumptions § Infinite numerical accuracy § Computing control law takes negligible time § No delay from sensor to controller § No delay from controller to actuator § No jitter § … Implementation reality § Fixed-precision arithmetic § Tasks have non-negligible execution times § Often large message delays § Time- and event-triggered communication

slide-6
SLIDE 6

Technische Universität München

The Design Flow

6

Controller Design Controller Implementation

Control theorist Embedded systems engineer These are implementation details Model-level assumptions are not satisfied by implementation Not my problem!

slide-7
SLIDE 7

Technische Universität München

Semantic Gap

7

Controller Design Controller Implementation

Semantic gap between model and implementation Research Questions? § How should we quantify this gap? § How should we close this gap? Solution: Controller/Architecture Co-design

slide-8
SLIDE 8

Technische Universität München

Resource-aware Controller Design

8

Controller Design Implementation Platform

§ Traditionally, Computer Science has been concerned with efficient implementation of algorithms § What are notions of efficiency? Computation, communication, memory, energy, ... § Metrics for control algorithms have been different ... stability, settling time, peak overshoot, ... computation, communication memory, power, ...

slide-9
SLIDE 9

Technische Universität München

9

DC motor: Objective:

0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 10 20 30 40 50 60 70

Seconds Speed 33% Drop 25% Drop 0% Drop

A fraction of feedback signals being dropped

Controllers can be designed to be robust to drops and deadline-misses

The deadlines are usually not hard for control-related messages

Control Tasks - Characteristics

slide-10
SLIDE 10

Technische Universität München

10

0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 5 10 15 20 25 30 35 40 45 50

Seconds Speed Disturbance

h =20ms h =200ms

(1) The computation requirement at the steady state is less, i.e., sampling frequency can be reduced (e.g., event-triggered sampling) (2) The communication requirements are less at the steady state, (e.g., lower priority can be assigned to the feedback signals) Sensitivity of control performance depends on the state of the controlled plant

Control Tasks - Characteristics

slide-11
SLIDE 11

Technische Universität München

Bottomline

  • Embedded and Real-time Systems
  • Meeting deadlines is the center of attraction
  • Co-design
  • Deadline takes the back seat
  • As a result, the design space becomes bigger
  • Resulting design is better, robust, cost-effective …
  • Design objectives shift from “lower level” metrics like

deadlines to metrics governing system dynamics (like stability)

11

slide-12
SLIDE 12

Technische Universität München

What about NCS?

  • Take network characteristics into account when

designing the control laws

  • Packet drops, delays, jitter …

12 Plant T3 T4 Sensor T1 T2 m1 m2 m3 +

  • Controller

Network Networked Control Systems

slide-13
SLIDE 13

Technische Universität München

What about NCS? Answer: ANCS

  • ANCS – We can design the network
  • By taking into account control performance constraints
  • Problem: How to design the network?
  • Given a network, how to design the controller?
  • NCS problem
  • Co-design Problem: How to design the network and

the controller together?

13 Plant T3 T4 Sensor T1 T2 m1 m2 m3 +

  • Controller

Network Arbitrated Networked Control Systems

slide-14
SLIDE 14

Technische Universität München

A Simple Case

14

slide-15
SLIDE 15

Technische Universität München

  • We have a linear system given by the state-space model
  • For n-dimensional Single-Input-Single-Output (SISO) systems
  • Objective
  • u = ?

15

Controller Design: Continuous Model

slide-16
SLIDE 16

Technische Universität München

  • Control law

r = reference K = feedback gain F = static feedforward gain

  • How to design K?
  • How to design F?

16

Controller Design: Continuous Model

slide-17
SLIDE 17

Technische Universität München

  • Choose the desired closed-loop poles at
  • Pole placement is a constrained optimization problem (poles: decision

variables, objective: control performance, constraints: saturation, stability)

  • Using Ackermann’s formula we get
  • Poles of (A+BK) are at

Computing Feedback Gain

17

slide-18
SLIDE 18

Technische Universität München

Static Feedforward Gain

18

Closed-loop system F should be chosen such that y(t) ! r (constant) as t ! 1 i.e., Using final value theorem Taking Laplace transform

slide-19
SLIDE 19

Technische Universität München

Digital Platform: Sample and Hold

19

u(t) x(t) D/A A/D Processor clock u(tk) x(tk) Control Algorithm D/A ! digital-to-analog converter A/D ! analog-to-digital converter Hold Sampler Continuous-time system

  • Input u(t) is piecewise constant
  • Look at the sampling points
slide-20
SLIDE 20

Technische Universität München

20

x(t) x(tk) u(t) t ! t ! tk tk+1 tk+2

ZOH Sampling

Sampling period = h

slide-21
SLIDE 21

Technische Universität München

21

ZOH periodic sampling with period = h

Design: Step 1 (Discretization)

slide-22
SLIDE 22

Technische Universität München

  • Given system:
  • Control law:
  • 1. Check controllability of (φ,Γ) ! must be controllable. γ must be invertible.
  • 2. Apply Ackermann’s formula
  • 3. Feedforward gain

22

Objectives (i) Place system poles (ii) Achieve y ! r as t ! 1 (iii) Design K and F

Design: Step 2 (Controller Design)

slide-23
SLIDE 23

Technische Universität München

  • Given
  • The control input such that closed-loop poles are at
  • Using Ackermann’s formula:

Step 2

23

slide-24
SLIDE 24

Technische Universität München

Continuous Vs Discrete Time

Continuous-time ZOH periodic sampled

24

Input: Input: Controllability matrix: Controllability matrix:

slide-25
SLIDE 25

Technische Universität München

The Real Case

25

Loop start u = K*[x1(i);x2(i)] + r*F; xkp1 = phi*[x1(i);x2(i)]+ Gamma*u; x1(i+1) = xkp1(1); x2(i+1) = xkp1(2); Loop end

Tm: measure Tc : compute Ta : actuate Feedback loop Tm sensor task Tc controller task Ta actuator task

slide-26
SLIDE 26

Technische Universität München

Control Loop

26

Tm Ta Tc h= sampling period τ = sensor-to-actuator delay Sensor reading Actuation Tm : measure Tc : compute Ta : actuate Feedback loop Ideal design assumes: or

slide-27
SLIDE 27

Technische Universität München

27

Control Task Triggering

Tm Tc Ta

τ

Sensor-to-actuator delay: τ

τ τ τ

  • In general, Tm and Ta tasks consume negligible computational time and are

time-triggered

  • Tc needs finite computation time and is preemptive
  • When multiple tasks are running on a processor, Tc can be preempted
slide-28
SLIDE 28

Technische Universität München

Control Task Model: Constant Delay

28

Deadline Dc Tc preemption wait Tm Sampling period = h Tm Ta

slide-29
SLIDE 29

Technische Universität München

Design Steps

29

Real-time tasks + control applications Overall response time analysis Task models Schedulability test +Timing properties Controller design Design objectives met?

No

Partial redesign

Yes

Stage I Stage II

slide-30
SLIDE 30

Technische Universität München

30

Bus Arbitration Policies

When multiple processors want to transmit data at the same time, how is the contention resolved?

  • Using a bus arbitration policy, i.e., determine who gets priority
  • Examples of arbitration policies
  • Time Division Multiple Access (TDMA)
  • Round Robin (RR)
  • Fixed Priority (FP)
  • Earliest Deadline First (EDF), …

Processor 1 Processor 2 Processor 3 Communication Bus

slide-31
SLIDE 31

Technische Universität München

31

Time Vs Event-Triggered Arbitration

Processor 1 Processor 2 Processor 3 P1 P2 P3 P1 P2 P3 time Bus period Time-triggered arbitration policy: Communication Bus

All components have a priory knowledge of the message send/ receive time instants (global time)

slide-32
SLIDE 32

Technische Universität München

32

Processor 1 Processor 2 Processor 3 P2 P1 P2 P3 time

P2 preempted by P1 P2 resumes execution

Event-triggered arbitration policy: Priority: P1 > P2 > P3 Communication Bus

Time Vs Event-Triggered Arbitration

slide-33
SLIDE 33

Technische Universität München

33

Computing Response Times

P1 P2 P3 P1 P2 P3 time Bus period P2 P1 P2 P3 time

P2 preempted by P1 P2 resumes execution

Time-triggered arbitration policy Event-triggered arbitration policy P1 > P2 > P3 Worst-case response time of P1

ri = ei + ∑j 2 hp(i) (dri/Tje £ ej)

Response time of ith task

Relatively easy!

slide-34
SLIDE 34

Technische Universität München

34

  • hp(i) – set of all tasks having priority higher than i
  • Tj – period of task j
  • dri/Tje – number of times task i is preempted by task j
  • ei – execution time of task i
  • Response time of task i is made up of:
  • Execution time of task i and
  • the time during which i is preempted and higher priority tasks

are running

Response Time in Event-Triggered

ri = ei + ∑j 2 hp(i) (dri/Tje £ ej)

Response time of ith task:

slide-35
SLIDE 35

Technische Universität München

r3

1 = e3 + ∑j 2 {1,2} (dr3 0/Tje£

e£ej) = 4 + d4/6e1 + d4/8e2 = 7 r3

2 = e3 + ∑j 2 {1,2} (dr3 1/Tje£

e£ej) = 4 + d7/6e1 + d7/8e2 = 8 r3

3 = e3 + ∑j 2 {1,2} (dr3 2/Tje£

e£ej) = 4 + d8/6e1 + d8/8e2 = 8 r3

3 = r3 2

Example: Compute WCRT for task 3

Prio ei Ti 1 1 6 2 2 8 3 4 10 4 2 20

35

hp(3) = {1,2} r3

0 = e3 (initial value)

Fixed point computation:

slide-36
SLIDE 36

Technische Universität München

Controller design steps for Dc < h

36

Continuous-time model New discrete-time model: Sampled-data model Controller design based on the sampled-data model

ZOH sampling with period h and constant sensor-to-actuator delay Dc Objectives (i) Place system poles (ii) Achieve y ! r as t ! 1 Step I Step II

slide-37
SLIDE 37

Technische Universität München

37

Dc Tc

tk tk+1

Snapshot of One Sampling Period

x(tk) x(tk+1) What happens within one sampling period?

slide-38
SLIDE 38

Technische Universität München

38

slide-39
SLIDE 39

Technische Universität München

39

slide-40
SLIDE 40

Technische Universität München

40

slide-41
SLIDE 41

Technische Universität München

Sampled-data Model

41

Continuous-time model

ZOH sampling with period h and constant sensor-to-actuator delay Dc … End of Step 1

Sampled-data model

slide-42
SLIDE 42

Technische Universität München

  • We define new system states:
  • With the new definition of states, the state-space becomes

where the augmented matrices are defined as follows

Augmented System

42

slide-43
SLIDE 43

Technische Universität München

  • Given system:
  • Control law:
  • 1. Check controllability of ! must be controllable. γ must be

invertible where γ is defined as follows

  • 2. Apply Ackermann’s formula
  • 3. Feedforward gain

43

Objectives (i) Place system poles (ii) Achieve y ! r as t ! 1 (iii) Design K and F

Controller Design for Dc < h

End of Step II

slide-44
SLIDE 44

Technische Universität München

Summary: Design for Dc < h

44

Continuous-time model Sampled-data model Augmented system Controller gains

slide-45
SLIDE 45

Technische Universität München

Computation, Communication and Memory-aware Controller Design

45

slide-46
SLIDE 46

Technische Universität München

46

  • Time-Triggered Bus Protocols
  • Time-Triggered Protocol (TTP) – mostly used for reliable/guaranteed
  • communication. Also used in avionics (airplanes)
  • Based on Time Division Multiple Access (TDMA) policy
  • Has two variants TTP/A and TTP/C
  • “A” refers to “Automotive Class A” for soft real-time applications. It is a scaled

down version of TTP and is cheaper

  • “C” refers to “Automotive Class C” for hard real-time applications. It is the full

version of TTP and offers fault tolerance

  • Event-Triggered Bus Protocols
  • Controller Area Network (CAN) – widely used for chassis control systems and

power train communication

  • Based on fixed priority scheduling policy
  • Does not provide hard real-time guarantees

Automotive Communication Buses

slide-47
SLIDE 47

Technische Universität München

47

Time-Triggered or Event-Triggered?

Time-Triggered Event-Triggered Timing Guarantees

Deterministic behavior, higher dependability Difficult to provide hard real-time guarantees

Target Applications

Regular/Periodic Good performance for asynchronous events

Bus Utilization

Low if applications are not periodic High

Flexibility

Small change might require full redesign Flexible and scalable

Composability

Different components can be easily composed Difficult to provide timing guarantees

slide-48
SLIDE 48

Technische Universität München

48

Mix of Time- and Event-Triggered

  • The question of Time-Triggered or Event-Triggered is a subject of debate. Each has

its own advantages and disadvantages

  • This has led to the development of mixed or hybrid protocols which combine the

features of both time- and event-triggered paradigms

  • Examples
  • TTCAN – Time-Triggered CAN, built on top of CAN
  • FlexRay – started by DaimlerChrysler and BMW. It is widely believed that this

will become the most popular bus protocol in the future

slide-49
SLIDE 49

Technische Universität München

CC0 (Communication Cycle) CC1 CC63 … Static Segment Dynamic Segment

Hybrid Communication (FlexRay)

m1 … m4 m2 m3 …

49

TDMA FPNP

slide-50
SLIDE 50

Technische Universität München

50

  • Tasks T1, …, T8 send messages over a FlexRay bus
  • T1, T2, T3 over the ST segment and T4, …, T8 over the DYN segment
  • In the first cycle, T5, T6 and T7 have messages to send, but not T4 and T8. Message

from T6 did not fit into the DYN segment

  • In the second cycle, T4, T5 and T8 had nothing to send. Message from T7 did not fit

into the DYN segment m1 m3 m5 m7 m2 m6

Period = Pbus Pbus

ST DYN ST DYN

empty minislots

FlexRay – Brief Overview

slide-51
SLIDE 51

Technische Universität München

Communication Schedules

§ The temporal behavior is predictable § The bandwidth utilization is poor § Availability is limited § The temporal behavior is unpredictable § The bandwidth utilization is better § Availability is higher

51

Time-triggered (TT) Event-triggered (ET) Conventional design: Use TT for control-messages Challenge: Can we design controllers that use fewer TT slots but still have good control performance?

slide-52
SLIDE 52

Technische Universität München

Quality of Control vs. System State

Ø The performance of a control application is more sensitive to the applied control input in transient state compared to that in steady-state Ø ET communication for the control signals is good enough in the steady- state Ø TT communication is better suited for transient state

52

r

t

Transient State Steady State

Observations

Settling time

slide-53
SLIDE 53

Technische Universität München

Mode Switching Scheme

53

Plant in Steady- State Plant in Transient

Mode Change Protocol

Plant in Transient Plant in Steady- State

TT : ET :

Schedule : Schedule : Controller : Controller :

Si

s s

Si

tr

Ki

tr

Ki

ss

Mss Mtr

x[k]T x[k] > Etr

Mode Change Request

After After dwell time T i dw

slide-54
SLIDE 54

Technische Universität München

Example

§ We consider two distributed control applications communicating via a hybrid communication bus

54

§ We apply state-feedback controller for both, i.e., u[k] =Fx[k]

slide-55
SLIDE 55

Technische Universität München

Performance with TT Communication

55

Control Gains Quality of control

Converges very fast without any oscillation

C1 C2

slide-56
SLIDE 56

Technische Universität München

Performance with ET Communication

56

Control Gains Quality of control

C1 C2

Large oscillations and long settling time

slide-57
SLIDE 57

Technische Universität München

Performance with Switching

57

Quality of control

C1 C2

Performance is better than that with ET communication but we consume less TT communication slots We have one shared TT communication

  • slot. The control messages are transmitted

via ET communication when they are in steady state and switches to TT communication when transient state occurs due to some disturbance

slide-58
SLIDE 58

Technische Universität München

Experimental Setup

58

slide-59
SLIDE 59

Technische Universität München

Design Flow

59

CC

ECU ECU

MCU Channel A Channel B BD BD

ECU

ECU

§ Microcontroller Unit (MCU) § application execution § Communication Controller (CC) § implements the FlexRay protocol § Bus Driver (BD) § converts digital inputs from CC to voltage signals for the bus

slide-60
SLIDE 60

Technische Universität München

ECU Software Development

60

Application Design System Design model

§ HW-Architecture § Protocol Config. § Communication § ECU-Software § ECU Config. Code Generator Code Generator

Application Code OS - Code Driver Code

CrossCompiler Suite

Target HW

System Specification

slide-61
SLIDE 61

Technische Universität München

61

Mixed time-/event-triggered Purely event-triggered Purely time-triggered

Experimental Results

slide-62
SLIDE 62

Technische Universität München

  • What is the disturbance model?
  • How many time-triggered slots?
  • How many switches?
  • Controller design
  • Engineering issues: protocol constraints

62

Issues …

Time-Triggered Event-Triggered

slide-63
SLIDE 63

Technische Universität München

Computation-aware Controller Design

63

slide-64
SLIDE 64

Technische Universität München

Example

  • Consider a control task that has a sampling period of 5 ms

and execution time of 3 ms

  • This implies that only one such task can be implemented
  • n a processor

64

slide-65
SLIDE 65

Technische Universität München

Example - OSEK/VDX Operating System

  • Often the operating system is configured to support only a

fixed set of sampling periods

  • For a control application, if the required sampling period is

not offered by the operating system then a smaller sampling period has to be used

  • But this leads to poor utilization of the processor

65

slide-66
SLIDE 66

Technische Universität München

Example

  • Again consider the control task that was previously

sampled at 5ms

  • Instead, with the schedule {5ms, 5ms, 10ms, repeat} the

average sampling period is 6.67ms and this might be an acceptable sampling period, while 10ms might not be acceptable

  • Now with such a non-uniform sampling schedule, two

control tasks can be implemented on the same processor, whereas with a sampling period of 5ms only one task can be implemented

  • Questions: (i) How to design controllers that use such non-

uniform sampling? (ii) How to design such schedules?

66

slide-67
SLIDE 67

Technische Universität München

Switching between multiple sampling periods

  • The switching between different sampling period are only

allowed at intervals of 10 ms

  • Schedule design is an optimization problem

67

slide-68
SLIDE 68

Technische Universität München

OSEK/VDX Release times of different applications with different sampling periods

68

slide-69
SLIDE 69

Technische Universität München

Designing controllers with non-uniform sampling periods

69

slide-70
SLIDE 70

Technische Universität München

System Model

  • The plant dynamics is given by:

where is the system state, is the system

  • utput, and is the control input applied to the

system

  • Assuming a sampling period of , the sampled system

states are

  • The sampled outputs are

70

slide-71
SLIDE 71

Technische Universität München

System Model (contd.)

  • The discrete values of the control input are similarly

denoted by

  • Using zero-order hold (ZOH), the input applied to the plant

is

  • Hence, the discrete dynamics of the system are given by

where

71

slide-72
SLIDE 72

Technische Universität München

Example

  • Consider two applications with C1 and C2 that are sharing

a single ECU

  • C1 has a period of 2 ms and an execution time of 0.7 ms
  • C2 has a period of 5 ms and an execution time of 2 ms
  • Assume that they are scheduled using a preemptive fixed

priority scheduling policy with rate monotonic priority assignments

72

slide-73
SLIDE 73

Technische Universität München

New system model

  • To cope with the variations in task completion times, we

assume that the actuation is done at the end of the sampling period

  • Hence, the resulting system model is:

73

slide-74
SLIDE 74

Technische Universität München

Controller with non-uniform sampling

  • Let the operating system offer a set of sampling periods
  • A control application uses a sequence of sampling period

given by where

  • Hence, the schedule of sampling periods used by the

controller is given by

  • The resulting load on the processor is

where is the execution time

  • f the controller

74

slide-75
SLIDE 75

Technische Universität München

Resulting system dynamics

  • Dynamics of the resulting system within one cycle of S is

given by:

75

slide-76
SLIDE 76

Technische Universität München

Resulting system dynamics

  • Let us introduce a new augmented system state
  • Then for we have

where is a zero vector

  • The system and input matrices for the augmented state

are

76

slide-77
SLIDE 77

Technische Universität München

Resulting system dynamics

  • The system output is

where

  • The control input is designed as

77

slide-78
SLIDE 78

Technische Universität München

Resulting system dynamics

  • Hence, the closed loop dynamics of the system is given

by

  • The closed loop system matrix may be denoted as

78

slide-79
SLIDE 79

Technische Universität München

Resulting system dynamics

  • Hence, the overall system dynamics in one cycle for a

schedule is given by

79

slide-80
SLIDE 80

Technische Universität München

Resulting system dynamics

80

slide-81
SLIDE 81

Technische Universität München

Controller design

  • The poles to place are the eigenvalues of
  • The number of poles are (n+1)N
  • To ensure stability, the eigenvalues of the overall closed-

loop system matrix must have absolute values of less than unity

  • Once the poles are chosen, the feedback and feedforward

gains can be determined in the usual way (as discussed for the earlier problems)

81

slide-82
SLIDE 82

Technische Universität München

Pole placement

  • Choosing the poles involves solving a complex
  • ptimization problem, taking into account constraints like

input saturation and settling time

82

slide-83
SLIDE 83

Technische Universität München

Example

  • Execution time of each application is 0.7ms
  • Schedule for C1 and C2 is
  • Schedule for C3 and C4 is

83

slide-84
SLIDE 84

Technische Universität München

Schedule/controller co-synthesis

  • Given a set of plants, how to synthesize the controllers

and a schedule such that control objectives are satisfied and the maximum number of controllers can be packed into a single processor

  • Since there are non-convex and non-linear optimization

problems, heuristic optimization techniques are needed

  • While they may perform well in practice, there are no
  • ptimality guarantees

84

slide-85
SLIDE 85

Technische Universität München

Memory Aware Controller Design

  • System setup:
  • Processor executing multiple control applications
  • These applications are on a flash memory and are fetched by

the processor one after the other

  • Schedule is given as:

85

slide-86
SLIDE 86

Technische Universität München

86

§ Mapping: address is modulo the number of blocks in the cache

How does a Cache Work? Direct Mapped Cache

00001 00101 01001 01101 10001 10101 11001 11101 000 Cache Memory 001 010 011 100 101 110 111

slide-87
SLIDE 87

Technische Universität München

Cache Misses

  • This results in each control application evicting the code of the

previous application from the on-chip memory (cache)

  • Hence, each application experiences a larger execution time

(resulting from the code having to be fetched from the flash memory)

  • This increases the sampling period of each application

87

slide-88
SLIDE 88

Technische Universität München

88

C1(1) C2(1) C3(1) C1(2) C2(2) C3(2) C1(3)

  • Average Sampling period
  • Sensor-to-actuator delay
  • Discrete-time Controller Design for Dc<h case

Controller design for memory oblivious schedule

slide-89
SLIDE 89

Technische Universität München

Memory-aware Controller Design

89

New Schedule

slide-90
SLIDE 90

Technische Universität München

90

Controller design for memory aware schedule

C1(1) C1(2) C1(3) C2(1) C2(2) C3(1) C3(2) C3(3) C2(2) C1(4)

  • Sensor-to-actuator delay reduces for second and third instances.
  • Average sampling period reduces.
slide-91
SLIDE 91

Technische Universität München

Design Problem

  • Consists of two problems
  • How to estimate the guaranteed reduction in worst

case execution time?

  • Needs program analysis techniques
  • How to do controller design for non-uniformly

sampled systems?

91

slide-92
SLIDE 92

Technische Universität München

Program Analysis Technique

92

slide-93
SLIDE 93

Technische Universität München

Program Analysis Technique

93

slide-94
SLIDE 94

Technische Universität München

Schedule/controller co-synthesis

  • Again, similar to the previous problem
  • What should be the sampling schedule and the

controller design?

  • For various different memory architectures, the problem

changes

  • For example, cache + scratchpad memory
  • Similar problems for multicore processors (e.g., with

shared cache)

94

slide-95
SLIDE 95

Technische Universität München

Cross-layer Design

95

  • What are the “layers” in a cross-layer design?
  • Model
  • Code
  • Implementation of the code on a distributed architecture
  • Hardware/device level characteristics

side-effects (e.g., all control inputs applied simultaneously?) numerical precision timing incorrect computations need to reboot - timing

slide-96
SLIDE 96

Technische Universität München

  • Model to code
  • How to verify that the model-level semantics are preserved in the

code?

  • Simulink code generator offers different optimization options. But what

impact do they have on preserving model semantics?

  • In the case of mismatch, should we

change the model, the refinement,

  • f both? How?

Model Code Refinement

Cross-layer Design

96

slide-97
SLIDE 97

Technische Universität München

  • Model to code
  • How to carry over proofs from the model level to an implementation?
  • Which refinements are “proof preserving”?

Model Code Proof of stability Proof of stability of the code

Cross-layer Design

97

slide-98
SLIDE 98

Technische Universität München

  • Code to platform
  • Co-synthesis
  • Given plant + control objectives + platform constraints
  • Synthesize controller + its implementation
  • What kind of optimization techniques are needed?

Partial controller specification Partial platform specification Plant + platform implementation (sampling rate, gain values, schedules, …)

Cross-layer Design

98

slide-99
SLIDE 99

Technische Universität München

  • Some open (control theoretic) issues
  • Dealing with occasional loss of feedback signal
  • Work in NCS: only over infinite horizons, deals only with stability
  • Needed: finite length characterizations of allowed loss patterns,

beyond stability

  • Tighter analysis of switched systems with known switching behavior
  • Known results: stability analysis under arbitrary switching patterns,

very conservative results

  • Needed: analysis for specified switching behaviors, synthesize

switching patterns that guarantee stability

  • Control with non-uniform sampling periods
  • Control with state-specific communication delays

Recurring open issues

99

slide-100
SLIDE 100

Technische Universität München

§ Wanli Chang, Dip Goswami, Samarjit Chakraborty, Lei Ju, Chun Jason Xue, Sidharta Andalam: Memory-Aware Embedded Control Systems Design. IEEE Trans. on CAD of Integrated Circuits and Systems 36(4): 586-599 (2017) § Samarjit Chakraborty, Mohammad Abdullah Al Faruque, Wanli Chang, Dip Goswami, Marilyn Wolf, Qi Zhu: Automotive Cyber-Physical Systems: A Tutorial Introduction. IEEE Design & Test 33(4): 92-108, 2016 § Wanli Chang, Samarjit Chakraborty: Resource-aware Automotive Control Systems Design: A Cyber-Physical Systems Approach. Foundations and Trends in Electronic Design Automation 10(4): 249-369 (2016) § Dip Goswami, Reinhard Schneider, Samarjit Chakraborty: Relaxing Signal Delay Constraints in Distributed Embedded Controllers. IEEE Trans. Contr.

  • Sys. Techn. 22(6): 2337-2345 (2014)

§ Harald Voit, Anuradha M. Annaswamy, Reinhard Schneider, Dip Goswami, Samarjit Chakraborty: Adaptive switching controllers for systems with hybrid communication protocols. American Control Conference (ACC) 2012 § Harald Voit, Anuradha Annaswamy, Reinhard Schneider, Dip Goswami, Samarjit Chakraborty: Adaptive switching controllers for tracking with hybrid communication protocols. Conference on Decision and Control (CDC) 2012

100

References