ee5900 advanced embedded system for smart infrastructure

Post on 25-Feb-2016

49 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

DESCRIPTION

EE5900 Advanced Embedded System For Smart Infrastructure. Computationally Efficient Smart Home Scheduling. 3. 1. 2. 4. 5. Case Study. Conclusion. Smart Home. Cloud Computing. Algorithm. Outline. 2. Smart Home. Power Line. Communication Line. 3. End. Start. Dish washer. 13:00. - PowerPoint PPT Presentation

TRANSCRIPT

EE5900 Advanced Embedded System For Smart Infrastructure

Computationally Efficient Smart Home Scheduling

Smart Home1

Cloud Computing2

Case Study4

Algorithm3

Outline

2

Conclusion5

Smart Home

3

Power Line

Communication Line

Landry machineDish washer

PHEVAC

Start End

……

13:00 18:0009:00 18:00

08:0018:0017:00 N/A

4

Home Appliance (HA) in Smart Home

5

Non-schedulable HA Restrictive-schedulable HA

Full-schedulable HA

Multiple Power Levels

6

350 W

Power level

500 W820 W

1350 W

http://www.supplyairconditioner.com/1-4-9-split-wall-mounted-air-conditioner.html

Multiple Working Stages

7

Working cycles

Prewash

Washing

Rinsing

Spinning

Assume all stages have same working frequency for simplicity Partition the whole task to multiple subtasks with precedence constraints

Drying

Plug-in Hybrid Electric Vehicles (PHEV)

8

Powered by an Electric Motor and Engine

• Internal combustion engine uses alternative or conventional fuel

• Battery charged by outside electric power source, engine, or regenerative breaking

• During urban driving, most power comes from stored electricity. Long trips require the engine

Contemporary Hybrids

9

Toyota PriusToyota Camry Toyota Highlander Honda Insight

Lexus RX400h Lexus GS450h

Honda Civic Honda Accord

Saturn Vue Chevy Silverado

Ford Escape

Charging of PHEV

10

Level 1: 120 V, alternating current (AC) plug; dedicated circuit Level 2: 240 V, AC plug and uses the same connector on the vehicle as Level 1 Level 3: In development; faster AC charging 

Existing Products of Battery

Accord PHEV 120-volt: less than 3 hours 240-volt: one hour

Toyata PHEV 120-volt: less than 3 hours 240-volt: 1.5 hours

Quick charge to 80% needs 30 minutes.

11

Dynamic Pricing from Utility Company

12

https://rrtp.comed.com/live-prices/?date=20130404

Dynamic Voltage and Frequency Scaling (DVFS)

13

10 cents/kwh 5 cents / kwh

5 kwh

10 kwh

Power Powerr

Time Time1 2 1 2 3

(a) (b)

10 cents/kwh 5 cents / kwh

cost = 10 kwh * 10 cents/kwh = 100 cents cost = 5 kwh * 10 cents/kwh + 5 kwh * 5 cents/kwh = 75 cents

Smart Home Scheduling (SHS)

14

Given n home appliances, to schedule them for monetary cost minimization satisfying the total energy constraint and deadline constraints

Demand Side Management– when to launch a home appliance– at what frequency

– The variable frequency drive (DVFS) is to control the rotational speed of an alternating current (AC) electric motor through controlling the frequency of the electrical power supplied to the motor

– for how long

Benefit of Smart Home

15

– Reduce monetary expense

– Reduce peak load

Smart Home Scheduling (SHS)

16

Home appliance level

User level

Community level

Smart Home Scheduling (SHS)

Home appliance level

User level

Community level

17

Single Home appliance Scheduling

18

Non-schedulable HA

Consider the non-schedulable home appliance as fix energy consumption

Single Home appliance Scheduling

19

For restrictive-schedulable home appliance, set start time to be earlier than the user’s requirement.For example, in summer, user wants to come back to home at 5pm. The AC should be on before 5pm.

Restrictive-schedulable HA

Single Home appliance Scheduling

20

For full-schedulable home appliance, one needs to schedule when to launch a home appliance at what frequency considering DVFS for how long to minimize monetary cost satisfying that the total energy is consumed.

Full-schedulable HA

Home Appliance Definition

21

Ts: Start time Te: End time Pi: Power level E: Total required energy : Unit price of time slot t

Dynamic Programming

22

Given a home appliance, one processes time slot one by one for all possibilities until the last time slot and choose the best solution 𝑇 𝑠 𝑇 𝑠+1 𝑇 𝑠+2 𝑇 𝑒−1 𝑇 𝑒

0

𝑃1

𝑃2

0

𝑃1

𝑃2

0

𝑃1

𝑃2

Choose the solution with total energy equal to E and minimal monetary cost

Characterizing

23

For a solution in time slot i, energy consumption e and cost c uniquely characterize its state

Time slot i Time slot i+1(ei, ci) (ei+1, ci+1)

Pruning

24

For one time interval, (e1, c1) will dominate solution (e2, c2), if e1>= e2 and c1<= c2

Time slot i(15, 20)

(15, 25)

(11, 22)

Algorithmic Flow of Dynamic Programming

25

Calculate all possible (e, c)

Prune all dominated (e, c)

Choose the result (e, c) which e = E and c is minimal

Schedule

Start time t = Ts

Yes

Next time slott = t + 1

End time t = TeNo

No Schedulee < E

Dynamic Programming based Appliance Optimization

26

(1,2)

(2,4)

(3,6)

(1,1)

(2,2)

(3,3)

0 t1 t2

(6, 9) (5, 8)(4, 7)

(5, 7) (4, 6)(3, 5)

(4, 5) (3, 4)(2, 3)

(0,0) (0,0)

(3, 3) (2, 2)(1, 1)

– # of distinct power levels = k– # time slots = m)( 2kmORuntime :

Price

Time

Dynamic Programming returns optimal solution

𝛼1=2 𝛼2=1

Power level: {1, 2, 3}

Smart Home Scheduling (SHS)

Home appliance level

User level

Community level

27

Scheduling Among Multiple Appliances for One User

28

Determine Scheduling Appliances Order

Schedule Current Task

Update Upper Bound of Each Time Interval

An appliance

Schedule

Appliances

Not all the appliance(s) processed

All appliance process

Smart Home Scheduling (SHS)

Home appliance level

User level

Community level

29

0 2 4 6 8 10 12 14 16 18 20 22 2402468

101214

Price CurveGame Approach

User 1 User 2 User m.............

A game approach is deployed where each customer acts as a player.

30

0 2 4 6 8 10 12 14 16 18 20 22 2402468

101214

Price Curve

Game Theory

31

For every player in a game, there is a set of strategies and a payoff function, which is the profit of the player.

Each player choose actions from the set of strategies in order to maximize its payoff.

When no player can increase its payoff without changing the actions of others, Nash Equilibrium is reached.

Game Formulation in Community Level

32

Players: All the customers in the community

Payoff:

Strategy: Choose power levels and launch time to maximize payoff while the constraint conditions can be satisfied

Algorithmic Flow in Community Level

33

Each user schedules their own appliances separately

All users share information with each other

Each user reschedules their own appliances separately

Schedule

Equilibrium

Yes

No

Multiple Customer Scheduling

34

u1 u2 u3

r1 r2 r3

Communication

FPGA First iteration

Communication

FPGA FPGA

u1 u2 u3

Second iterationFPGA FPGA FPGA

……Schedule

• Low frequency• High cost• Hard to maintain

Equilibrium

……

Cloud Computing

35

In Cloud Computing, a new class of network based computing takes place over the Internet

It is a collection/group of integrated and networked hardware, software and Internet infrastructure

Why Cloud Computing

36

Advantages– Low cost– High availability, flexibility, elasticity

– You can increase or decrease capacity within minutes, not hours or days;

– You can commission one, hundreds or even thousands of server instances simultaneously.

– Your application can automatically scale itself up and down depending on its needs.

– Free of maintenance– Security

Service modelsSoftware as a

Service (SaaS)Platform as a

Service (PaaS)Infrastructure as a

Service (IaaS)

Google App Engine

SalesForce CRMLotusLive

37

Cloud Taxonomy

38

Some Commercial Cloud Offerings

39

Amazon EC2

40

Amazon EC2 is one large complex web service. EC2 provided an API for instantiating computing

instances with any of the operating systems supported.

It can facilitate computations through Amazon Machine Images (AMIs) for various other models.

Google App Engine

41

This is more a web interface for a development environment that offers a one stop facility for design, development and deployment Java and Python-based applications in Java and Python.

Google offers the same reliability, availability and scalability at par with Google’s own applications

Interface is software programming based

Windows Azure

42

Enterprise-level on-demand capacity builder Fabric of cycles and storage available on-request for a cost You have to use Azure API to work with the infrastructure

offered by Microsoft

In Home vs. Cloud Computing Scheduling

43

Cost– High performance FPGA vs. Low performance FPGA + Cloud

– Low performance FPGA vs. Low performance FPGA + Cloud Upgrade

– Upgrade FPGA vs. Cloud service Maintenance

– Broken FPGA– Cloud is free of maintenance

Runtime– In Home vs. Cloud Computing

Estimation of Computation Time of Low Performance FPGA FPGA in smart home: 250 MHz

– 1000 users with 1000 FPGA– Runtime is approximately 10 seconds in one iteration– Communication time: 10kb/250kb/s=0.04s– 100 iterations: (10+0.04)*100 = 1004 sec = 16.73 min

Since the pricing policy is updated each 15 minutes by most utilities, 16.73 minutes are unacceptable.

Why not using some quite high performance machines in each home?

44

Cloud Based Distributed Algorithm

45

u1 u2 u3

r1 r2 r3

Communication

FPGA

First iteration

Communication

FPGA FPGA

……Schedule Equilibrium

……

FPGA FPGA FPGA

r1 r2 r3

u1 u2 u3

Cloud

Monetary Cost Aware Scheduling Problem

There are different types of machines in cloud with different monetary cost, frequencies and storage

One is required to schedule those users’ tasks to appropriate machines to minimize the monetary cost of the distributed algorithm satisfying the timing constraints

46

Runtime (s) u1 u2 u3 u4

FPGA 12 14 10 15

2 GHz 1.5 1.75 1.25 1.88

3 GHz 1 1.17 0.83 1.25

An example I

47

FPGA: 250 MHz CPU in cloud: 2 GHz with $0.02/hour, 3 GHz with $0.06/hour Timing constraints Tc = 5

The monetary cost C = 1.25 / 3600 * 0.02 + (1+1.17+1.25) / 3600 * 0.06 = $6.39 * 10 -5.

If one schedules tasks of user 3 to CPU with 2 GHz and schedules tasks of user 1, 2 and 4 to CPU with 3 GHz, then

The runtime T = max{1.25, 1+1.17+1.25} = 3.42 < Tc.

An example II

48

FPGA: 250 MHz CPU in cloud: 2 GHz with $0.02/hour, 3 GHz with $0.06/hour Timing constraints Tc = 5

u1 u2 u3 u4

Runtime (s) 12 14 10 15

2 GHz (s) 1.5 1.75 1.25 1.88

3 GHz (s) 1 1.17 0.83 1.25

The monetary cost C = (1.5 + 1.75) / 3600 * 0.02 + (0.83 + 1.25) / 3600 * 0.06 = $5.27 * 10 -5.

If one schedules tasks of user 1 and 2 to CPU with 2 GHz and schedules tasks of user 3 and 4 to CPU with 3 GHz, then

The runtime T = max{1.5 + 1.75, 0.83 + 1.25} = 3.25 < Tc.

Problem Formulation

49

Given users in smart home scheduling problems with runtime running in local machine with frequency , types of machines in cloud with frequency and monetary cost , one needs to schedule these users’ tasks to machines such that the total monetary cost is minimized and maximum runtime over all the machines satisfies the timing constraints.

Monetary Cost Problem Formulation

50

Linear Programming With Rounding

51

For each , round the largest to be 1, others to 0

Algorithmic Flow

52

Solve the continuous fashion problem combinatorially

Discretize the continuous

solution

Flag all machine to be available

Assign task fractionally to the available machine with highest

ratio of /𝒄 𝒇Sort all machines increasingly by by

ratio of /𝒄 𝒇 Runtime of machine is reaching TC

Flag the machine to be unavailabe

Yes

No

Combinatorial solving

……

f1 f2 fm-1 fm

TC

……

53

Tc – Timing constraintsfi - Frequency of cloud machines

Discretization

54

f1 f2

TC

12

3

f1 f2

TC

12

3T’

(a) (b)

3

Since we always round fractional scheduled task to machine with smaller ratio , the total monetary cost must be no greater than the optimal solution while the timing constraint may be violated by𝑇 𝐴𝐿𝐺≤𝑇𝐶+max 𝑡 𝑖 ∙(

𝑓 𝑚𝑎𝑥

𝑓 𝑚𝑖𝑛−1)

Theorem

55

There exists an algorithm such that the total monetary cost must be no greater than the solution of continuous problem while the timing constraint may be violated by , running in time

High Level Algorithm

56

The distributed algorithm needs multiple iterations to achieve the equilibrium, thus the scheduling algorithm needs to handle all the iterations repeatedly.

u1 u2 u3

r1 r2 r3

Communication

FPGA

First iteration

Communication

FPGA FPGA

……Schedule Equilibrium

……

FPGA FPGA FPGA

r1 r2 r3

u1 u2 u3

Cloud

FPGA & Amazon EC2

Low performance FPGA in smart home: 250 MHz Computer in cloud:

– 1 core with 1 ECU (approx.. 1.7 GHz, $0.034 per hour)– 1 core with 2 ECU (approx.. 3.5 GHz, $0.068 per hour)– 2 cores with 2 ECU (approx.. 3.5 GHz, $0.136 per hour)– 4 cores with 2 ECU (approx.. 3.5 GHz, $0.271 per hour)

Communication time: 10kb/250kb/s=0.04s

Observing that there are machines with multiple cores, we can schedule multiple tasks to one machine with multiple cores at the same time

57

Comparison for 1000 users

W/o cloud– 1000 users with 1000 FPGA– Runtime is approximately 14 seconds in one iteration– Communication time: 10kb/250kb/s=0.04s– 100 iterations: (10+0.04)*100 = 1004 sec = 16.73 min

W/ cloud of 1 core with 1 ECU – 1000 computers in cloud– Runtime is approximately 2 seconds in one iteration– Communication time: 10kb/250kb/s=0.04s– 100 iterations: (2+0.04)*100 = 3.4 min (4.92X)

58

Comparison for 1000 users

W/ cloud of 1 core with 2 ECU – 1000 computers in cloud– Runtime is approximately 1 seconds in one iteration– Communication time: 10kb/250kb/s=0.04s– 100 iterations: (1+0.04)*100 = 1.7 min (9.84X)

W/ cloud of 4 core with 2 ECU (Parallel in four cores)– 250 computers in cloud– Runtime is approximately 1 seconds in one iteration– Communication time: 10kb/250kb/s=0.04s– 100 iterations: (1+0.04)*100 = 1.73 min (9.67X)

59

Case Study Setup

60

Low performance FPGA in smart home: 250 MHz, $200 High performance FPGA in smart home: 1250 MHz, $2000 Computer in cloud:

– 1 core with 1 ECU (approx.. 1.7 GHz, $61/yr upfront, $0.034/hr)– 1 core with 2 ECU (approx.. 3.5 GHz, $122/yr upfront, $0.068/hr)– 2 cores with 2 ECU (approx.. 3.5 GHz, $243/yr upfront, $0.136/hr)– 4 cores with 2 ECU (approx.. 3.5 GHz, $486/yr upfront, $0.271/hr)

http://www.xilinx.com/support/documentation/data_sheets/ds160.pdfhttp://www.amazon.com/C3-DRK-Digital-Radio-Kit/dp/B001KBPIOQ/ref=sr_1_8?s=pc&ie=UTF8&qid=1365106998&sr=1-8&keywords=fpgahttp://aws.amazon.com/ec2/pricing/

Case Study Setup (Cont.)

61

Home appliances category – Restrictive-schedulable

– Full-schedulable

– Non-schedulable

Frequency level: 20Hz, 40Hz, 60Hz, 80Hz

Start time: 16:00End time: 18:00

Start time: 0:00End time: 23:59

Start time: 9:00

Frequency level: 20Hz, 40Hz, 60Hz, 80Hz

End time: 18:00

Case Study Setup (Cont.)

62

200 to 1000 users in one community Each user could have 10 – 30 home appliance

– 30% of restrictive-schedulable home appliance– 50% of full-schedulable home appliance– 20% of non-schedulable home appliance

An Example – One User

63

HA Start time End time Total energy (kW.h)

Power levels (W)

AC 17:00 20:00 8 {400, 600, 800, 1000,

3000}Washer &

Dryer09:00 18:00 5 1000

Dish Washer 09:00 18:00 3 1000

PHEV 18:00 07:00 12 {1900, 3000, 20k, 240k}

Refrigerator 00:00 23:59 1.2 50

http://www .mpoweruk. com/electr icity_dema nd.htm

64

Total Bill – Monthly

n=20

0n=

400

n=60

0n=

800

n = 10

000

20406080

100120140160180200

Utility Bill W/o SHSUtility Bill w/ Low Performance FPGA In Home SHSUtility Bill w/ Cloud SHS

Dollars

65

Runtime

n=20

0n=

400

n=60

0n=

800

n = 10

0002468

1012141618

Runtime of Low per-formance FPGA In Home SHSRuntime of Cloud SHS

Minutes

66

High Performance FPGA

FPGA in smart home: 1250 MHz, $2000

Runtime– 1000 users with 1000 FPGA– Runtime is approximately 2 seconds in one iteration– Communication time: 10kb/250kb/s=0.04s– 100 iterations: (2+0.04)*100 = 204 sec = 3.4 min– No real time issue

67

Total Bill – First Year

n=20

0n=

400

n=60

0n=

800

n = 10

000

5001000150020002500300035004000

Utility Bill W/o SHSUtility Bill w/ High performance FPGA In Home SHSUtility Bill w/ Cloud SHS

Dollars

68

Total Bill – Ten Years

n=20

0n=

400

n=60

0n=

800

n = 10

000

5000

10000

15000

20000

25000

Utility Bill W/o SHSUtility Bill w/ High performance FPGA In Home SHSUtility Bill w/ Cloud SHS

Dollars

69

Total Bill – Ten Years Cloud computing service cost reduction

n=20

0n=

400

n=60

0n=

800

n = 10

000

5000

10000

15000

20000

25000

Utility Bill W/o SHSUtility Bill w/ High performance FPGA In Home SHSUtility Bill w/ Cloud SHS

Dollars

Cloud computing service cost reduction rate: 10%/yr

70

Total Bill – Ten Years FPGA Maintenance

n=20

0n=

400

n=60

0n=

800

n = 10

000

5000

10000

15000

20000

25000

Utility Bill W/o SHSUtility Bill w/ High performance FPGA In Home SHSUtility Bill w/ Cloud SHS

Dollars

FPGA maintenance cost: $50/yr

71

Total Bill – Ten Years FPGA Broken

n=20

0n=

400

n=60

0n=

800

n = 10

000

5000

10000

15000

20000

25000

Utility Bill W/o SHSUtility Bill w/ High performance FPGA In Home SHSUtility Bill w/ Cloud SHS

Dollars

FPGA broken rate: 2.8%http://homepages.cae.wisc.edu/~aminf/FCCM09%20-%20FPGA%20Design%20Analysis%20of%20the%20Clustering%20Algorithm%20for%20the%20CERN%20Large%20Hadron%20Collider.pdf

72

Total Bill – Ten Years US Dollars Inflation

Inflation rate of US dollars: 2%/yr

http://www.usinflationcalculator.com/inflation/historical-inflation-rates/

n=20

0n=

400

n=60

0n=

800

n = 10

000

5000

10000

15000

20000

25000

30000

Utility Bill W/o SHSUtility Bill w/ High performance FPGA In Home SHSUtility Bill w/ Cloud SHS

Dollars

Conclusion

73

According to case study, our approach by use of cloud can make several times speed up comparing to low performance FPGA based algorithms such that the timing constraints could be satisfied and archive 18.95% monetary cost reduction on average

If high performance FPGA is chosen, user needs to pay 58.3% on average more than bill without SHS in first year of buying FPGA; user will pay higher than cloud based scheme considering cost reduction of cloud computing, maintenance and broken of FPGA in first ten years

Overall, cloud computing is better than both low performance FPGA and high performance FPGA

Further Study

74

Design an algorithm to decide the number of machines in cloud to minimize the reservation cost

More case study will be conducted to generalize my conclusion

Thanks

75

top related