Presentation - Distributed Systems and Networks Lab

advertisement
Community Seismic
Network
Daniel Obenshain
along with
K. Mani Chandy, Robert Clayton, Andreas Krause,
Michael Olson, Matthew Faulkner, Leif Strand,
Rishi Chandy, Daniel Rosenberg, Annie Tang,
and others
California Institute of Technology
XKCD
Image by Randall Munroe of xkcd.com, Creative Commons Attribution-Noncommercial 2.5 License
Internet and Earthquakes

In the comic:
– The tweets travel faster than the earthquake
– Other users get quake information before it
hits
– They are too slow to do anything about it.
Background

Earthquakes are dangerous threats
– USGS estimates 2000 deaths and $200 billion
damages from 7.8 magnitude quake
Background

Earthquakes are dangerous threats
– USGS estimates 2000 deaths and $200 billion
damages from 7.8 magnitude quake

Early warning could minimize suffering
– Activate safeguards in critical operations
Background

Earthquakes are dangerous threats
– USGS estimates 2000 deaths and $200 billion
damages from 7.8 magnitude quake

Early warning could minimize suffering
– Activate safeguards in critical operations

Providing early warning is an interesting problem
– Bayesian decision theory, geology, distributed
computing
Background

Earthquakes are dangerous threats
– USGS estimates 2000 deaths and $200 billion
damages from 7.8 magnitude quake

Early warning could minimize suffering
– Activate safeguards in critical operations

Providing early warning is an interesting problem
– Bayesian decision theory, geology, distributed
computing

Current seismic network is too sparse
– Can’t provide enough early warning
Sensor Network is too Sparse
A sensor network of
one hundred sensors.
A sensor network of
one thousand sensors.
SCSN (Southern California Seismic Network) has ~350 sensors right now.
Pause for Example
Sensor Network is too Sparse
Ten thousand sensors!
Both a 3 second wave and a 1 second wave.
Early Warning Can Help
Slow trains
Early Warning Can Help
Slow trains
Stop elevators
Early Warning Can Help
Slow trains
Stop elevators
Open fire station doors
Early Warning Can Help

Southern California Edison Territory
The information can
also help the electrical
grid.
Early Warning Can Help
The information can
also help the electrical
grid.
 The grid can be shut
down and made safe
prior to severe
shaking.

Southern California Edison Territory
Early Warning Can Help
The information can
also help the electrical
grid.
 The grid can be shut
down and made safe
prior to severe
shaking.
 Power back in a day,
not weeks after
earthquake.

Southern California Edison Territory
Benefits
Provide Early Warning
 Easy deployment in areas without existing
seismic networks

– Peru and Indonesia
 Cell phones are prevalent

Identify hard-hit areas quickly
– Direct first responders
That’s why we’re
doing it.
What about how
we’re doing it?
Expand the Network

We want to add more data.
Expand the Network
We want to add more data.
 Why not get data from as many sources
as possible?

Expand the Network
We want to add more data.
 Why not get data from as many sources
as possible?
 Add in acceleration devices of different
types, cell phones, laptops, etc.

Expand the Network
We want to add more data.
 Why not get data from as many sources
as possible?
 Add in acceleration devices of different
types, cell phones, laptops, etc.
 The User installs some client software and
his or her acceleration data becomes part
of the network.

The Client
Server
Registration
Handler
Server
Alert
Listener
Registration
Handler
Sensor
Handler
Calculation
Handler
Handlers and Queues managed
Returns Proceed, Error, or New Handlers
Registration handler invoked on first run
Controller
Alert
Handler
Core processing
Error, No
Update, or
Handlers
Example Client – Cell Phone
Measures 3-D acceleration
 Program runs in background
 Especially good while charging

Example Client – Cell Phone

Martin Lukac (of UCLA) recorded a minor seismic
event on a Nokia phone, with different software.
Pause for Example
Picking Algorithm

How often should the client send data to
the server?
Picking Algorithm
How often should the client send data to
the server?
 Only when significant shaking is occurring.

Picking Algorithm
How often should the client send data to
the server?
 Only when significant shaking is occurring.
 How does the client know?

Picking Algorithm
How often should the client send data to
the server?
 Only when significant shaking is occurring.
 How does the client know?
 It performs a simple calculation on the
incoming data stream.

Picking Algorithm
How often should the client send data to
the server?
 Only when significant shaking is occurring.
 How does the client know?
 It performs a simple calculation on the
incoming data stream.
 We call this the “Picking Algorithm.”

Picking Algorithm
STA/LTA > trigger
Picking Algorithm
STA/LTA > trigger

STA – Short Term Average : the average
acceleration over the past several data
points
Picking Algorithm
STA/LTA > trigger
STA – Short Term Average : the average
acceleration over the past several data
points
 LTA – Long Term Average : the average
acceleration over more data points

Picking Algorithm
STA/LTA > trigger
STA – Short Term Average : the average
acceleration over the past several data
points
 LTA – Long Term Average : the average
acceleration over more data points
 trigger – a threshold

Picking Algorithm
Short Term Average
Long Term Average
Accelerometer
Picking Algorithm
Short Term Average
Long Term Average
New Data
Accelerometer
Picking Algorithm
Short Term Average
Long Term Average
Accelerometer
Picking Algorithm

If STA/LTA > trigger is true, then we have
“picked.”
Picking Algorithm
If STA/LTA > trigger is true, then we have
“picked.”
 The algorithm then waits a little bit before
sending a message to the server.

Picking Algorithm
If STA/LTA > trigger is true, then we have
“picked.”
 The algorithm then waits a little bit before
sending a message to the server.
 This is to make sure it sends data from
the peak of the wave.

Picking Algorithm
1 2 3
Pause for this length of time before
sending a message to the server.
1. Detected significant shaking
2. Maximum shaking
3. Sent message to server
Picking Algorithm

After sending a message to the server, the
client will wait a while before picking
again.
Picking Algorithm
After sending a message to the server, the
client will wait a while before picking
again.
 This is to stop the client from picking
multiple times for the same shaking.

Picking Algorithm
1
2
Delay for this length of time
before picking again.
1. Last message sent to server
2. The coda of the earthquake, where
we don’t want to pick
Picking Algorithm

Five tunable parameters.
Picking Algorithm

Five tunable parameters.
– Length of STA
Picking Algorithm

Five tunable parameters.
– Length of STA
– Length of LTA
Picking Algorithm

Five tunable parameters.
– Length of STA
– Length of LTA
– Value of trigger
Picking Algorithm

Five tunable parameters.
– Length of STA
– Length of LTA
– Value of trigger
– How long to wait after picking before sending
a message to the server
Picking Algorithm

Five tunable parameters.
– Length of STA
– Length of LTA
– Value of trigger
– How long to wait after picking before sending
a message to the server
– How long to wait between messages
Picking Algorithm

Five tunable parameters.
– Length of STA
– Length of LTA
– Value of trigger
– How long to wait after picking before sending
a message to the server
– How long to wait between messages

They can all be tuned by the server, on a
client-by-client basis.
GUI

Acceleration data is displayed in real time
on the user’s screen.
GUI
Acceleration data is displayed in real time
on the user’s screen.
 Promotes use of the software.

GUI
Acceleration data is displayed in real time
on the user’s screen.
 Promotes use of the software.
 Can be used in science classrooms to
explain project.

GUI
Acceleration data is displayed in real time
on the user’s screen.
 Promotes use of the software.
 Can be used in science classrooms to
explain project.
 Each message to the server marked by a
red line.

GUI

3 Axes
GUI
3 Axes
 Data streams from
the right

GUI
3 Axes
 Data streams from
the right
 The red line
represents a message
to the server

Pause for Example
Client-server messages
Registration
 Picks
 Heartbeat

Client-server messages

Registration
– Location (or an approximation)
– Given a client id
Picks
 Heartbeat

Client-server messages
Registration
 Picks

– Short UDP message
– Location, time, and acceleration experienced
– Can be a playback message!

Heartbeat
Client-server messages
Registration
 Picks
 Heartbeat

– Check in with server
– Get any updates, playback info
– For security, server will never push updates.
Client must call in to get updates.
Client-server messages
Registration
 Picks
 Heartbeat
 All are in XML format.

– Human readable
– Easily extended
– Can easily interface with other, similar
projects
Sensor Validation

Tested our sensor with artificial event.
Sensor Validation
Tested our sensor with artificial event.
 Compared our sensor to the SCSN
(Southern California Seismic Network)
sensor in the basement of Millikan Library.

Sensor Validation
Tested our sensor with artificial event.
 Compared our sensor to the SCSN
(Southern California Seismic Network)
sensor in the basement of Millikan Library.
 Caused seismic activity with a
sledgehammer.

Sensor Validation
Sensor Validation
We have since switched to better noise filtering
and a better sensor
 Still, the correlation is visible

Server

Four main tasks
– Handle new user registration
Server

Four main tasks
– Handle new user registration
– Listen for pick messages
Server

Four main tasks
– Handle new user registration
– Listen for pick messages
– Handle heartbeat messages
Server

Four main tasks
– Handle new user registration
– Listen for pick messages
– Handle heartbeat messages
– Analyze data
Server
Registration
Handler
Pick Handler
Heartbeat Handler
Database
Associator
UDP vs TCP
We send messages using two different protocols.

TCP (Transmission Control Protocol)
– Handshake delay
– Error correction
UDP vs TCP
We send messages using two different protocols.

TCP (Transmission Control Protocol)
– Handshake delay
– Error correction

UDP (User Datagram Protocol)
– Fast
– Unreliable
Pick Message Handler
Pick messages are sent using UDP packets.
 Reasons:
– Unsure of condition of network
– Speed is important
Indiana Jones Effect
From Indiana Jones and the Raiders of the Lost Ark.
Pick Message Handler

Listen for incoming picks
Pick Message Handler

Listen for incoming picks
– Parse message
Pick Message Handler

Listen for incoming picks
– Parse message
– Check for playback flag
 If the flag is not present, the pick is stored in the
database.
 If the message is flagged as playback, it is written
to a separate table in the database.
Server Operation
Equipment, devices,
notification systems
Clients
Clients
Clients
Clients
Clients
Clients
Clients
Clients
Clients
Heartbeat
Listener
Alert
Listener
Calculation
Handler
Controller
Warning
Handler
Core processing
Registration
Listener
Server-side Analysis

Bayesian decision-making
Server-side Analysis

Bayesian decision-making

Once posterior is sufficient, we send Early
Warning
Tested on Fake Data
Priors from
Gutenberg-Richter
law (mag vs. num)
 Fake data stream with
errors in it
 Located epicenter to
within 25 km
 Located epicenter in
10 seconds

Display data
Heat map
 Hotter colors = higher magnitude picks

Pause for Example
http://map.communityseismicnetwork.org/
Google App Engine
Server implemented
on Google App Engine
 Our data is sent to
and stored there
 Robust, scalable

Machine Learning
Feedback loop
 Five parameters (or more!) per client
 If a client picks more often than normal,
tune it down
 If a client picks less often than normal,
tune it up

Machine Learning
A client next to
construction
 Not useful for small
seismic events
 Still useful for big
ones!
 Set the threshold
higher.

Thank You
Q&A Session
Download