ppt - Computer Science and Engineering

advertisement
Automated Generation of Basic Custom Sensor-Based
Embedded Computing Systems Guided by End-User
Optimization Criteria
Susan Lysecky
Frank Vahid
Dept. of Electrical and Computer Engineering
University of Arizona
Dept. of Computer Science and Engineering
University of California, Riverside
slysecky@ece.arizona.edu
vahid@cs.ucr.edu
*Also with the Center for Embedded Computer
Systems at UC Irvine
This work is being supported by the National Science Foundation
Grant CCR-0311026
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

Courtesy of Joe Kahn
Solve problems with new
processor-based
applications
http://www.templehealth.org/capsule/april_2
2_05/april2205_news03.htm
Frank Vahid, UC Riverside / Susan Lysecky, Univ. of Arizona
http://www.cs.ucr.edu/eblocks
2 of 23
Problem
 Problem: End-users can't create custom sensor-based systems
LED
tx
rx
AND
light contact
sensor switch
Garage door
Senior comp. eng.
students, 2 weeks
completed
40%
http://www.smarthome.com
Left open at night – Oops!
Can't customize
Frank Vahid, UC Riverside / Susan Lysecky, Univ. of Arizona
http://www.cs.ucr.edu/eblocks
Hard
not
completed
60%
3 of 23
Goal and Solution
 Goal: Create off-the-shelf blocks end-users merely connect to
build customized sensor-based systems
light
tx
contact
sensor
switch
AND
tx
AND
light contact
sensor switch
 Solution: Put microprocessor inside previously "dumb"
sensors and other components
"dumb" light
sensor
microprocessor
misc.
circuitry
eBlock
Frank Vahid, UC Riverside / Susan Lysecky, Univ. of Arizona
http://www.cs.ucr.edu/eblocks
4 of 23
Just Connect (and Configure) eBlocks to Build
Customized Sensor-Based System
 Garage Open at Night
Magnetic
Contact
Switch
Light
Sensor

Green/
Red LED
Outside
2-Input Logic
Cafeteria Food Alert
LED
LED
Inside house
Splitter
At garage door
2-Input Logic
Toggle
Button
Button
service
line
kitchen
• 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
Frank Vahid, UC Riverside / Susan Lysecky, Univ. of Arizona
of systems
http://www.cs.ucr.edu/eblocks
5 of 23
eBlocks Status
 NSF-funded 2003-2007
 Library of ~20 basic Boolean and integer blocks

Via trial and iteration with >500 users



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


CHI 2005, HCII 2005, ...
Good success rates by end-users with no training
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
Frank Vahid, UC Riverside / Susan Lysecky, Univ. of Arizona
http://www.cs.ucr.edu/eblocks
6 of 23
Focus of this Paper:
Graphical Simulator  Physical Blocks

Graphical simulator


Available eBlocks
Users can quickly
build correct virtual
system, then convert
to physical blocks
For the slightly more
advanced user
Sensors Output Compute/Communications
When
A is
Button
Beeper
yes
no
AND B is
OR
yes
no
then the output is yes
Motion
SensorCombine
Green/Red
Light
rst
Light
Sensor
Once Yes, Stays Yes
in
Toggle
Yes/No
123456789
seconds
Prolonger
Hide this panel
Advanced Mode
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, yellow
Circles indicate that the port is sending an error signal, and gray circles denote an input port.
Frank Vahid, UC Riverside / Susan Lysecky, Univ. of Arizona
http://www.cs.ucr.edu/eblocks
7 of 23
eBlock Simulator

Graphical simulator

Available eBlocks
User drags blocks
from pallets to
workspace
Sensors Output Compute/Communications
Button
When
A is
Beeper
yes
no
AND B is
OR
yes
no
then the output is yes
Motion
SensorCombine
Green/Red
Light
rst
Light
Sensor
Once Yes, Stays Yes
in
Toggle
Yes/No
123456789
seconds
Prolonger
Hide this panel
Advanced Mode
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, yellow
Circles indicate that the port is sending an error signal, and gray circles denote an input port.
Frank Vahid, UC Riverside / Susan Lysecky, Univ. of Arizona
http://www.cs.ucr.edu/eblocks
8 of 23
eBlock Simulator

Graphical simulator

Available eBlocks
User drags blocks
from pallets to
workspace
Sensors Output Compute/Communications
Button
When
A is
Button
Beeper
yes
no
AND B is
OR
yes
no
then the output is yes
Motion
SensorCombine
Green/Red
Light
rst
Light
Sensor
Once Yes, Stays Yes
in
Toggle
Yes/No
123456789
seconds
Prolonger
Hide this panel
Advanced Mode
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, yellow
Circles indicate that the port is sending an error signal, and gray circles denote an input port.
Frank Vahid, UC Riverside / Susan Lysecky, Univ. of Arizona
http://www.cs.ucr.edu/eblocks
9 of 23
eBlock Simulator

Graphical simulator

Available eBlocks
User drags blocks
from pallets to
workspace
Light
Sensor
Button
Sensors Output Compute/Communications
When
A is
Button
Beeper
yes
no
AND B is
OR
yes
no
then the output is yes
Motion
SensorCombine
Green/Red
Light
rst
Light
Sensor
Once Yes, Stays Yes
in
Toggle
Yes/No
123456789
seconds
Prolonger
Hide this panel
Advanced Mode
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, yellow
Circles indicate that the port is sending an error signal, and gray circles denote an input port.
Frank Vahid, UC Riverside / Susan Lysecky, Univ. of Arizona
http://www.cs.ucr.edu/eblocks
10 of 23
eBlock Simulator

Graphical simulator

Available eBlocks
User drags blocks
from pallets to
workspace
Sensors Output Compute/Communications
Light
Sensor
When
A is
Button
Beeper
Button
yes
no
AND B is
OR
yes
no
then the output is yes
When A is
yes
no
AND B is
OR
yes
no
Motion
SensorCombine
Green/Red
Light
rst
then the output is yes
Combine
Light
Sensor
Once Yes, Stays Yes
in
Toggle
Yes/No
123456789
seconds
Prolonger
Hide this panel
Advanced Mode
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, yellow
Circles indicate that the port is sending an error signal, and gray circles denote an input port.
Frank Vahid, UC Riverside / Susan Lysecky, Univ. of Arizona
http://www.cs.ucr.edu/eblocks
11 of 23
eBlock Simulator

Graphical simulator


Available eBlocks
User drags blocks
from pallets to
workspace
User configures
certain blocks by
clicking on switches
Sensors Output Compute/Communications
Light
Sensor
When
A is
Button
Beeper
Button
yes
no
AND B is
OR
yes
no
then the output is yes
When A is
yes
no
AND B is
OR
Motion
SensorCombine
Green/Red
yes
no
Light
rst
then the output is yes
Beeper
Combine
Light
Sensor
Once Yes, Stays Yes
in
Toggle
Yes/No
123456789
seconds
Prolonger
Hide this panel
Advanced Mode
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, yellow
Circles indicate that the port is sending an error signal, and gray circles denote an input port.
Frank Vahid, UC Riverside / Susan Lysecky, Univ. of Arizona
http://www.cs.ucr.edu/eblocks
12 of 23
eBlock Simulator

Graphical simulator



Available eBlocks
User drags blocks
from pallets to
workspace
User configures
certain blocks by
clicking on switches
User connects blocks
by drawing lines
between blocks
Sensors Output Compute/Communications
Light
Sensor
When
A is
Button
Beeper
Button
yes
no
AND B is
OR
yes
no
then the output is yes
When A is
yes
no
AND B is
OR
Motion
SensorCombine
Green/Red
yes
no
Light
rst
then the output is yes
Beeper
Combine
Light
Sensor
Once Yes, Stays Yes
in
Toggle
Yes/No
123456789
seconds
Prolonger
Hide this panel
Advanced Mode
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, yellow
Circles indicate that the port is sending an error signal, and gray circles denote an input port.
Frank Vahid, UC Riverside / Susan Lysecky, Univ. of Arizona
http://www.cs.ucr.edu/eblocks
13 of 23
eBlock Simulator

Graphical simulator




Available eBlocks
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
Sensors Output Compute/Communications
Light
Sensor
When
A is
Button
Beeper
Button
yes
no
AND B is
OR
yes
no
then the output is yes
When A is
yes
no
AND B is
OR
Motion
SensorCombine
Green/Red
yes
no
Light
rst
then the output is yes
Beeper
Combine
Light
Sensor
Once Yes, Stays Yes
in
Toggle
Yes/No
123456789
seconds
Prolonger
Hide this panel
Advanced Mode
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, yellow
Circles indicate that the port is sending an error signal, and gray circles denote an input port.
Frank Vahid, UC Riverside / Susan Lysecky, Univ. of Arizona
http://www.cs.ucr.edu/eblocks
14 of 23
Missing Blocks Problem
 What if user builds system in
simulator using blocks he/she
doesn't actually have?
eBlock Simulator
Available eBlocks
Sensors Output
When
A is
Button
Beeper
Button
Motion Sensor
User built working system in simulator
yes no
A’ B’ C’
A’ B’ C
A’ B C’
A’ B C
A B’ C’
A B’ C
A B C’
A B C
3-Input Logic
Compute/Communications
yes
no
AND B is
OR
yes
no
then the output is yes
Motion
SensorCombine
Green/Red
Light
rst
in
1
0
Invert
Green/Red
Light
Light
Sensor
Once Yes,
Stays Yes
Toggle
Light
Sensor
Yes/No
123456789
seconds
Welcome to the eBlocks Simulator! In this area, you’ll find helpful hints on creating your own designs.
But only has certain physical blocks on hand
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, yellow
Circles indicate that the port is sending an error signal, and gray circles denote an input port.
Prolonger
Hide this panel
Advanced Mode
No physical 3-input logic
block available.
End-user
Frank Vahid, UC Riverside / Susan Lysecky, Univ. of Arizona
http://www.cs.ucr.edu/eblocks
15 of 23
Missing Blocks Problem's Solution
 Automatically convert to
equivalent system that
makes use of existing
physical blocks
eBlock Simulator
eBlock Simulator
Button
Button
Motion Sensor
Motion Sensor
yes no
A’ B’
A’ B
A B’
A B
2-Input Logic
Available eBlocks
Available eBlocks
Sensors Output Compute/Communications
Sensors Output Compute/Communications
yes no
A’ B’ C’
A’ B’ C
A’ Byes
C’ no
A’
A’B’
B C
A BB’ C’
A’
B’ C
AA B’
AA BB C’
A B CLogic
2-Input
3-Input Logic
When
A is
yes
AND B is
yes
Button
Beeper
When
A is no yes ORAND B is no yes
Button
Beeper
no
OR
no
then the output is yes
then the output is yes
Motion
SensorCombine
Green/Red
Motion
SensorCombine
Green/Red
Light
Light
rst
1
0
1
0
Invert
Invert
in rst
in
Once
Light
Light
Sensor
Stays Yes
Once Yes,
Sensor
Once Yes,
Stays Yes
Toggle
Toggle
Yes/No
1 2 Yes/No
3456789
Light
Light
Sensor
Sensor
Automatically replace 3input logic by two 2input logic blocks, which
are available
Green/Red
Green/Red
Light
Light
123456789
seconds
Welcome to the eBlocks Simulator! In this area, you’ll find helpful hints on creating your own designs.
eBlocks
Simulator!
In thiseBlocks”
area, you’ll
find
hints
creating your own designs.
ClickWelcome
and drag to
anthe
eBlock
off of
the “Available
panel
to helpful
add it to
yourondesign.
To connect two blocks, click and drag from an output port (colored circle) to an input port (gray circle).
Click and drag an eBlock off of the “Available eBlocks” panel to add it to your design.
A connection can be destroyed by clicking on a connected port.
To connect two blocks, click and drag from an output port (colored circle) to an input port (gray circle).
To move a block around the workspace, click and drag its orange area.
A connection can be destroyed by clicking on a connected port.
Blocks can be moved into the trash can to delete them.
To move a block around the workspace, click and drag its orange area.
Green circles indicate that the port is sending a yes, red circles indicate that the port is sending a no, yellow
Blocks can be moved into the trash can to delete them.
Circles indicate that the port is sending an error signal, and gray circles denote an input port.
Green circles indicate that the port is sending a yes, red circles indicate that the port is sending a no, yellow
Circles indicate that the port is sending an error signal, and gray circles denote an input port.
seconds
Prolonger
Prolonger
Hide this panel
Hide this panel
Advanced Mode
Advanced Mode
No physical 3-input logic
block available.
End-user
End-user
Frank Vahid, UC Riverside / Susan Lysecky, Univ. of Arizona
http://www.cs.ucr.edu/eblocks
16 of 23
Sub-Optimal System Problem
•
User-specified system may use more
blocks than really necessary
eBlock Simulator
Available eBlocks
Sensors Output
Button
Motion Sensor
yes no
A’ B’
A’ B
A B’
A B
2-Input Logic
When
A is
Button
Beeper
Compute/Communications
yes
no
AND B is
OR
yes
no
then the output is yes
Motion
SensorCombine
Green/Red
Light
yes no
A’ B’
A’ B
A B’
A B
2-Input Logic
rst
in
1
0
Invert
Green/Red
Light
Light
Sensor
Once Yes,
Stays Yes
Toggle
Light
Sensor
Yes/No
123456789
seconds
Prolonger
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, yellow
Circles indicate that the port is sending an error signal, and gray circles denote an input port.
Hide this panel
Advanced Mode
Inverter could be
removed by inverting
logic's behavior
End-user
Frank Vahid, UC Riverside / Susan Lysecky, Univ. of Arizona
http://www.cs.ucr.edu/eblocks
17 of 23
Sub-Optimal System Problem's Solution
•
Automatically optimize given eBlock
system
eBlock Simulator
Available eBlocks
Sensors Output
Button
Motion Sensor
yes no
A’ B’
A’ B
A B’
A B
2-Input Logic
When
A is
Button
Beeper
Compute/Communications
yes
no
AND B is
OR
yes
no
then the output is yes
Motion
SensorCombine
Green/Red
Light
yes no
A’ B’
A’ B
A B’
A B
2-Input Logic
rst
in
1
0
Invert
Green/Red
Light
Light
Sensor
Once Yes,
Stays Yes
Toggle
Light
Sensor
Yes/No
123456789
seconds
Prolonger
Welcome to the eBlocks Simulator! In this area, you’ll find helpful hints on creating your own designs.
Automatically remove
inverter and reconfigure
the logic block
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, yellow
Circles indicate that the port is sending an error signal, and gray circles denote an input port.
Hide this panel
Advanced Mode
Inverter could be
removed by inverting
logic's behavior
End User
Frank Vahid, UC Riverside / Susan Lysecky, Univ. of Arizona
http://www.cs.ucr.edu/eblocks
18 of 23
Automatic Tool part of Graphical Simulator
 "Convert to Real Blocks" option
in simulator
Convert to Real
Blocks
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




Button
Motion Sensor
Light Sensor
$1.20
x7
$3.80
x2
$2.10
x3
2-Input Logic
$1.30
1
0
x 10
$1.20
Invert
x3
…
Button
Button
MotionSensor
Sensor
Motion
Physical Fixed Function
Virtual Fixed Function
Physical Programmable
Virtual Programmable
Optimization
Objective
Minimize Cost
Minimize Block Count
yes no
A’ B’
A’ B
A B’
A B
2-Input Logic
Convert to Real
Blocks
AvailableeBlocks
eBlocks
Available
Output Compute/Communications
Sensors Output
Compute/Communications
Sensors
When
Button
When
AAisis
Beeper
Button
Beeper
yes no
A’ B’ C’
A’ B’ C
A’ B C’
A’ B Cyes no
AA’B’B’C’
AA’B’BC
AABB’C’
AABBC
3-Input Logic
Logic
2-Input
yes
yes
no
no
ANDBBisis
AND
OR
OR
yes
yes
no
no
thenthe
theoutput
outputisisyes
yes
then
Combine
Motion
Sensor
Combine
Green/Red
Motion
Sensor
Green/Red
Light
Light
rstrst
inin
11
00
Invert
Invert
Green/Red
Green/Red
Light
Light
Light
Light
Sensor
OnceYes,
Yes,
StaysYes
Yes
Sensor
Once
Stays
Toggle
Toggle
Yes/No
Yes/No
Light
Light
Sensor
Sensor
1 12 23 34 45 56 67 78 89 9
seconds
seconds
Welcome to the eBlocks Simulator! In this area, you’ll find helpful hints on creating your own designs.
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.
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).
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.
A connection can be destroyed by clicking on a connected port.
To move a block around the workspace, click and drag its orange area.
To move a block around the workspace, click and drag its orange area.
Blocks can be moved into the trash can to delete them.
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, yellow
Green circles indicate that the port is sending a yes, red circles indicate that the port is sending a no, yellow
Circles indicate that the port is sending an error signal, and gray circles denote an input port.
Circles indicate that the port is sending an error signal, and gray circles denote an input port.
Block Weights
yes no
A’ B’
A’ B
A B’
A B
eBlock Simulator
Simulator
eBlock
Prolonger
Prolonger
Hidethis
thispanel
panel
Hide
AdvancedMode
Mode
Advanced
1
10
2
10
Willingness to buy new blocks
(higher means less willing)
Frank Vahid, UC Riverside / Susan Lysecky, Univ. of Arizona
http://www.cs.ucr.edu/eblocks
Willingness to use
"programmable" blocks
(advanced users)
19 of 23
How the Automatic Tool Works
 Similar to IC CAD design "Transformation Rule Base"
problem of "Technology
Technology Mapping
Optimization
Library
Library
Mapping" (our background)
 Problem is NP-complete
 We draw on sophisticated
TM heuristic techniques
1
0
Invert
•
eBlock
developer
(expert)
provides
rule base
eBlock
Developer
Block A
yes no
A’ B’
A’ B
A B’
A B
2-Input Logic
Splitter
Block B
Block C
Splitter
123456789
123456789
Yes Prolonger
Yes Prolonger
Block D
yes no
Once Yes, Stays Yes
A’ B’ C’
A’ B’ C
A’ B C’
A’ B C
A B’ C’
A B’ C
A B C’
A B C
3-Input Logic
Block A
Splitter
Block B
123456789
Splitter
Block C
Yes Prolonger
Block D
•
Library of valid mappings of
one block type to others
•
Library of valid
optimizations
May be hundreds of transformation rules in each library
Frank Vahid, UC Riverside / Susan Lysecky, Univ. of Arizona
http://www.cs.ucr.edu/eblocks
20 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
Button
Motion
Sensor
Light
Sensor
Button
yes
A’ B’ C’
no
A’ B’ C
A’ B C’
A’ B C
A B’ C’
A B’ C
A B C’
A B C
3-Input Logic
1
0
Invert
Green/Re
d Light
Motion
Sensor
yes
A’ B’no
A’ B
A B’
A B
2-Input
Logic
Button
yes
A’ B’no
A’ B
A B’
A B
2-Input
Logic
Motion Sensor
1
0
Invert
Green/Red
Light
Light
Sensor
Frank Vahid, UC Riverside / Susan Lysecky, Univ. of Arizona
http://www.cs.ucr.edu/eblocks
yes
A’ B’no
A’ B
A B’
A B
2-Input Logic
yes
A’ B’no
A’ B
A B’
A B
2-Input Logic
1
Invert
0
Green/Red
Light
Light
Sensor
21 of 23
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 Programmable Blocks
Virtual Fixed Function Blocks
Virtual Programmable Blocks
35
30
Block Count
•
Physical Fixed Function Blocks
25
20
15
10
5
0
123456
Cafeteria Food
Alert
123456
123456
Podium Timer
Alarm Clock
Application
Frank Vahid, UC Riverside / Susan Lysecky, Univ. of Arizona
http://www.cs.ucr.edu/eblocks
123456
Flood Detection
123456
AVERAGE
22 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
Frank Vahid, UC Riverside / Susan Lysecky, Univ. of Arizona
http://www.cs.ucr.edu/eblocks
23 of 23
Programmable eBlocks
 eBlocks in graphical simulator to
describe desired sensor system
behavior
 Automatically partition code to
programmable blocks
 Compile to code on programmable
eBlocks
Available eBlocks
Sensors
Output
Compute/Communications
When A is
Button
Beeper
yes
no
AND OR
B is
yes
no
eBlock
Simulator
then the output is yes
Motion
Sensor Combine
Green/Red
Light
rst
in
Light
Sensor
Once Yes,
Stays Yes
Toggle
Yes/No
123 4567 89
seconds
Prolonger
Hide this panel
Advanced Mode
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, yellow
Circles indicate that the port is sending an error signal, and gray circles denote an input port.
main(void) {
#include <pic.h>
#include “sci.h”
#include “io.h”
#include “constants.h”
Unsigned char data_val =
ERROR;
...
main(void) {
unsigned I, j;
TRISB = 0; ...
}
ORTA = 0xff;
C Code
CMCON = 0x07;
TRISA = 0x00;
TRISB = 0x02;
asm("CLRWDT");
...
}
Frank Vahid, UC Riverside / Susan Lysecky, Univ. of Arizona
http://www.cs.ucr.edu/eblocks
Programmable
eBlock
24 of 23
Download