37
Performance-Aware Scheduler Synthesis for Control Systems Rupak Majumdar 1, 2 , Indranil Saha 1 and Majid Zamani 1 1 University of California, Los Angeles 2 Max Planck Institute for Software Systems EMSOFT 2011 October 12, 2011 EMSOFT 2011 Majumdar, Saha and Zamani Performance-Aware Scheduler Synthesis 1/24

Performance-Aware Scheduler Synthesis for Control … filePerformance-Aware Scheduler Synthesis for Control Systems Rupak Majumdar 1;2,Indranil Saha and Majid Zamani 1University of

  • Upload
    buidat

  • View
    227

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Performance-Aware Scheduler Synthesis for Control … filePerformance-Aware Scheduler Synthesis for Control Systems Rupak Majumdar 1;2,Indranil Saha and Majid Zamani 1University of

Performance-Aware Scheduler Synthesis forControl Systems

Rupak Majumdar1,2, Indranil Saha1 and Majid Zamani1

1University of California, Los Angeles

2Max Planck Institute for Software Systems

EMSOFT 2011October 12, 2011

EMSOFT 2011 Majumdar, Saha and Zamani Performance-Aware Scheduler Synthesis 1/24

Page 2: Performance-Aware Scheduler Synthesis for Control … filePerformance-Aware Scheduler Synthesis for Control Systems Rupak Majumdar 1;2,Indranil Saha and Majid Zamani 1University of

Mathematical Model of a Control System

x(k + 1) = f (x(k),u(k),w(k))

y(k) = h (x(k))

Controller

SensorActuator

Plant

u(k) = κ(x(k))

For linear time-invariant control systems:

Plant : x(k + 1) = Ax(k) + B1w(k) + B2u(k)

y(k) = Cx(k)

Controller : u(k) = −Kx(k)

EMSOFT 2011 Majumdar, Saha and Zamani Performance-Aware Scheduler Synthesis 2/24

Page 3: Performance-Aware Scheduler Synthesis for Control … filePerformance-Aware Scheduler Synthesis for Control Systems Rupak Majumdar 1;2,Indranil Saha and Majid Zamani 1University of

Mathematical Model of a Control System

x(k + 1) = f (x(k),u(k),w(k))

y(k) = h (x(k))

Controller

SensorActuator

Plant

u(k) = κ(x(k))

For linear time-invariant control systems:

Plant : x(k + 1) = Ax(k) + B1w(k) + B2u(k)

y(k) = Cx(k)

Controller : u(k) = −Kx(k)

EMSOFT 2011 Majumdar, Saha and Zamani Performance-Aware Scheduler Synthesis 2/24

Page 4: Performance-Aware Scheduler Synthesis for Control … filePerformance-Aware Scheduler Synthesis for Control Systems Rupak Majumdar 1;2,Indranil Saha and Majid Zamani 1University of

Controller to Software Task

Software

Task

SensorActuator

Plant

CPU

EMSOFT 2011 Majumdar, Saha and Zamani Performance-Aware Scheduler Synthesis 3/24

Page 5: Performance-Aware Scheduler Synthesis for Control … filePerformance-Aware Scheduler Synthesis for Control Systems Rupak Majumdar 1;2,Indranil Saha and Majid Zamani 1University of

Complex Control Systems

Today’s large control systems have many control units.

Boeing 747 has 50 ECUs.

BMW has 70-100 ECUs.

Multiple control loops need to be implemented on a singleprocessor.

Helps moving from federated architecture to integratedarchitecture .

Reduces cost.

Reduces communication complexity.

EMSOFT 2011 Majumdar, Saha and Zamani Performance-Aware Scheduler Synthesis 4/24

Page 6: Performance-Aware Scheduler Synthesis for Control … filePerformance-Aware Scheduler Synthesis for Control Systems Rupak Majumdar 1;2,Indranil Saha and Majid Zamani 1University of

Multiple Control Systems with Shared Resources

Task 1

A/DD/A

Plant 1

Shared CPU

Task 2

A/DD/A

Plant 2

Task N

A/DD/A

Plant N

....

RTOS Scheduler

EMSOFT 2011 Majumdar, Saha and Zamani Performance-Aware Scheduler Synthesis 5/24

Page 7: Performance-Aware Scheduler Synthesis for Control … filePerformance-Aware Scheduler Synthesis for Control Systems Rupak Majumdar 1;2,Indranil Saha and Majid Zamani 1University of

Multiple Control Systems with Shared Resources

Control: u1 = f1(x)

Timing: τ1

Control: u2 = f2(x)

Timing: τ2

Control: uk = fk (x)

Timing: τk

Virtual World: Control Theory

Real World: Real-time OS

Tasks: T1: Period = τ1

WCET = c1

T2: Period = τ2

WCET = c2. . . . . .

Tk : Period = τk

WCET = ck

Schedulable? Schedule tasks

EMSOFT 2011 Majumdar, Saha and Zamani Performance-Aware Scheduler Synthesis 6/24

Page 8: Performance-Aware Scheduler Synthesis for Control … filePerformance-Aware Scheduler Synthesis for Control Systems Rupak Majumdar 1;2,Indranil Saha and Majid Zamani 1University of

Hard Real-Time Scheduling

Given tasks with worst case execution times and periods,is there a way to execute them so that all tasks finishexecuting before their deadlines?

Key problem in real-time systems.

System schedulable→ Implement!

System not schedulable→ Send back to designer.

Or: Throw more resources at it!

EMSOFT 2011 Majumdar, Saha and Zamani Performance-Aware Scheduler Synthesis 7/24

Page 9: Performance-Aware Scheduler Synthesis for Control … filePerformance-Aware Scheduler Synthesis for Control Systems Rupak Majumdar 1;2,Indranil Saha and Majid Zamani 1University of

Not-So-Hard Real-Time Scheduling

Suppose we relax the scheduler:

In some rounds, the scheduler can decide not to execute atask.

The control input generated in the previous cycle is appliedto the plant.

Scheduling problem is easier.

But what happens to the controlled system?

If we ignore a control task too many times, the system maybecome unstable.

Even if the system is stable, what happens to theperformance?

EMSOFT 2011 Majumdar, Saha and Zamani Performance-Aware Scheduler Synthesis 8/24

Page 10: Performance-Aware Scheduler Synthesis for Control … filePerformance-Aware Scheduler Synthesis for Control Systems Rupak Majumdar 1;2,Indranil Saha and Majid Zamani 1University of

Not-So-Hard Real-Time Scheduling

Suppose we relax the scheduler:

In some rounds, the scheduler can decide not to execute atask.

The control input generated in the previous cycle is appliedto the plant.

Scheduling problem is easier.

But what happens to the controlled system?

If we ignore a control task too many times, the system maybecome unstable.

Even if the system is stable, what happens to theperformance?

EMSOFT 2011 Majumdar, Saha and Zamani Performance-Aware Scheduler Synthesis 8/24

Page 11: Performance-Aware Scheduler Synthesis for Control … filePerformance-Aware Scheduler Synthesis for Control Systems Rupak Majumdar 1;2,Indranil Saha and Majid Zamani 1University of

Model of a Control System with Packet Dropouts

Plant

x(k+1)=Ax(k)+B1w(k)+B2u(k)y(k)=Cx(k)

w y

KS2

S1

xu

When switch is in position S1 : u(k) = −Kx(k).

When switch is in position S2 : u(k) = u(k − 1).

EMSOFT 2011 Majumdar, Saha and Zamani Performance-Aware Scheduler Synthesis 9/24

Page 12: Performance-Aware Scheduler Synthesis for Control … filePerformance-Aware Scheduler Synthesis for Control Systems Rupak Majumdar 1;2,Indranil Saha and Majid Zamani 1University of

Successful Transmission Rate

Plant

x(k+1)=Ax(k)+B1w(k)+B2u(k)y(k)=Cx(k)

w y

KS2

S1

xu

The successful transmission rate is the rate at which the switch is inposition S1. The successful transmission rate r is given by

r = limL→∞

1L

L∑k=0

(2− s(k)).

The dropout rate means the rate at which the switch is in S2.

If the successful transmission rate is r , its dropout rate is 1− r .

EMSOFT 2011 Majumdar, Saha and Zamani Performance-Aware Scheduler Synthesis 10/24

Page 13: Performance-Aware Scheduler Synthesis for Control … filePerformance-Aware Scheduler Synthesis for Control Systems Rupak Majumdar 1;2,Indranil Saha and Majid Zamani 1University of

Successful Transmission Rate

Plant

x(k+1)=Ax(k)+B1w(k)+B2u(k)y(k)=Cx(k)

w y

KS2

S1

xu

The successful transmission rate is the rate at which the switch is inposition S1. The successful transmission rate r is given by

r = limL→∞

1L

L∑k=0

(2− s(k)).

The dropout rate means the rate at which the switch is in S2.

If the successful transmission rate is r , its dropout rate is 1− r .

EMSOFT 2011 Majumdar, Saha and Zamani Performance-Aware Scheduler Synthesis 10/24

Page 14: Performance-Aware Scheduler Synthesis for Control … filePerformance-Aware Scheduler Synthesis for Control Systems Rupak Majumdar 1;2,Indranil Saha and Majid Zamani 1University of

Relate Successful Transmission Rate to Stability

Theorem [Branicky et al.-CDC’02]Consider the control system with packet loss:

Plant : x [k + 1] = Ax [k ] + B1w [k ]+ B2(drop?u[k − 1] : u[k ])

Controller : u[k ] = Kx [k ]

Assume that r is the successful transmission rate and theclosed loop system with no dropout and no disturbance isstable.The LTI control system with dropout, with no disturbance, isexponentially stable for all r > rmin

where rmin = 11−γ1/γ2

,γ1 = log [maxi |λi(A− B2K )|],

and γ2 = log [maxi |λi(A)|].λi(A) is the i-th eigen-value of matrix A.

EMSOFT 2011 Majumdar, Saha and Zamani Performance-Aware Scheduler Synthesis 11/24

Page 15: Performance-Aware Scheduler Synthesis for Control … filePerformance-Aware Scheduler Synthesis for Control Systems Rupak Majumdar 1;2,Indranil Saha and Majid Zamani 1University of

Performance Criteria: L∞ to RMS Gain

For a discrete-time LTI control system, the L∞ to RMS inducedgain from disturbance w to output y [Hassibi et al.-CDC’99] isdefined as follows:

sup‖w‖∞ 6=0,X(0)=0

(lim supl→∞

1l∑l

j=0 yT (j)y(j)) 1

2

‖w‖∞

where ‖w‖∞ = sup{‖w(k)‖2, k ≥ 0},

and ‖w(k)‖2 =√

wT (k)w(k).

The L∞ to RMS induced gain is a performance criterionshowing the effect of the disturbance on the output of theplants.

The Lower is the gain, the better is the performance.EMSOFT 2011 Majumdar, Saha and Zamani Performance-Aware Scheduler Synthesis 12/24

Page 16: Performance-Aware Scheduler Synthesis for Control … filePerformance-Aware Scheduler Synthesis for Control Systems Rupak Majumdar 1;2,Indranil Saha and Majid Zamani 1University of

Performance Criteria: L∞ to RMS Gain

For a discrete-time LTI control system, the L∞ to RMS inducedgain from disturbance w to output y [Hassibi et al.-CDC’99] isdefined as follows:

sup‖w‖∞ 6=0,X(0)=0

(lim supl→∞

1l∑l

j=0 yT (j)y(j)) 1

2

‖w‖∞

where ‖w‖∞ = sup{‖w(k)‖2, k ≥ 0},

and ‖w(k)‖2 =√

wT (k)w(k).

The L∞ to RMS induced gain is a performance criterionshowing the effect of the disturbance on the output of theplants.

The Lower is the gain, the better is the performance.EMSOFT 2011 Majumdar, Saha and Zamani Performance-Aware Scheduler Synthesis 12/24

Page 17: Performance-Aware Scheduler Synthesis for Control … filePerformance-Aware Scheduler Synthesis for Control Systems Rupak Majumdar 1;2,Indranil Saha and Majid Zamani 1University of

Performance Criteria: L∞ to RMS Gain

For a discrete-time LTI control system, the L∞ to RMS inducedgain from disturbance w to output y [Hassibi et al.-CDC’99] isdefined as follows:

sup‖w‖∞ 6=0,X(0)=0

(lim supl→∞

1l∑l

j=0 yT (j)y(j)) 1

2

‖w‖∞

where ‖w‖∞ = sup{‖w(k)‖2, k ≥ 0},

and ‖w(k)‖2 =√

wT (k)w(k).

The L∞ to RMS induced gain is a performance criterionshowing the effect of the disturbance on the output of theplants.

The Lower is the gain, the better is the performance.EMSOFT 2011 Majumdar, Saha and Zamani Performance-Aware Scheduler Synthesis 12/24

Page 18: Performance-Aware Scheduler Synthesis for Control … filePerformance-Aware Scheduler Synthesis for Control Systems Rupak Majumdar 1;2,Indranil Saha and Majid Zamani 1University of

Relate Successful Transmission Rate to Performance

Theorem

Consider the discrete time LTI control system with thesuccessful transmission rate r . The L∞ to RMS gain is lessthan positive constant γ if there exists a piecewise continuousfunction V : Rn+m → R≥0(n and m are dimensions of statespace and control input set respectively), such that V (0) = 0,and γ1, γ2 ∈ R such that

rγ21 + (1− r)γ2

2 < γ2

and

V(

AiX + B1iw)− V (X ) ≤ γ2

i wT w − yT y , for i = 1,2.

We can find upper bound on the gain for different successfultransmission rates through convex optimization.

EMSOFT 2011 Majumdar, Saha and Zamani Performance-Aware Scheduler Synthesis 13/24

Page 19: Performance-Aware Scheduler Synthesis for Control … filePerformance-Aware Scheduler Synthesis for Control Systems Rupak Majumdar 1;2,Indranil Saha and Majid Zamani 1University of

Relate Successful Transmission Rate to Performance

Theorem

Consider the discrete time LTI control system with thesuccessful transmission rate r . The L∞ to RMS gain is lessthan positive constant γ if there exists a piecewise continuousfunction V : Rn+m → R≥0(n and m are dimensions of statespace and control input set respectively), such that V (0) = 0,and γ1, γ2 ∈ R such that

rγ21 + (1− r)γ2

2 < γ2

and

V(

AiX + B1iw)− V (X ) ≤ γ2

i wT w − yT y , for i = 1,2.

We can find upper bound on the gain for different successfultransmission rates through convex optimization.

EMSOFT 2011 Majumdar, Saha and Zamani Performance-Aware Scheduler Synthesis 13/24

Page 20: Performance-Aware Scheduler Synthesis for Control … filePerformance-Aware Scheduler Synthesis for Control Systems Rupak Majumdar 1;2,Indranil Saha and Majid Zamani 1University of

Performance vs. Successful Transmission Rates

Performance is Notmonotonic with respectto successfultransmission rate.→ Increasing resourcesmay not make theperformance better.

Moral: An end-to-end argument can give a better overall systemperformance, even with lower resources.

EMSOFT 2011 Majumdar, Saha and Zamani Performance-Aware Scheduler Synthesis 14/24

Page 21: Performance-Aware Scheduler Synthesis for Control … filePerformance-Aware Scheduler Synthesis for Control Systems Rupak Majumdar 1;2,Indranil Saha and Majid Zamani 1University of

Performance vs. Successful Transmission Rates

Performance is Notmonotonic with respectto successfultransmission rate.→ Increasing resourcesmay not make theperformance better.

Moral: An end-to-end argument can give a better overall systemperformance, even with lower resources.

EMSOFT 2011 Majumdar, Saha and Zamani Performance-Aware Scheduler Synthesis 14/24

Page 22: Performance-Aware Scheduler Synthesis for Control … filePerformance-Aware Scheduler Synthesis for Control Systems Rupak Majumdar 1;2,Indranil Saha and Majid Zamani 1University of

Eligible Successful Transmission Rates

A successful transmission rate ris called eligible if it satisfies thefollowing two conditions:

r ≥ rmin, where rmin is theminimum rate to achievestability.

for each r ′ ∈ [rmin, r), wehave γ(r ′) ≥ γ(r).

γ(r) denote the upper bound onthe L∞ to RMS gain.

For a chosen discretization for r , the set of eligible rates are denotedby Ei for control system i .

EMSOFT 2011 Majumdar, Saha and Zamani Performance-Aware Scheduler Synthesis 15/24

Page 23: Performance-Aware Scheduler Synthesis for Control … filePerformance-Aware Scheduler Synthesis for Control Systems Rupak Majumdar 1;2,Indranil Saha and Majid Zamani 1University of

Eligible Successful Transmission Rates

A successful transmission rate ris called eligible if it satisfies thefollowing two conditions:

r ≥ rmin, where rmin is theminimum rate to achievestability.

for each r ′ ∈ [rmin, r), wehave γ(r ′) ≥ γ(r).

γ(r) denote the upper bound onthe L∞ to RMS gain.

For a chosen discretization for r , the set of eligible rates are denotedby Ei for control system i .

EMSOFT 2011 Majumdar, Saha and Zamani Performance-Aware Scheduler Synthesis 15/24

Page 24: Performance-Aware Scheduler Synthesis for Control … filePerformance-Aware Scheduler Synthesis for Control Systems Rupak Majumdar 1;2,Indranil Saha and Majid Zamani 1University of

Optimal Performance Scheduler Synthesis Problem

Choose rates ri ∈ Ei such that the system is schedulable andthe weighted sum wiγ(ri) is minimized.

wi ’s are weights chosen based on the priority of the controlsystems.

Formally,minimize

∑Ni=1 wiγ(ri)

such that ri ∈ Ei for each i ∈ {1, . . . ,N}∑Ni=1 ci ri/τi ≤ 1

The problem is NP-Hard.

- Reduction is from Multiple-Choice Knapsack Problem.

EMSOFT 2011 Majumdar, Saha and Zamani Performance-Aware Scheduler Synthesis 16/24

Page 25: Performance-Aware Scheduler Synthesis for Control … filePerformance-Aware Scheduler Synthesis for Control Systems Rupak Majumdar 1;2,Indranil Saha and Majid Zamani 1University of

Optimal Performance Scheduler Synthesis Problem

Choose rates ri ∈ Ei such that the system is schedulable andthe weighted sum wiγ(ri) is minimized.

wi ’s are weights chosen based on the priority of the controlsystems.

Formally,minimize

∑Ni=1 wiγ(ri)

such that ri ∈ Ei for each i ∈ {1, . . . ,N}∑Ni=1 ci ri/τi ≤ 1

The problem is NP-Hard.

- Reduction is from Multiple-Choice Knapsack Problem.

EMSOFT 2011 Majumdar, Saha and Zamani Performance-Aware Scheduler Synthesis 16/24

Page 26: Performance-Aware Scheduler Synthesis for Control … filePerformance-Aware Scheduler Synthesis for Control Systems Rupak Majumdar 1;2,Indranil Saha and Majid Zamani 1University of

Optimal Performance Scheduler Synthesis Problem

Choose rates ri ∈ Ei such that the system is schedulable andthe weighted sum wiγ(ri) is minimized.

wi ’s are weights chosen based on the priority of the controlsystems.

Formally,minimize

∑Ni=1 wiγ(ri)

such that ri ∈ Ei for each i ∈ {1, . . . ,N}∑Ni=1 ci ri/τi ≤ 1

The problem is NP-Hard.

- Reduction is from Multiple-Choice Knapsack Problem.

EMSOFT 2011 Majumdar, Saha and Zamani Performance-Aware Scheduler Synthesis 16/24

Page 27: Performance-Aware Scheduler Synthesis for Control … filePerformance-Aware Scheduler Synthesis for Control Systems Rupak Majumdar 1;2,Indranil Saha and Majid Zamani 1University of

Our Approach

Find rmin for each control system.

Find rmax for all control systems.

Maximize weighted sum of successful transmission rates.

Weights are based on the priorities of the control systems.

Select r ∈ [rmin, rmax ] such that the performance is the best.

Synthesize a scheduler based on the selected rates.

EMSOFT 2011 Majumdar, Saha and Zamani Performance-Aware Scheduler Synthesis 17/24

Page 28: Performance-Aware Scheduler Synthesis for Control … filePerformance-Aware Scheduler Synthesis for Control Systems Rupak Majumdar 1;2,Indranil Saha and Majid Zamani 1University of

Scheduler Synthesis with Task Drops

Given: Task Ti :

WCET ci .

Period τi .

Successful transmission rate ri = kiKi

Find: Schedule such that

Executions of Task i finish before the deadline.

The scheduler drops 1− r(i) fraction of packets in the longrun.

EMSOFT 2011 Majumdar, Saha and Zamani Performance-Aware Scheduler Synthesis 18/24

Page 29: Performance-Aware Scheduler Synthesis for Control … filePerformance-Aware Scheduler Synthesis for Control Systems Rupak Majumdar 1;2,Indranil Saha and Majid Zamani 1University of

Static Scheduling Problem in SMT

We encode constraints as an SMT problem:

Hyperperiod = {lcm of periods of all tasks (τi ’s)} × {lcm ofthe denominators of the rates (Ki ’s)}.

Boolean variable s[i , j]: if task i is scheduled in round j .

- If s[i , j] = 1, then wcet ci slots in the j ’th periodallocated to task i .

Variable t [i , j]: time when task of controller i in the j ’thperiod starts.

Fraction of the number of periods in the hyperperiod inwhich task i is chosen = r(i).

A task should be scheduled after it is generated andshould finish before the end of the period.

A slot should not be assigned to multiple tasks.

EMSOFT 2011 Majumdar, Saha and Zamani Performance-Aware Scheduler Synthesis 19/24

Page 30: Performance-Aware Scheduler Synthesis for Control … filePerformance-Aware Scheduler Synthesis for Control Systems Rupak Majumdar 1;2,Indranil Saha and Majid Zamani 1University of

Finding the Maximal Transmission Rates

Problem: What is the maximum successful transmission ratesfor the control systems such that all packets can be scheduled?

Solution: Solving a maximization problem.

Constraints are same as the previous problem, only therates are treated as variables.

The objective function is the weighted sum of the ratevariables.

- Weights are derived from priorities.

Solve the optimization problem using bisection method andsolving a series of feasibility problems.

EMSOFT 2011 Majumdar, Saha and Zamani Performance-Aware Scheduler Synthesis 20/24

Page 31: Performance-Aware Scheduler Synthesis for Control … filePerformance-Aware Scheduler Synthesis for Control Systems Rupak Majumdar 1;2,Indranil Saha and Majid Zamani 1University of

Example: Inverted Pendulum

x = Ax + B1w + B2u

y = Cx

A =

»0 1gl

ρ

ml2

–B2 =

»01

ml

–,

B1 =

»0.10

–C = [0.001, 0].

x1 - the angular position

x2 - the angular velocity of the point mass

u - the applied force (control input)

w - the disturbance input

m - the mass

l - the length of the rod

g - acceleration due to gravity

ρ - the rotational friction coefficient

Systems Mass (kg) Length(m) Priority Controller Sampling ComputationGain Time (s) Time (s)

System 1 0.50 0.20 1 [5.1, -2.5] 0.010 0.005System 2 0.50 0.35 2 [5.25, -1.1893] 0.015 0.005System 3 0.50 0.50 3 [5.4, -0.45] 0.020 0.005

rmin,1 = 0.7651, rmin,2 = 0.6375, and rmin,3 = 0.6589

rmax,1 = 1.00, rmax,2 = 0.90, and rmax,3 = 0.70

ropt,1 = 0.85, ropt,2 = 0.85, and ropt,3 = 0.70

EMSOFT 2011 Majumdar, Saha and Zamani Performance-Aware Scheduler Synthesis 21/24

Page 32: Performance-Aware Scheduler Synthesis for Control … filePerformance-Aware Scheduler Synthesis for Control Systems Rupak Majumdar 1;2,Indranil Saha and Majid Zamani 1University of

Example: Inverted Pendulum

x = Ax + B1w + B2u

y = Cx

A =

»0 1gl

ρ

ml2

–B2 =

»01

ml

–,

B1 =

»0.10

–C = [0.001, 0].

x1 - the angular position

x2 - the angular velocity of the point mass

u - the applied force (control input)

w - the disturbance input

m - the mass

l - the length of the rod

g - acceleration due to gravity

ρ - the rotational friction coefficient

Systems Mass (kg) Length(m) Priority Controller Sampling ComputationGain Time (s) Time (s)

System 1 0.50 0.20 1 [5.1, -2.5] 0.010 0.005System 2 0.50 0.35 2 [5.25, -1.1893] 0.015 0.005System 3 0.50 0.50 3 [5.4, -0.45] 0.020 0.005

rmin,1 = 0.7651, rmin,2 = 0.6375, and rmin,3 = 0.6589

rmax,1 = 1.00, rmax,2 = 0.90, and rmax,3 = 0.70

ropt,1 = 0.85, ropt,2 = 0.85, and ropt,3 = 0.70

EMSOFT 2011 Majumdar, Saha and Zamani Performance-Aware Scheduler Synthesis 21/24

Page 33: Performance-Aware Scheduler Synthesis for Control … filePerformance-Aware Scheduler Synthesis for Control Systems Rupak Majumdar 1;2,Indranil Saha and Majid Zamani 1University of

Example: Inverted Pendulum

x = Ax + B1w + B2u

y = Cx

A =

»0 1gl

ρ

ml2

–B2 =

»01

ml

–,

B1 =

»0.10

–C = [0.001, 0].

x1 - the angular position

x2 - the angular velocity of the point mass

u - the applied force (control input)

w - the disturbance input

m - the mass

l - the length of the rod

g - acceleration due to gravity

ρ - the rotational friction coefficient

Systems Mass (kg) Length(m) Priority Controller Sampling ComputationGain Time (s) Time (s)

System 1 0.50 0.20 1 [5.1, -2.5] 0.010 0.005System 2 0.50 0.35 2 [5.25, -1.1893] 0.015 0.005System 3 0.50 0.50 3 [5.4, -0.45] 0.020 0.005

rmin,1 = 0.7651, rmin,2 = 0.6375, and rmin,3 = 0.6589

rmax,1 = 1.00, rmax,2 = 0.90, and rmax,3 = 0.70

ropt,1 = 0.85, ropt,2 = 0.85, and ropt,3 = 0.70

EMSOFT 2011 Majumdar, Saha and Zamani Performance-Aware Scheduler Synthesis 21/24

Page 34: Performance-Aware Scheduler Synthesis for Control … filePerformance-Aware Scheduler Synthesis for Control Systems Rupak Majumdar 1;2,Indranil Saha and Majid Zamani 1University of

Scalability

Number of Sampling Computation tm tsPendulums Time Time

3 10ms 5ms 3.548s 0.313s4 15ms 5ms 5.948s 0.591s5 20ms 5ms 1m34.576s 1.003s6 25ms 5ms 5m20.364s 1.702s7 30ms 5ms 11m5.501s 5.945s8 35ms 5ms 12m39.703s 3.026s9 40ms 5ms 25m10.479s 5.123s10 45ms 5ms 11m0.143s 6.485s

Table: Time required to find maximal schedule and optimal schedule

tm - time required to find the maximal successful transmissionrates.ts - time required to find the final schedule.

EMSOFT 2011 Majumdar, Saha and Zamani Performance-Aware Scheduler Synthesis 22/24

Page 35: Performance-Aware Scheduler Synthesis for Control … filePerformance-Aware Scheduler Synthesis for Control Systems Rupak Majumdar 1;2,Indranil Saha and Majid Zamani 1University of

Related Works

Co-design of feedback controllers and schedulers

Choose the sampling time to obtain optimal performance[Seto et al.-RTSS’96, Årzen et al.-CDC’00, Zhang etal.-RTSS’08, and others]

Drop some control packets to make the scheduling problemeasier without compromising control properties(focus is on Stability)[Branicky et al.-CDC’02, Goswami et al.-ASP-DAC’11]

Marriage of control theoretic calculation and softwareverification/synthesis

Schedulability and stability[Weiss et al. - HSCC’09]

Fixed-point implementation of controller and stability[Anta et al. - EMSOFT’10]

EMSOFT 2011 Majumdar, Saha and Zamani Performance-Aware Scheduler Synthesis 23/24

Page 36: Performance-Aware Scheduler Synthesis for Control … filePerformance-Aware Scheduler Synthesis for Control Systems Rupak Majumdar 1;2,Indranil Saha and Majid Zamani 1University of

Conclusion

Contributions:We present theoretical results as well as a tool for aController-Scheduler Co-design problem.Co-design lets us relax constraints on the hard real-timescheduling problem, while potentially getting betterperformance from the system.

Future Work:Techniques can be generalized with other sources of error,such as quantization errors or additional network effects.Explore how dynamic scheduling policies interact with ourcontrol-theoretic analysis.Extend our results to more complex hybrid systems withseveral discrete modes.

EMSOFT 2011 Majumdar, Saha and Zamani Performance-Aware Scheduler Synthesis 24/24

Page 37: Performance-Aware Scheduler Synthesis for Control … filePerformance-Aware Scheduler Synthesis for Control Systems Rupak Majumdar 1;2,Indranil Saha and Majid Zamani 1University of

Conclusion

Contributions:We present theoretical results as well as a tool for aController-Scheduler Co-design problem.Co-design lets us relax constraints on the hard real-timescheduling problem, while potentially getting betterperformance from the system.

Future Work:Techniques can be generalized with other sources of error,such as quantization errors or additional network effects.Explore how dynamic scheduling policies interact with ourcontrol-theoretic analysis.Extend our results to more complex hybrid systems withseveral discrete modes.

EMSOFT 2011 Majumdar, Saha and Zamani Performance-Aware Scheduler Synthesis 24/24