Вы находитесь на странице: 1из 21

SCS5619-MOBILE AND PERVASIVE COMPUITNG-UNIT-IV

Context Aware Computing

Context-aware computing refers to a general class of mobile systems that can sense their
physical environment, and adapt their behavior accordingly. Context-aware systems are a
component of a ubiquitous computing or pervasive computing environment.

• Modern computers are divorced from reality


• Unaware of who, where, and what around them
• Leads to mismatch
• Computers have extremely limited input
• Aware of explicit input only
• Can take a lot of effort to do simple things
• Context-Aware Computing
• Making computers more aware of the physical and social worlds we live
in Breaking computers out of the box.
Adaptability
SCS5619-MOBILE AND PERVASIVE COMPUITNG-UNIT-IV

Context Aware Computing


SCS5619-MOBILE AND PERVASIVE COMPUITNG-UNIT-IV

Context Aware Computing

Mechanism for Adaptation

Adapting Functionality
SCS5619-MOBILE AND PERVASIVE COMPUITNG-UNIT-IV

Context Aware Computing


SCS5619-MOBILE AND PERVASIVE COMPUITNG-UNIT-IV

Context Aware Computing

Adapting Data
SCS5619-MOBILE AND PERVASIVE COMPUITNG-UNIT-IV

Context Aware Computing

Types of Context
SCS5619-MOBILE AND PERVASIVE COMPUITNG-UNIT-IV

Context Aware Computing

Role of Mobile Middleware

Software that supports mediation between other software components across heterogeneous
platforms.

• To provide abstractions that reduce development effort, to offer programming paradigms that
make developing powerful applications easier.

• A software layer between the operating system and the applications.

Service Discovery Middleware

• A printer becomes usable and discoverable as soon as it is plugged in.

• Plug and Play technology

• A collection of protocols for developing highly dynamic client server applications that
standardizes a number of common mechanisms for interaction between clients and
services.

• Service advertisement allows services to announce their presence when they enter the
network and to announce their departure from the network.

• Service Discovery allows clients to discover dynamically services present either in their
local network or in internet.

Service advertisement allows services to announce their presence when they enter the network
and to announce their departure from the network. Service Discovery allows clients to discover
dynamically services present either in their local network or in internet.

Service Discovery Framework

• Jini – provides a spontaneous discovery and service interaction framework.


• Salutation - a discovery mechanism
SCS5619-MOBILE AND PERVASIVE COMPUITNG-UNIT-IV

Context Aware Computing

• Universal Plug and Play UPnP- a programming language and platform independent discovery
mechanism by relying on HTTP and XML
• Service Location Protocol - a vendor independent discovery mechanism
Jini • A runtime infrastructure that resides on the network and provides mechanisms that enable
to add, remove, locate, and access services. • The runtime infrastructure resides on the network
in three places: • in lookup services that sit on the network; • in the service providers (such as
Jini-enabled devices) • in clients.

Protocols used

• Discovery - clients and services to locate lookup services.

• Join - a service to register itself in a lookup service Mobile Computing

• Lookup - a client to query a lookup service for services that can help the client accomplish its
goals.

Jini provides a spontaneous discovery and service interaction framework. Jini functions on top
of the Java RMI distribution middleware. A Jini-enabled device can function as both a service
consumer and provider.

Jini contains three different types of processes: discovery, joining and service lookup. In
discovery the Jini device broadcasts an announcement upon joining a new network. The
announcement contains both information on how to contact services provided by the device as
well as groups it intends to join.

In joining the device provides information about the services to the Jini lookup service through a
RMI stub it receives in joining from the lookup service.

In service lookup the Jini device queries the lookup service. The query produces a set of stubs
that can be used to interact with the remote object. Java Reflection API can be used to inspect
what methods are implemented by each of the objects accessible through the stubs.

Salutation is a discovery mechanism, which supports brokering (i.e. protocol-gateway


functionality) in addition to discovery. Salutation consists of three Network Entities: the
Salutation Manager, client and services. Salutation Managers exist independently on brokers as
well as parts of the clients and services. The services are registered to the Salutation Manager.

Universal Plug and Play, UPnP, provides a programming language and platform independent
discovery mechanism by relying on HTTP and XML. UPnP relies on listening and responding to
HTTP-based requests on a particular multicast channel. UPnP architecture consists of control
points (i.e. UPnP client devices) and UPnP devices. UPnP can be seen to contain five phases:
discovery, description, control, event notification and presentation.
SCS5619-MOBILE AND PERVASIVE COMPUITNG-UNIT-IV

Context Aware Computing

Service location protocol, SLP, is intended to provide a vendor independent discovery


mechanism. SLP consists of three entities, which are central elements of the architecture:

user agents perform the discovery, service agents announce the services and directory agents
act as the lookup service, collecting the service addresses (i.e. service URLs) and responds to
user agent service lookup requests. Directory agents can be found by service and user agents
through passive discovery, in which case both parties listen to directory agent periodic
multicasts on a protocol-specific multicast address.

Concepts in service Discovery Framework

• Services – Discovery of Services-Garbage Collection – remove outdated information from the


network • Eventing – timely notification of important event like paper is jammed during printing
service is used.
• Security – Authentication on both client and services side
• Interoperability – between different kinds of available service discovery devices like Jini
enabled device should be interoperable with Universal plug and play client.
Functionality and Data
• A system is context-aware if it can extract, interpret and use context info and
adapt its functionality to the current context of use.
• Target applications and the adaptation techniques for those applications are
defined, it is possible to specify the functionalities the adaptation architecture will
provide:
– image resolution modification
– image number of colors decrease
– video packets discard
– video resolution modification
– video quality modification
– video conversion to black and white, audio sample ratio modification
– audio quality reduction
– text compression
– HTTP header compression
SCS5619-MOBILE AND PERVASIVE COMPUITNG-UNIT-IV

Context Aware Computing

Transcoding – Introduction
• As the number of networks, types of devices, and content formats increase,
interoperability between different systems and networks is becoming more important.
• We need provide a seamless interaction between content creation and consumption.
• In general, a transcoder relays video signals from a transmitter in one system to a
receiver in another.
• In earlier works, the majority of interest focused on reducing the bit rate to meet an
available channel capacity.
– Conversions between CBR (constant bit-rate) streams and VBR (variable bit-rate.)
– Achieve spatial & temporal resolution reduction due to mobile devices with limited
computing power & display.

Some of the common transcoding operations


SCS5619-MOBILE AND PERVASIVE COMPUITNG-UNIT-IV

Context Aware Computing

Bit-Rate Reduction
• The objective of bit-rate reduction is to reduce the bit-rate while maintaining low
complexity and achieve the highest quality possible.
– Application: broadcasting, Internet streaming
• The most straightforward:
– decode the video bit stream and fully re-encode the reconstructed signal.
• The best performance can be achieved by calculating new motion vectors and model
decisions for every MB at the new rate.
• By re-using information contained in the original bit stream and consider simplified
architectures, significant complexity saving can be achieved while still maintaining
acceptable quality.
• Over the years, focus has been centered on two specific aspects, complexity& drift
effect.
Complexity & Drift Reduction
• Drift can be explained as the blurring or smoothing of successively predicted frames.
• It is caused by the loss of high frequency data, which creates a mismatch between the
actual reference frame used for prediction in the encoder and the degraded reference
frame.
To demonstrate the tradeoff between complexity and quality, we will consider two types of
systems, a closed-loop system and an open-looped system
Transcoding Architecture
• Simplified transcoding for bit-rate reduction:
–(a) open-looped, partial decoding to DCT coefficients, then re-quantize
–(b) closed-looped, drift compensation for re-quantized data.
SCS5619-MOBILE AND PERVASIVE COMPUITNG-UNIT-IV

Context Aware Computing

open-looped System

• Another alternative way is to directly cut high frequency data from each MB, which is
less complex.

–To cut the high frequency data without VLD, a bit profile for the AC coefficients is maintained.

• As MBs are processed, code words corresponding to high frequency coefficients are
eliminated to meet the target bit-rate.

• Along similar lines, techniques to determine the optimal breakpoint of non-zero DCT
coefficients (in zig-zagorder).

–Carried out for each MB, so that distortion is minimized and rate constraints are satisfied.

• Above two alternatives may also be used in the closed-loop system, but their impact on
the overall complexity is less.

• Regardless of the techniques used to achieve the reduced rate, open-looped system are
relatively simply since a frame memory is not required and there is no need for IDCT.

• In terms of quality, better coding efficiency can be obtained by the re-quantization


approach. However, open-loop architectures are subject to drift effect.

Drift Effect

• The reason for drift is due to loss of high-frequency information.

• Beginning with the I-frame, information is discarded by the transcoder to meet the new
target bit rate. Incoming residual blocks are also subject to loss.

• When a decoder receives the transcoded bit stream, it will decode the I-frame with
reduced quality.

• When it’s time to decode the next P,B frames the degraded I-frame is used as a
predictive component and added to a degraded residual component.

Location Aware Computing

Location aware computing is the ability to find the geographical location of the mobile device and
provide services based on this location information.

• The ability to detect the exact location of the device or maybe its relative location,
especially a wireless device is called location aware computing system.

• Devices that are aware of where they are located are location aware devices.
SCS5619-MOBILE AND PERVASIVE COMPUITNG-UNIT-IV

Context Aware Computing

• Human-centric
– “Finding” applications
• Embedded
– Sensors & actuators
– Devices
– Monitoring and control
• System should support both forms

Location-awareness will be a key feature of many future mobile applications


• Many scenarios in pervasive computing
– Navigation
– Resource discovery
– Embedded applications, sensor systems
Monitoring and control applications
Location Representation
• It is not a single technology. Rather, it’s a combination of several technologies merged
together to develop system which tracks the location of objects. Some technologies that
are used for location tracking are
SCS5619-MOBILE AND PERVASIVE COMPUITNG-UNIT-IV

Context Aware Computing

• Geographic Information Systems (GIS)


• Global Positioning Systems (GPS)
• Radio Frequency Identification (RFID)
• GIS
• Captures, stores, analyze and report geographic information
• Ideal for large scale location tracking
• GPS
• Satellites broadcasts their positions
• small instrument receives signals of such satellites and calculates its position
• Ideal for outdoor positioning such as farming, surveying, military use or
transportation
• RFID
• A tiny battery-less microchip is attached to commodities and objects that are to
be traced
• Tags aren’t active all the time
• Transmit only if it is prompted by a reader
• Tags can be activated when the reader transmits radio waves
• When the tag transmits information, it’s captured and sent to the central
database
• RFID could be used in exchange of UPC bar codes.
Location Service used for:
• Positioning Platform
• It collects data from all types of modules and combines them into a single
position to form a virtual device
• A software module is implemented in each positioning device within a platform to
communicate with the devices
• The platform calculates the position and makes it available to the applications
• Privacy
• Vital to protect the privacy of users
• Location information, Proximity awareness are two issues that comes along with
privacy
• Push service: Users are sent information even if they don’t request them.
• Ex: advertisements, informational message
SCS5619-MOBILE AND PERVASIVE COMPUITNG-UNIT-IV

Context Aware Computing

• It should be protected so that the actual information is not transmitted to the


service provider
• Devices automatically transfers data when they are nearer to each other –
Proximity problems
• Example : PDA
• Location Information
• Proximity awareness
• Security handler
• System could be compromised by false positioning sources like Bluetooth
beacon with a false position
• To avoid, categorize sources in to trusted & non-trusted positioning sources
• Trusted: GPS module with user authentication
• Non-trusted: Mobile devices with Wave LAN that has no method to authenticate
them.
• Map service
• Map service allows an application to retrieve maps for certain position
• Relation between objects and tags are maintained in the Location Information
Server (LIS)
• Locator forms an interface between the locating mechanism and LIS
• LIS locates objects either representing persons or resources inside areas
• Service InfoBase
• It finds the published services either by searching the central database or the
internet for information that matches the criteria
• The application would look into the service InfoBase for services that matches
with the request
• Example : When a user need to know the nearest public library, museum, or
some restaurant or theatres.
Localization:
Localization is widely used in Wireless Sensor Networks(WSNs) to identify the current
location of the sensor nodes. A WSN consist of thousands of nodes that make the installation
of GPS on each sensor node expensive and moreover GPS may not provide exact
localization results in an indoor environment.
Why Localization ?
SCS5619-MOBILE AND PERVASIVE COMPUITNG-UNIT-IV

Context Aware Computing

Large scale embedded systems introduce many fascinating and difficult problems…
– This makes them much more difficult to use…
– BUT it couples them to the physical world
• Localization measures that coupling, giving raw sensor readings a physical context
– Temperature readings temperature map
– Asset tagging asset tracking
– “Smart spaces” context dependent behavior
– Sensor time series coherent beam forming.
Taxonomy of Localization Mechanisms
• Active Localization
– System sends signals to localize target
• Cooperative Localization
– The target cooperates with the system
• Passive Localization
– System deduces location from observation of signals that are “already present”
• Blind Localization
– System deduces location of target without a priori knowledge of its characteristics
Active Mechanisms
• Non-cooperative
– System emits signal, deduces target location from distortions in signal returns
– e.g. radar and reflective sonar systems
• Cooperative Target
– Target emits a signal with known characteristics; system deduces location by
detecting signal
– e.g. ORL Active Bat, GALORE Panel, AHLoS
• Cooperative Infrastructure
– Elements of infrastructure emit signals; target deduces location from detection of
signals
– e.g. GPS, MIT Cricket
Passive Mechanisms
• Passive Target Localization
– Signals normally emitted by the target are detected (e.g. birdcall)
SCS5619-MOBILE AND PERVASIVE COMPUITNG-UNIT-IV

Context Aware Computing

– Several nodes detect candidate events and cooperate to localize it by cross-


correlation
• Passive Self-Localization
– A single node estimates distance to a set of beacons (e.g. 802.11 bases in
RADAR [Bahl et al.], Ricochet in Bulusu et al.)
• Blind Localization
– Passive localization without a priori knowledge of target characteristics
Acoustic “blind beam forming” .
• Active techniques tend to work best
– Signal is well characterized, can be engineered for noise and interference
rejection
– Cooperative systems can synchronize with the target to enable accurate time-of-
flight estimation
• Passive techniques
– Detection quality depends on characterization of signal
– Time difference of arrivals only; must surround target with sensors or sensor
clusters
• TDOA requires precise knowledge of sensor positions
• Blind techniques
– Cross-correlation only; may increase communication cost
– Tends to detect “loudest” event.. May not be noise immune
Example of a Localization System
• Unattended Ground Sensor and acoustic localization system, developed at Sensoria
Corp.
SCS5619-MOBILE AND PERVASIVE COMPUITNG-UNIT-IV

Context Aware Computing

Each node has 4 speaker/ microphone pairs, arranged along the circumference of the
enclosure. The node also has a radio system and an orientation sensor.

Location Sensing Techniques


Triangulation
Use the geometric properties of triangles to compute object locations.
Proximity
Measure nearness to a known set of points.
The object’s presence is sensed using a physical phenomenon with limited
range.
Scene Analysis
Use features of a scene observed from a particular vantage point to draw
conclusions about the location of the observer or of objects in the scene.
Triangulation:
Lateration: Compute the position of an object by measuring its distance from multiple
reference positions
Direct
Physical action or movement.
Time-of-Flight
Measure the time it takes to travel between the object and point P at a
known velocity.
Attenuation
Given a function correlating attenuation and distance for a type of
emission and the original strength of the emission
SCS5619-MOBILE AND PERVASIVE COMPUITNG-UNIT-IV

Context Aware Computing

Angulation:
Use primarily angle or bearing measurements.
2D angulation requires two angle measurements and one length measurement such as the
distance between the reference points.

Scene Analysis

Static
Observed features are looked up in a predefined dataset that maps them to
object locations.
Differential
Tracks the difference between successive scenes to estimate location.
Advantages

The location of objects can be inferred using passive observation and features
that do not correspond to geometric angles or distances.

Disadvantages

The observer needs to have access to the features of the environment against
which it will compare its observed scenes.

Properties of Location Sensing:

Physical position and Symbolic position


Absolute versus Relative
Localized location computation
Accuracy and Precision
Scale
Recognition
SCS5619-MOBILE AND PERVASIVE COMPUITNG-UNIT-IV

Context Aware Computing

Cost
Limitations
Verona Diagram
1644: informal use by Descartes
1850: Dirichlet used 2-dimensional and 3-dimensional Voronoi diagrams in his study of
quadratic forms
1854: British physician John Snow used a Voronoi diagram in 1854 to illustrate how the
majority of people who died in the Soho cholera epidemic lived closer to the infected
Broad Street pump than to any other water pump.
1908: Voronoi diagrams are named after Russian mathematician Georgy Fedoseevich
Voronoi (or Voronoy) who defined and studied the general n-dimensional case.
Voronoi diagrams are used in geophysics and meteorology to analyze spatially
distributed data
Def : Given two points Pi, Pj S, let H(Pi,Pj) denote the half plane containing Pi. The Voronoi
polygon associated with Pi is defined as
V (i)  H (P , P )
i j
i j

Voronoi Polygon

The Voronoi diagram problem

• Given a set of n points, the Voronoi diagram consists of all the Voronoi polygons of
these points.

• E.g. A Voronoi diagram of 6 points:


SCS5619-MOBILE AND PERVASIVE COMPUITNG-UNIT-IV

Context Aware Computing

• The vertices of the Voronoi diagram are called Voronoi points and its segments are
called Voronoi edges.

Divide-and-Conquer approach

• Input : A set S of n planar points.

• Output : The Voronoi diagram of S.

• Step 1 If S contains less than 4 point, solve directly and return.

• Step 2 Find a median line L perpendicular to the X-axis which divides S into SL and SR
such that SL (SR) lies to the left(right) of L and the sizes of S L and SR are equal.

• Step 3 Construct Voronoi diagrams of S L and SR recursively. Denote these Voronoi


diagrams by VD(SL) and VD(SR).

• Step 4 Construct a dividing piece-wise linear hyper plane HP which is the locus of points
simultaneously closest to a point in S L and a point in SR. Discard all segments of VD(S L)
which lie to the right of HP and all segments of VD(S R) that lie to the left of HP. The
resulting graph is the Voronoi diagram of S.

References:

1. Frank Adelstein, “Fundamentals of Mobile and Pervasive Computing”, TMH, 2005


2. Jochen Burthardt et al, “Pervasive Computing: Technology and Architecture of Mobile
Internet Applications”, Pearson Education, 2003
3. Uwe Hansmaan et al, “Principles of Mobile Computing”, Springer, 2003.