24
Automated Generation of Basic Custom Sensor-Based Embedded Computing Systems Guided by End-User Optimization Criteria Susan Lysecky Dept. of Electrical and Computer Engineering University of Arizona [email protected] Frank Vahid Dept. of Computer Science and Engineering University of California, Riverside [email protected] *Also with the Center for Embedded Computer Systems at UC Irvine This work is being supported by the National Science Foundation Grant CCR-0311026

Automated Generation of Basic Custom Sensor-Based Embedded Computing Systems Guided by End-User Optimization Criteria Susan Lysecky Dept. of Electrical

  • View
    218

  • Download
    1

Embed Size (px)

Citation preview

Page 1: Automated Generation of Basic Custom Sensor-Based Embedded Computing Systems Guided by End-User Optimization Criteria Susan Lysecky Dept. of Electrical

Automated Generation of Basic Custom Sensor-Based Embedded Computing Systems Guided by

End-User Optimization Criteria

Susan LyseckyDept. of Electrical and Computer

EngineeringUniversity of Arizona

[email protected]

Frank VahidDept. of Computer Science and

EngineeringUniversity of California, Riverside

[email protected]*Also with the Center for Embedded

Computer Systems at UC Irvine

This work is being supported by the National Science Foundation Grant CCR-0311026

Page 2: Automated Generation of Basic Custom Sensor-Based Embedded Computing Systems Guided by End-User Optimization Criteria Susan Lysecky Dept. of Electrical

Frank Vahid, UC Riverside / Susan Lysecky, Univ. of Arizona

http://www.cs.ucr.edu/eblocks 2 of 23

Trend: Smaller Lower-Cost Microprocessors

Today: tens of mm2, ~$1

Moore's Law – still going

Tomorrow: dust-sized, pennies

Can put in places previously undreamt of

Solve problems with new processor-based applications

http://www.templehealth.org/capsule/april_22_05/april2205_news03.htm

Courtesy of Joe Kahn

Page 3: Automated Generation of Basic Custom Sensor-Based Embedded Computing Systems Guided by End-User Optimization Criteria Susan Lysecky Dept. of Electrical

Frank Vahid, UC Riverside / Susan Lysecky, Univ. of Arizona

http://www.cs.ucr.edu/eblocks 3 of 23

Problem

Problem: End-users can't create custom sensor-based systems

Garage door

Left open at night – Oops!

AND

contact switch

light sensor

rx

LEDtx

Can't customize

completed

40%not

completed

60%

Senior comp. eng. students, 2

weeks

Hardhttp://

www.smarthome.com

Page 4: Automated Generation of Basic Custom Sensor-Based Embedded Computing Systems Guided by End-User Optimization Criteria Susan Lysecky Dept. of Electrical

Frank Vahid, UC Riverside / Susan Lysecky, Univ. of Arizona

http://www.cs.ucr.edu/eblocks 4 of 23

Goal and Solution

Solution: Put microprocessor inside previously "dumb" sensors and other components

AND

contact switch

light sensor

tx

Goal: Create off-the-shelf blocks end-users merely connect to build customized sensor-based systems

"dumb" light

sensormicro-

processormisc.

circuitry

eBlock

light sensorcontact

switchAND

tx

Page 5: Automated Generation of Basic Custom Sensor-Based Embedded Computing Systems Guided by End-User Optimization Criteria Susan Lysecky Dept. of Electrical

Frank Vahid, UC Riverside / Susan Lysecky, Univ. of Arizona

http://www.cs.ucr.edu/eblocks 5 of 23

Just Connect (and Configure) eBlocks to Build Customized Sensor-Based System

Garage Open at Night Cafeteria Food Alert

2-Input Logic

Splitter

Toggle

Button

LED

Button

LED

service line

kitchen

At garage door

Light Sensor

2-Input Logic

Magnetic Contact Switch

Green/ Red LEDOutside

Inside house

• No programming, no electronics knowledge, some configuration• Trick is that connections establish a simple computer network

- Packet-based communication of Boolean or integer data• The "wood and nails" of the electronic sensor world – can build variety of systems

Page 6: Automated Generation of Basic Custom Sensor-Based Embedded Computing Systems Guided by End-User Optimization Criteria Susan Lysecky Dept. of Electrical

Frank Vahid, UC Riverside / Susan Lysecky, Univ. of Arizona

http://www.cs.ucr.edu/eblocks 6 of 23

eBlocks Status

NSF-funded 2003-2007 Library of ~20 basic Boolean and integer

blocks Via trial and iteration with >500 users

CHI 2005, HCII 2005, ... Good success rates by end-users with no training

Blocks Sensors: Button, light sensor, motion sensor, ... Compute/Comm.: Logic, toggle, trip, prolong, ... Output: Beep, LED, relay, ...

Built >100 physical prototypes Can build a surprising variety of useful systems

Has limits, of course Off-the-shelf volume costs predicted to be $4-

$12 today, less each year (Harvard 2005 study) Prototypes last for 2 to 3 years on 2 AA batteries More info at http://www.cs.ucr.edu/eblocks

Page 7: Automated Generation of Basic Custom Sensor-Based Embedded Computing Systems Guided by End-User Optimization Criteria Susan Lysecky Dept. of Electrical

Frank Vahid, UC Riverside / Susan Lysecky, Univ. of Arizona

http://www.cs.ucr.edu/eblocks 7 of 23

Focus of this Paper: Graphical Simulator Physical Blocks

Welcome to the eBlocks Simulator! In this area, you’ll find helpful hints on creating your own designs.

Click and drag an eBlock off of the “Available eBlocks” panel to add it to your design.To connect two blocks, click and drag from an output port (colored circle) to an input port (gray circle).A connection can be destroyed by clicking on a connected port.To move a block around the workspace, click and drag its orange area.Blocks can be moved into the trash can to delete them.Green circles indicate that the port is sending a yes, red circles indicate that the port is sending a no, yellowCircles indicate that the port is sending an error signal, and gray circles denote an input port.

Graphical simulator Users can quickly

build correct virtual system, then convert to physical blocks

For the slightly more advanced user

Available eBlocks

Advanced ModeHide this panel

Compute/Communications

Prolonger

1 2 3 4 5 6 7 8 9

seconds

Once Yes, Stays Yes

rst

in

Toggle

Combine

AND OR

yes no

When A is yes no

B is

then the output is yes

Green/Red Light

Beeper

Output

Motion Sensor

Yes/No

Button

Light Sensor

Sensors

Available eBlocks

Advanced ModeHide this panel

Compute/Communications

Prolonger

1 2 3 4 5 6 7 8 9

seconds

Once Yes, Stays Yes

rst

in

Toggle

Combine

AND OR

yes no

When A is yes no

B is

then the output is yes

Motion Sensor

Yes/No

Button

Light Sensor

Sensors

Green/Red Light

Beeper

Output

Available eBlocks

Advanced ModeHide this panel

Green/Red Light

Beeper

Output

Motion Sensor

Yes/No

Button

Light Sensor

Sensors

Compute/Communications

Prolonger

1 2 3 4 5 6 7 8 9

seconds

Once Yes, Stays Yes

rst

in

Toggle

Combine

AND OR

yes no

When A is yes no

B is

then the output is yes

Page 8: Automated Generation of Basic Custom Sensor-Based Embedded Computing Systems Guided by End-User Optimization Criteria Susan Lysecky Dept. of Electrical

Frank Vahid, UC Riverside / Susan Lysecky, Univ. of Arizona

http://www.cs.ucr.edu/eblocks 8 of 23

eBlock Simulator

Welcome to the eBlocks Simulator! In this area, you’ll find helpful hints on creating your own designs.

Click and drag an eBlock off of the “Available eBlocks” panel to add it to your design.To connect two blocks, click and drag from an output port (colored circle) to an input port (gray circle).A connection can be destroyed by clicking on a connected port.To move a block around the workspace, click and drag its orange area.Blocks can be moved into the trash can to delete them.Green circles indicate that the port is sending a yes, red circles indicate that the port is sending a no, yellowCircles indicate that the port is sending an error signal, and gray circles denote an input port.

Graphical simulator User drags blocks

from pallets to workspace

Available eBlocks

Advanced ModeHide this panel

Compute/Communications

Prolonger

1 2 3 4 5 6 7 8 9

seconds

Once Yes, Stays Yes

rst

in

Toggle

Combine

AND OR

yes no

When A is yes no

B is

then the output is yes

Green/Red Light

Beeper

Output

Motion Sensor

Yes/No

Button

Light Sensor

Sensors

Available eBlocks

Advanced ModeHide this panel

Green/Red Light

Beeper

Output

Compute/Communications

Prolonger

1 2 3 4 5 6 7 8 9

seconds

Once Yes, Stays Yes

rst

in

Toggle

Combine

AND OR

yes no

When A is yes no

B is

then the output is yes

Motion Sensor

Yes/No

Button

Light Sensor

Sensors

Button

Page 9: Automated Generation of Basic Custom Sensor-Based Embedded Computing Systems Guided by End-User Optimization Criteria Susan Lysecky Dept. of Electrical

Frank Vahid, UC Riverside / Susan Lysecky, Univ. of Arizona

http://www.cs.ucr.edu/eblocks 9 of 23

eBlock Simulator

Welcome to the eBlocks Simulator! In this area, you’ll find helpful hints on creating your own designs.

Click and drag an eBlock off of the “Available eBlocks” panel to add it to your design.To connect two blocks, click and drag from an output port (colored circle) to an input port (gray circle).A connection can be destroyed by clicking on a connected port.To move a block around the workspace, click and drag its orange area.Blocks can be moved into the trash can to delete them.Green circles indicate that the port is sending a yes, red circles indicate that the port is sending a no, yellowCircles indicate that the port is sending an error signal, and gray circles denote an input port.

Graphical simulator User drags blocks

from pallets to workspace

Available eBlocks

Advanced ModeHide this panel

Compute/Communications

Prolonger

1 2 3 4 5 6 7 8 9

seconds

Once Yes, Stays Yes

rst

in

Toggle

Combine

AND OR

yes no

When A is yes no

B is

then the output is yes

Green/Red Light

Beeper

Output

Motion Sensor

Yes/No

Button

Light Sensor

Sensors

Button

Light Sensor

Page 10: Automated Generation of Basic Custom Sensor-Based Embedded Computing Systems Guided by End-User Optimization Criteria Susan Lysecky Dept. of Electrical

Frank Vahid, UC Riverside / Susan Lysecky, Univ. of Arizona

http://www.cs.ucr.edu/eblocks 10 of 23

eBlock Simulator

Welcome to the eBlocks Simulator! In this area, you’ll find helpful hints on creating your own designs.

Click and drag an eBlock off of the “Available eBlocks” panel to add it to your design.To connect two blocks, click and drag from an output port (colored circle) to an input port (gray circle).A connection can be destroyed by clicking on a connected port.To move a block around the workspace, click and drag its orange area.Blocks can be moved into the trash can to delete them.Green circles indicate that the port is sending a yes, red circles indicate that the port is sending a no, yellowCircles indicate that the port is sending an error signal, and gray circles denote an input port.

Graphical simulator User drags blocks

from pallets to workspace

Available eBlocks

Advanced ModeHide this panel

Compute/Communications

Prolonger

1 2 3 4 5 6 7 8 9

seconds

Once Yes, Stays Yes

rst

in

Toggle

Combine

AND OR

yes no

When A is yes no

B is

then the output is yes

Green/Red Light

Beeper

Output

Motion Sensor

Yes/No

Button

Light Sensor

Sensors

Button

Light Sensor

Available eBlocks

Advanced ModeHide this panel

Green/Red Light

Beeper

Output

Motion Sensor

Yes/No

Button

Light Sensor

Sensors

Compute/Communications

Prolonger

1 2 3 4 5 6 7 8 9

seconds

Once Yes, Stays Yes

rst

in

Toggle

Combine

AND OR

yes no

When A is yes no

B is

then the output is yes

Combine

AND OR

yes no

When A is yes no

B is

then the output is yes

Page 11: Automated Generation of Basic Custom Sensor-Based Embedded Computing Systems Guided by End-User Optimization Criteria Susan Lysecky Dept. of Electrical

Frank Vahid, UC Riverside / Susan Lysecky, Univ. of Arizona

http://www.cs.ucr.edu/eblocks 11 of 23

eBlock Simulator

Welcome to the eBlocks Simulator! In this area, you’ll find helpful hints on creating your own designs.

Click and drag an eBlock off of the “Available eBlocks” panel to add it to your design.To connect two blocks, click and drag from an output port (colored circle) to an input port (gray circle).A connection can be destroyed by clicking on a connected port.To move a block around the workspace, click and drag its orange area.Blocks can be moved into the trash can to delete them.Green circles indicate that the port is sending a yes, red circles indicate that the port is sending a no, yellowCircles indicate that the port is sending an error signal, and gray circles denote an input port.

Graphical simulator User drags blocks

from pallets to workspace

Available eBlocks

Advanced ModeHide this panel

Compute/Communications

Prolonger

1 2 3 4 5 6 7 8 9

seconds

Once Yes, Stays Yes

rst

in

Toggle

Combine

AND OR

yes no

When A is yes no

B is

then the output is yes

Green/Red Light

Beeper

Output

Motion Sensor

Yes/No

Button

Light Sensor

Sensors

Button

Light Sensor

Available eBlocks

Advanced ModeHide this panel

Green/Red Light

Beeper

Output

Motion Sensor

Yes/No

Button

Light Sensor

Sensors

Compute/Communications

Prolonger

1 2 3 4 5 6 7 8 9

seconds

Once Yes, Stays Yes

rst

in

Toggle

Combine

AND OR

yes no

When A is yes no

B is

then the output is yes

Combine

AND OR

yes no

When A is yes no

B is

then the output is yes

Available eBlocks

Advanced ModeHide this panel

Compute/Communications

Prolonger

1 2 3 4 5 6 7 8 9

seconds

Once Yes, Stays Yes

rst

in

Toggle

Combine

AND OR

yes no

When A is yes no

B is

then the output is yes

Motion Sensor

Yes/No

Button

Light Sensor

Sensors

Green/Red Light

Beeper

Output

Beeper

Page 12: Automated Generation of Basic Custom Sensor-Based Embedded Computing Systems Guided by End-User Optimization Criteria Susan Lysecky Dept. of Electrical

Frank Vahid, UC Riverside / Susan Lysecky, Univ. of Arizona

http://www.cs.ucr.edu/eblocks 12 of 23

Combine

AND OR

yes no

When A is yes no

B is

then the output is yes

eBlock Simulator

Welcome to the eBlocks Simulator! In this area, you’ll find helpful hints on creating your own designs.

Click and drag an eBlock off of the “Available eBlocks” panel to add it to your design.To connect two blocks, click and drag from an output port (colored circle) to an input port (gray circle).A connection can be destroyed by clicking on a connected port.To move a block around the workspace, click and drag its orange area.Blocks can be moved into the trash can to delete them.Green circles indicate that the port is sending a yes, red circles indicate that the port is sending a no, yellowCircles indicate that the port is sending an error signal, and gray circles denote an input port.

Graphical simulator User drags blocks

from pallets to workspace

User configures certain blocks by clicking on switches

Available eBlocks

Advanced ModeHide this panel

Compute/Communications

Prolonger

1 2 3 4 5 6 7 8 9

seconds

Once Yes, Stays Yes

rst

in

Toggle

Combine

AND OR

yes no

When A is yes no

B is

then the output is yes

Green/Red Light

Beeper

Output

Motion Sensor

Yes/No

Button

Light Sensor

Sensors

Button

Light Sensor

Available eBlocks

Advanced ModeHide this panel

Green/Red Light

Beeper

Output

Motion Sensor

Yes/No

Button

Light Sensor

Sensors

Compute/Communications

Prolonger

1 2 3 4 5 6 7 8 9

seconds

Once Yes, Stays Yes

rst

in

Toggle

Combine

AND OR

yes no

When A is yes no

B is

then the output is yes

Available eBlocks

Advanced ModeHide this panel

Compute/Communications

Prolonger

1 2 3 4 5 6 7 8 9

seconds

Once Yes, Stays Yes

rst

in

Toggle

Combine

AND OR

yes no

When A is yes no

B is

then the output is yes

Motion Sensor

Yes/No

Button

Light Sensor

Sensors

Green/Red Light

Beeper

Output

Beeper

Page 13: Automated Generation of Basic Custom Sensor-Based Embedded Computing Systems Guided by End-User Optimization Criteria Susan Lysecky Dept. of Electrical

Frank Vahid, UC Riverside / Susan Lysecky, Univ. of Arizona

http://www.cs.ucr.edu/eblocks 13 of 23

eBlock Simulator

Welcome to the eBlocks Simulator! In this area, you’ll find helpful hints on creating your own designs.

Click and drag an eBlock off of the “Available eBlocks” panel to add it to your design.To connect two blocks, click and drag from an output port (colored circle) to an input port (gray circle).A connection can be destroyed by clicking on a connected port.To move a block around the workspace, click and drag its orange area.Blocks can be moved into the trash can to delete them.Green circles indicate that the port is sending a yes, red circles indicate that the port is sending a no, yellowCircles indicate that the port is sending an error signal, and gray circles denote an input port.

Graphical simulator User drags blocks

from pallets to workspace

User configures certain blocks by clicking on switches

User connects blocks by drawing lines between blocks

Available eBlocks

Advanced ModeHide this panel

Compute/Communications

Prolonger

1 2 3 4 5 6 7 8 9

seconds

Once Yes, Stays Yes

rst

in

Toggle

Combine

AND OR

yes no

When A is yes no

B is

then the output is yes

Green/Red Light

Beeper

Output

Motion Sensor

Yes/No

Button

Light Sensor

Sensors

Button

Light Sensor

Available eBlocks

Advanced ModeHide this panel

Green/Red Light

Beeper

Output

Motion Sensor

Yes/No

Button

Light Sensor

Sensors

Compute/Communications

Prolonger

1 2 3 4 5 6 7 8 9

seconds

Once Yes, Stays Yes

rst

in

Toggle

Combine

AND OR

yes no

When A is yes no

B is

then the output is yes

Available eBlocks

Advanced ModeHide this panel

Compute/Communications

Prolonger

1 2 3 4 5 6 7 8 9

seconds

Once Yes, Stays Yes

rst

in

Toggle

Combine

AND OR

yes no

When A is yes no

B is

then the output is yes

Motion Sensor

Yes/No

Button

Light Sensor

Sensors

Green/Red Light

Beeper

Output

Beeper

Combine

AND OR

yes no

When A is yes no

B is

then the output is yes

Page 14: Automated Generation of Basic Custom Sensor-Based Embedded Computing Systems Guided by End-User Optimization Criteria Susan Lysecky Dept. of Electrical

Frank Vahid, UC Riverside / Susan Lysecky, Univ. of Arizona

http://www.cs.ucr.edu/eblocks 14 of 23

eBlock Simulator

Welcome to the eBlocks Simulator! In this area, you’ll find helpful hints on creating your own designs.

Click and drag an eBlock off of the “Available eBlocks” panel to add it to your design.To connect two blocks, click and drag from an output port (colored circle) to an input port (gray circle).A connection can be destroyed by clicking on a connected port.To move a block around the workspace, click and drag its orange area.Blocks can be moved into the trash can to delete them.Green circles indicate that the port is sending a yes, red circles indicate that the port is sending a no, yellowCircles indicate that the port is sending an error signal, and gray circles denote an input port.

Graphical simulator User drags blocks

from pallets to workspace

User configures certain blocks by clicking on switches

User connects blocks by drawing lines between blocks

User can set sensor values and observe system outputs

Can iterate until system functions as desired

Available eBlocks

Advanced ModeHide this panel

Compute/Communications

Prolonger

1 2 3 4 5 6 7 8 9

seconds

Once Yes, Stays Yes

rst

in

Toggle

Combine

AND OR

yes no

When A is yes no

B is

then the output is yes

Green/Red Light

Beeper

Output

Motion Sensor

Yes/No

Button

Light Sensor

SensorsLight

Sensor

Available eBlocks

Advanced ModeHide this panel

Green/Red Light

Beeper

Output

Motion Sensor

Yes/No

Button

Light Sensor

Sensors

Compute/Communications

Prolonger

1 2 3 4 5 6 7 8 9

seconds

Once Yes, Stays Yes

rst

in

Toggle

Combine

AND OR

yes no

When A is yes no

B is

then the output is yes

Available eBlocks

Advanced ModeHide this panel

Compute/Communications

Prolonger

1 2 3 4 5 6 7 8 9

seconds

Once Yes, Stays Yes

rst

in

Toggle

Combine

AND OR

yes no

When A is yes no

B is

then the output is yes

Motion Sensor

Yes/No

Button

Light Sensor

Sensors

Green/Red Light

Beeper

Output

Beeper

Combine

AND OR

yes no

When A is yes no

B is

then the output is yes

Light Sensor

Button

Page 15: Automated Generation of Basic Custom Sensor-Based Embedded Computing Systems Guided by End-User Optimization Criteria Susan Lysecky Dept. of Electrical

Frank Vahid, UC Riverside / Susan Lysecky, Univ. of Arizona

http://www.cs.ucr.edu/eblocks 15 of 23

Missing Blocks Problem

What if user builds system in simulator using blocks he/she doesn't actually have?

End-user

3-Input Logic

yes no

A B’ CA B’ C’

A B C’ A B C

A’ B’ CA’ B’ C’

A’ B C’A’ B C

Invert

1 0

Motion Sensor

Button

Light Sensor

Green/Red Light

Available eBlocks

Advanced ModeHide this panel

Compute/Communications

Prolonger

1 2 3 4 5 6 7 8 9

seconds

Once Yes, Stays Yes

rst

in

Toggle

Combine

AND OR

yes no

When A is yes no

B is

then the output is yes

Green/Red Light

Beeper

Output

Motion Sensor

Yes/No

Button

Light Sensor

Sensors

Available eBlocks

Advanced ModeHide this panel

Compute/Communications

Prolonger

1 2 3 4 5 6 7 8 9

seconds

Once Yes, Stays Yes

rst

in

Toggle

Combine

AND OR

yes no

When A is yes no

B is

then the output is yes

Motion Sensor

Yes/No

Button

Light Sensor

Sensors

Green/Red Light

Beeper

Output

Available eBlocks

Advanced ModeHide this panel

Green/Red Light

Beeper

Output Compute/Communications

Prolonger

1 2 3 4 5 6 7 8 9

seconds

Once Yes, Stays Yes

rst

in

Toggle

Combine

AND OR

yes no

When A is yes no

B is

then the output is yes

Motion Sensor

Yes/No

Button

Light Sensor

Sensors

Welcome to the eBlocks Simulator! In this area, you’ll find helpful hints on creating your own designs.

Click and drag an eBlock off of the “Available eBlocks” panel to add it to your design.To connect two blocks, click and drag from an output port (colored circle) to an input port (gray circle).A connection can be destroyed by clicking on a connected port.To move a block around the workspace, click and drag its orange area.Blocks can be moved into the trash can to delete them.Green circles indicate that the port is sending a yes, red circles indicate that the port is sending a no, yellowCircles indicate that the port is sending an error signal, and gray circles denote an input port.

eBlock Simulator

User built working system in simulator

But only has certain physical blocks on hand

No physical 3-input logic block available.

Page 16: Automated Generation of Basic Custom Sensor-Based Embedded Computing Systems Guided by End-User Optimization Criteria Susan Lysecky Dept. of Electrical

Frank Vahid, UC Riverside / Susan Lysecky, Univ. of Arizona

http://www.cs.ucr.edu/eblocks 16 of 23

Missing Blocks Problem's Solution

Automatically convert to equivalent system that makes use of existing physical blocks

End-user

3-Input Logic

yes no

A B’ CA B’ C’

A B C’ A B C

A’ B’ CA’ B’ C’

A’ B C’A’ B C

Invert

1 0

Motion Sensor

Button

Light Sensor

Green/Red Light

Available eBlocks

Advanced ModeHide this panel

Compute/Communications

Prolonger

1 2 3 4 5 6 7 8 9

seconds

Once Yes, Stays Yes

rst

in

Toggle

Combine

AND OR

yes no

When A is yes no

B is

then the output is yes

Green/Red Light

Beeper

Output

Motion Sensor

Yes/No

Button

Light Sensor

Sensors

Available eBlocks

Advanced ModeHide this panel

Compute/Communications

Prolonger

1 2 3 4 5 6 7 8 9

seconds

Once Yes, Stays Yes

rst

in

Toggle

Combine

AND OR

yes no

When A is yes no

B is

then the output is yes

Motion Sensor

Yes/No

Button

Light Sensor

Sensors

Green/Red Light

Beeper

Output

Available eBlocks

Advanced ModeHide this panel

Green/Red Light

Beeper

Output Compute/Communications

Prolonger

1 2 3 4 5 6 7 8 9

seconds

Once Yes, Stays Yes

rst

in

Toggle

Combine

AND OR

yes no

When A is yes no

B is

then the output is yes

Motion Sensor

Yes/No

Button

Light Sensor

Sensors

Welcome to the eBlocks Simulator! In this area, you’ll find helpful hints on creating your own designs.

Click and drag an eBlock off of the “Available eBlocks” panel to add it to your design.To connect two blocks, click and drag from an output port (colored circle) to an input port (gray circle).A connection can be destroyed by clicking on a connected port.To move a block around the workspace, click and drag its orange area.Blocks can be moved into the trash can to delete them.Green circles indicate that the port is sending a yes, red circles indicate that the port is sending a no, yellowCircles indicate that the port is sending an error signal, and gray circles denote an input port.

eBlock Simulator

No physical 3-input logic block available.

Invert

1 0

2-Input Logic

yes no

A’ BA’ B’

A B’ A B

2-Input Logic

yes no

A’ BA’ B’

A B’ A B

Motion Sensor

Button

Light Sensor

Green/Red Light

Available eBlocks

Advanced ModeHide this panel

Compute/Communications

Prolonger

1 2 3 4 5 6 7 8 9

seconds

Once Yes, Stays Yes

rst

in

Toggle

Combine

AND OR

yes no

When A is yes no

B is

then the output is yes

Green/Red Light

Beeper

Output

Motion Sensor

Yes/No

Button

Light Sensor

Sensors

Available eBlocks

Advanced ModeHide this panel

Compute/Communications

Prolonger

1 2 3 4 5 6 7 8 9

seconds

Once Yes, Stays Yes

rst

in

Toggle

Combine

AND OR

yes no

When A is yes no

B is

then the output is yes

Motion Sensor

Yes/No

Button

Light Sensor

Sensors

Green/Red Light

Beeper

Output

Available eBlocks

Advanced ModeHide this panel

Green/Red Light

Beeper

Output Compute/Communications

Prolonger

1 2 3 4 5 6 7 8 9

seconds

Once Yes, Stays Yes

rst

in

Toggle

Combine

AND OR

yes no

When A is yes no

B is

then the output is yes

Motion Sensor

Yes/No

Button

Light Sensor

Sensors

Welcome to the eBlocks Simulator! In this area, you’ll find helpful hints on creating your own designs.

Click and drag an eBlock off of the “Available eBlocks” panel to add it to your design.To connect two blocks, click and drag from an output port (colored circle) to an input port (gray circle).A connection can be destroyed by clicking on a connected port.To move a block around the workspace, click and drag its orange area.Blocks can be moved into the trash can to delete them.Green circles indicate that the port is sending a yes, red circles indicate that the port is sending a no, yellowCircles indicate that the port is sending an error signal, and gray circles denote an input port.

eBlock Simulator

Automatically replace 3-input logic by two 2-input logic blocks, which are available

End-user

Page 17: Automated Generation of Basic Custom Sensor-Based Embedded Computing Systems Guided by End-User Optimization Criteria Susan Lysecky Dept. of Electrical

Frank Vahid, UC Riverside / Susan Lysecky, Univ. of Arizona

http://www.cs.ucr.edu/eblocks 17 of 23

Sub-Optimal System Problem

• User-specified system may use more blocks than really necessary

Invert

1 0

2-Input Logic

yes no

A’ BA’ B’

A B’ A B

2-Input Logic

yes no

A’ BA’ B’

A B’ A B

Motion Sensor

Button

Light Sensor

Green/Red Light

End-user

Available eBlocks

Advanced ModeHide this panel

Compute/Communications

Prolonger

1 2 3 4 5 6 7 8 9

seconds

Once Yes, Stays Yes

rst

in

Toggle

Combine

AND OR

yes no

When A is yes no

B is

then the output is yes

Green/Red Light

Beeper

Output

Motion Sensor

Yes/No

Button

Light Sensor

Sensors

Available eBlocks

Advanced ModeHide this panel

Compute/Communications

Prolonger

1 2 3 4 5 6 7 8 9

seconds

Once Yes, Stays Yes

rst

in

Toggle

Combine

AND OR

yes no

When A is yes no

B is

then the output is yes

Motion Sensor

Yes/No

Button

Light Sensor

Sensors

Green/Red Light

Beeper

Output

Available eBlocks

Advanced ModeHide this panel

Green/Red Light

Beeper

Output Compute/Communications

Prolonger

1 2 3 4 5 6 7 8 9

seconds

Once Yes, Stays Yes

rst

in

Toggle

Combine

AND OR

yes no

When A is yes no

B is

then the output is yes

Motion Sensor

Yes/No

Button

Light Sensor

Sensors

Welcome to the eBlocks Simulator! In this area, you’ll find helpful hints on creating your own designs.

Click and drag an eBlock off of the “Available eBlocks” panel to add it to your design.To connect two blocks, click and drag from an output port (colored circle) to an input port (gray circle).A connection can be destroyed by clicking on a connected port.To move a block around the workspace, click and drag its orange area.Blocks can be moved into the trash can to delete them.Green circles indicate that the port is sending a yes, red circles indicate that the port is sending a no, yellowCircles indicate that the port is sending an error signal, and gray circles denote an input port.

eBlock Simulator

Inverter could be removed by inverting

logic's behavior

Page 18: Automated Generation of Basic Custom Sensor-Based Embedded Computing Systems Guided by End-User Optimization Criteria Susan Lysecky Dept. of Electrical

Frank Vahid, UC Riverside / Susan Lysecky, Univ. of Arizona

http://www.cs.ucr.edu/eblocks 18 of 23

Sub-Optimal System Problem's Solution

• Automatically optimize given eBlock system

Invert

1 0

2-Input Logic

yes no

A’ BA’ B’

A B’ A B

2-Input Logic

yes no

A’ BA’ B’

A B’ A B

Motion Sensor

Button

Light Sensor

Green/Red Light

End User

Available eBlocks

Advanced ModeHide this panel

Compute/Communications

Prolonger

1 2 3 4 5 6 7 8 9

seconds

Once Yes, Stays Yes

rst

in

Toggle

Combine

AND OR

yes no

When A is yes no

B is

then the output is yes

Green/Red Light

Beeper

Output

Motion Sensor

Yes/No

Button

Light Sensor

Sensors

Available eBlocks

Advanced ModeHide this panel

Compute/Communications

Prolonger

1 2 3 4 5 6 7 8 9

seconds

Once Yes, Stays Yes

rst

in

Toggle

Combine

AND OR

yes no

When A is yes no

B is

then the output is yes

Motion Sensor

Yes/No

Button

Light Sensor

Sensors

Green/Red Light

Beeper

Output

Available eBlocks

Advanced ModeHide this panel

Green/Red Light

Beeper

Output Compute/Communications

Prolonger

1 2 3 4 5 6 7 8 9

seconds

Once Yes, Stays Yes

rst

in

Toggle

Combine

AND OR

yes no

When A is yes no

B is

then the output is yes

Motion Sensor

Yes/No

Button

Light Sensor

Sensors

Welcome to the eBlocks Simulator! In this area, you’ll find helpful hints on creating your own designs.

Click and drag an eBlock off of the “Available eBlocks” panel to add it to your design.To connect two blocks, click and drag from an output port (colored circle) to an input port (gray circle).A connection can be destroyed by clicking on a connected port.To move a block around the workspace, click and drag its orange area.Blocks can be moved into the trash can to delete them.Green circles indicate that the port is sending a yes, red circles indicate that the port is sending a no, yellowCircles indicate that the port is sending an error signal, and gray circles denote an input port.

eBlock Simulator

Inverter could be removed by inverting

logic's behavior

Automatically remove inverter and

reconfigure the logic block

Page 19: Automated Generation of Basic Custom Sensor-Based Embedded Computing Systems Guided by End-User Optimization Criteria Susan Lysecky Dept. of Electrical

Frank Vahid, UC Riverside / Susan Lysecky, Univ. of Arizona

http://www.cs.ucr.edu/eblocks 19 of 23

Automatic Tool part of Graphical Simulator

"Convert to Real Blocks" option in simulator

For more advanced end-users

User enters number of available blocks and/or costs

User enters weights indicating preferred results

System is automatically converted to a new one

Block WeightsPhysical Fixed FunctionVirtual Fixed FunctionPhysical ProgrammableVirtual Programmable

Optimization ObjectiveMinimize CostMinimize Block Count

Invert

1 0

Motion Sensor

Button

Light Sensor

2-Input Logic

yes no

A’ BA’ B’

A B’

A B

$1.20

$3.80

$2.10

$1.30

$1.20

x 7

x 2

x 3

x 10

x 3

1

10

2

10

3-Input Logic

yes no

A B’ CA B’ C’

A B C’ A B C

A’ B’ CA’ B’ C’

A’ B C’A’ B C

Invert

1 0

Motion Sensor

Button

Light Sensor

Green/Red Light

Available eBlocks

Advanced ModeHide this panel

Compute/Communications

Prolonger

1 2 3 4 5 6 7 8 9

seconds

Once Yes, Stays Yes

rst

in

Toggle

Combine

AND OR

yes no

When A is yes no

B is

then the output is yes

Green/Red Light

Beeper

Output

Motion Sensor

Yes/No

Button

Light Sensor

Sensors

Available eBlocks

Advanced ModeHide this panel

Compute/Communications

Prolonger

1 2 3 4 5 6 7 8 9

seconds

Once Yes, Stays Yes

rst

in

Toggle

Combine

AND OR

yes no

When A is yes no

B is

then the output is yes

Motion Sensor

Yes/No

Button

Light Sensor

Sensors

Green/Red Light

Beeper

Output

Available eBlocks

Advanced ModeHide this panel

Green/Red Light

Beeper

Output Compute/Communications

Prolonger

1 2 3 4 5 6 7 8 9

seconds

Once Yes, Stays Yes

rst

in

Toggle

Combine

AND OR

yes no

When A is yes no

B is

then the output is yes

Motion Sensor

Yes/No

Button

Light Sensor

Sensors

Welcome to the eBlocks Simulator! In this area, you’ll find helpful hints on creating your own designs.

Click and drag an eBlock off of the “Available eBlocks” panel to add it to your design.To connect two blocks, click and drag from an output port (colored circle) to an input port (gray circle).A connection can be destroyed by clicking on a connected port.To move a block around the workspace, click and drag its orange area.Blocks can be moved into the trash can to delete them.Green circles indicate that the port is sending a yes, red circles indicate that the port is sending a no, yellowCircles indicate that the port is sending an error signal, and gray circles denote an input port.

eBlock Simulator

Invert

1 0

2-Input Logic

yes no

A’ BA’ B’

A B’ A B

2-Input Logic

yes no

A’ BA’ B’

A B’ A B

Motion Sensor

Button

Light Sensor

Green/Red Light

Available eBlocks

Advanced ModeHide this panel

Compute/Communications

Prolonger

1 2 3 4 5 6 7 8 9

seconds

Once Yes, Stays Yes

rst

in

Toggle

Combine

AND OR

yes no

When A is yes no

B is

then the output is yes

Green/Red Light

Beeper

Output

Motion Sensor

Yes/No

Button

Light Sensor

Sensors

Available eBlocks

Advanced ModeHide this panel

Compute/Communications

Prolonger

1 2 3 4 5 6 7 8 9

seconds

Once Yes, Stays Yes

rst

in

Toggle

Combine

AND OR

yes no

When A is yes no

B is

then the output is yes

Motion Sensor

Yes/No

Button

Light Sensor

Sensors

Green/Red Light

Beeper

Output

Available eBlocks

Advanced ModeHide this panel

Green/Red Light

Beeper

Output Compute/Communications

Prolonger

1 2 3 4 5 6 7 8 9

seconds

Once Yes, Stays Yes

rst

in

Toggle

Combine

AND OR

yes no

When A is yes no

B is

then the output is yes

Motion Sensor

Yes/No

Button

Light Sensor

Sensors

Welcome to the eBlocks Simulator! In this area, you’ll find helpful hints on creating your own designs.

Click and drag an eBlock off of the “Available eBlocks” panel to add it to your design.To connect two blocks, click and drag from an output port (colored circle) to an input port (gray circle).A connection can be destroyed by clicking on a connected port.To move a block around the workspace, click and drag its orange area.Blocks can be moved into the trash can to delete them.Green circles indicate that the port is sending a yes, red circles indicate that the port is sending a no, yellowCircles indicate that the port is sending an error signal, and gray circles denote an input port.

eBlock Simulator

Convert to Real Blocks

Convert to Real Blocks

Willingness to buy new blocks (higher means less

willing)

Willingness to use "programmable" blocks

(advanced users)

Page 20: Automated Generation of Basic Custom Sensor-Based Embedded Computing Systems Guided by End-User Optimization Criteria Susan Lysecky Dept. of Electrical

Frank Vahid, UC Riverside / Susan Lysecky, Univ. of Arizona

http://www.cs.ucr.edu/eblocks 20 of 23

How the Automatic Tool Works

• Library of valid optimizations

Block A

Block B

Block C

Block DSplitter

Splitter

Block A

Block B

Block C

Block D

Splitter

Yes Prolonger

1 2 3 4 5 6 7 8 9

Yes Prolonger

1 2 3 4 5 6 7 8 9

Yes Prolonger

1 2 3 4 5 6 7 8 9Once Yes, Stays Yes

3-Input Logic

yes no

A B’ CA B’ C’

A B C’ A B C

A’ B’ CA’ B’ C’

A’ B C’A’ B C

Splitter

2-Input Logic

yes no

A’ BA’ B’

A B’A BInvert

1 0

• Library of valid mappings of one block type to others

May be hundreds of transformation rules in each library

Similar to IC CAD design problem of "Technology Mapping" (our background)

Problem is NP-complete We draw on sophisticated

TM heuristic techniques

• eBlock developer (expert) provides rule base

Optimization Library

Technology Mapping Library

"Transformation Rule Base"

eBlock Developer

Page 21: Automated Generation of Basic Custom Sensor-Based Embedded Computing Systems Guided by End-User Optimization Criteria Susan Lysecky Dept. of Electrical

Frank Vahid, UC Riverside / Susan Lysecky, Univ. of Arizona

http://www.cs.ucr.edu/eblocks 21 of 23

How the Automatic Tool Works

We use the simulated annealing optimization heuristic Applies transformations in pseudo-random order, evaluates new system, keeps or discards, repeats + Very general: Supports wide variety of scenarios - Slow: Searches thousands of candidate systems

Objective function

Candidate systems evaluated

Invert

1 0

2-Input Logic

yes no

A’ BA’ B’

A B’ A B

2-Input Logic

yes no

A’ BA’ B’

A B’ A B

Motion Sensor

Button

Light Sensor

Green/Red Light

Invert

1 0

2-Input Logic

yes no

A’ BA’ B’

A B’ A B

2-Input Logic

yes no

A’ BA’ B’

A B’ A B

Motion Sensor

Button

Light Sensor

Green/Red Light3-Input Logic

yes no

A B’ CA B’ C’

A B C’ A B C

A’ B’ CA’ B’ C’A’ B C’A’ B C

Invert

1 0

Motion Sensor

Button

Light Sensor

Green/Red

Light

Page 22: Automated Generation of Basic Custom Sensor-Based Embedded Computing Systems Guided by End-User Optimization Criteria Susan Lysecky Dept. of Electrical

Frank Vahid, UC Riverside / Susan Lysecky, Univ. of Arizona

http://www.cs.ucr.edu/eblocks 22 of 23

0

5

10

15

20

25

30

35

1 2 1 2 1 2 1 2 1 2

Application

Blo

ck C

ou

nt

Experiments

• Considered 12 different end-user-specified optimization scenarios for 16 different eBlock systems

• Tool averaged about 6 seconds per system and scenario

• Note different block count and breakdown depending on scenario

• Cost-reduction scenarios yielded 23% savings from user's original design

Physical Fixed Function Blocks

Physical Programmable BlocksVirtual Fixed Function

BlocksVirtual Programmable Blocks

0

5

10

15

20

25

30

35

1 2 3 1 2 3 1 2 3 1 2 3 1 2 3

Application

Blo

ck C

ou

nt

0

5

10

15

20

25

30

35

1 2 3 4 5 6 1 2 3 4 5 6 1 2 3 4 5 6 1 2 3 4 5 6 1 2 3 4 5 6

Application

Blo

ck C

ou

nt

Cafeteria Food Alert

Podium Timer Alarm Clock Flood Detection AVERAGE

Page 23: Automated Generation of Basic Custom Sensor-Based Embedded Computing Systems Guided by End-User Optimization Criteria Susan Lysecky Dept. of Electrical

Frank Vahid, UC Riverside / Susan Lysecky, Univ. of Arizona

http://www.cs.ucr.edu/eblocks 23 of 23

Conclusions

• eBlocks• Enable end-users to create custom sensor-based systems• "Wood and nails" of electronic sensor world• End-users can build useful systems not presently possible

• This paper introduced automatic eBlock technology mapping tool

• Maps virtual system to physical blocks• Guided by user information and preferences• Requires only minutes

• Just set weights, and run automatic tool

Page 24: Automated Generation of Basic Custom Sensor-Based Embedded Computing Systems Guided by End-User Optimization Criteria Susan Lysecky Dept. of Electrical

Frank Vahid, UC Riverside / Susan Lysecky, Univ. of Arizona

http://www.cs.ucr.edu/eblocks 24 of 23

eBlocks in graphical simulator to describe desired sensor system behavior

Automatically partition code to programmable blocks

Compile to code on programmable eBlocks

Programmable eBlocks

#include <pic.h>#include “sci.h”#include “io.h”#include “constants.h”Unsigned char data_val = ERROR;...main(void) { unsigned I, j; TRISB = 0; ...}

main(void) {

ORTA = 0xff;

CMCON = 0x07;

TRISA = 0x00;

TRISB = 0x02;

asm("CLRWDT");

...

}

C Code

Programmable eBlock

Welcome to the eBlocks Simulator! In this area, you’ll find helpful hints on creating your own designs.

Click and drag an eBlock off of the “Available eBlocks” panel to add it to your design.To connect two blocks, click and drag from an output port (colored circle) to an input port (gray circle).A connection can be destroyed by clicking on a connected port.To move a block around the workspace, click and drag its orange area.Blocks can be moved into the trash can to delete them.Green circles indicate that the port is sending a yes, red circles indicate that the port is sending a no, yellowCircles indicate that the port is sending an error signal, and gray circles denote an input port.

Available eBlocks

Advanced ModeHide this panel

Compute/Communications

Prolonger

1 2 3 4 5 6 7 8 9

seconds

Once Yes, Stays Yes

rst

in

Toggle

Combine

AND OR

yes no

When A is yes no

B is

then the output is yes

Motion Sensor

Yes/No

Button

Light Sensor

Sensors

Green/Red Light

Beeper

Output

eBlock Simulator