Adaptive middleware for context-aware applications in smart-homes - PowerPoint PPT Presentation

1 / 25
About This Presentation
Title:

Adaptive middleware for context-aware applications in smart-homes

Description:

... user in living room sitting on sofa, room bright, no noise, etc. Context ... Express distance of attr as multiple of Std Dev. apply scaling factor 1/si. 23 ... – PowerPoint PPT presentation

Number of Views:71
Avg rating:3.0/5.0
Slides: 26
Provided by: markushu
Category:

less

Transcript and Presenter's Notes

Title: Adaptive middleware for context-aware applications in smart-homes


1
Adaptive middleware forcontext-aware
applications in smart-homes
MPAC 04
  • Markus Huebscher
  • Imperial College London

2
Outline
  • Middleware
  • Structure of middleware
  • Utility functions on QoC attributesfor service
    selection and adaptation
  • Utility functions
  • Example Euclidean distance
  • Learning
  • Non-context aware service selection

3
Smart Homes
  • Augment home with sensors
  • Support individuals with health problems
  • Elderly living alone at home
  • Patients with heart condition
  • Improve lifestyle
  • Smart fridge keeps track of items in fridge
  • Smart phones ring only in room where addressee is
    present

4
Context-aware applications
Application
Application
Middleware
e.g. user in living room sitting on sofa,
room bright, no noise, etc.
Context
Sensor datalogic
Collect AggregateInterpret
e.g. user at location (x,y), light and
sound values, etc.
PhysicalSensor
Sensors
5
Approach
  • Self-adaptive (autonomic) middleware for context
    provision.
  • Context providers advertise their capabilities
    with Quality of Context (QoC) attributes.
  • E.g. precision, refresh rate, spacial coverage
  • Assume gt1 alternatives for same context.
  • location ultrasonic, RFID, IR, smart floor,
    visual
  • gait visual, wearable accelerometers
  • Middleware receives app-specific utility function
    to rate context providers using QoC attrs.
  • Given multiple alternatives, middleware selects
    one that maximises app satisfaction

6
Middleware context structure
Applications
App1
App2
ContextService
Context ProvisionAdaptation
ContextProvider2
ContextProvider1
ContextProvisioning(aggregation
interpretation)
Sensors2
Sensors3
Sensors
Sensors1
7
Provider advertisement
App1
App2
ContextService
advertQoC attrs
ContextProvider2
ContextProvider1
Directory Service
Sensors2
Sensors3
Sensors1
8
Provider advertisement
  • CP sends advert msg to DS.
  • Context type
  • QoC attributes
  • Precision/Probability of correctness
  • refresh rate
  • If advert successful periodically send heartbeat
    to DS
  • Implicitly tells DS that CP still alive
  • Provide updated values for QoC attrs

9
Consumer advertisement
App1
App2
Request context typeUtility function
ContextService
ContextProvider2
ContextProvider1
Directory Service
Sensors2
Sensors3
Sensors1
10
Consumer advertisement
  • Request context type to SD
  • Provide Utility function
  • Given QoC attrs of a CP, determines how desirable
    CP is.
  • Application-specific measure of QoC.
  • Delegate to middleware task of adapting to best
    alternative

11
Middleware adaptation structure
App
Util Fct evaluation
ContextService
Call for adaptation
Fires events
ContextProvider2
ContextProvider1
Directory Service
CPs register at DS and regularly send heartbeat
to DS(Im alive) providing updated QoC attrs.
Sensors2
Sensors3
Sensors1
12
Auto update (self-configuring)
Application
Util Fct evaluation
ContextService
3. switch to CP2
2.eventnew CP
4.
ContextProvider1
1.advertise
Directory Service
Sensors2
Sensors1
13
Failure recovery (self-healing)
Application
Util Fct evaluation
ContextService
3. switch to CP1
2.eventCP2 failure
4.
ContextProvider2
ContextProvider1
1.noheartbeat
Directory Service
Sensors2
Sensors3
Sensors1
14
QoC change (self-optimising)
Application
Util Fct evaluation
ContextService
3. switch to CP1
2.eventCP2 QoCdegradation
4.
ContextProvider2
ContextProvider1
1.hearbeatwith QoCdegradation
Directory Service
Sensors2
Sensors3
Sensors1
15
Utility Functions
  • Map QoC attrs of CP to desirability of CP
  • Example Euclidian distance
  • Computes distance between a desirable point in
    the QoC-space and the CPs QoC point or the
    origin of the QoC-space.
  • Many choices as to how utility evaluated

16
Euclidean distance example
precision
CP2
CP1
CP3
ref
refresh rate
17
Euclidean distance example
precision
Frequently-lost-objects finder
CP2
CP1
CP3
ref
Set weight for each dimension
Light-control system
refresh rate
18
Euclidean distance example
precision
CP1
ref
CP3
CP2
refresh rate
19
Euclidean distance examplein Functional
Programming Language
  • utilFct_Euclid (QoC,Double) -gt Double
  • utilFct_Euclid pQoC
  • let
  • myQoC (Precision,40),(RefreshRate,10)
  • in
  • computeNorm (distance pQoC myQoC)
  • computeNorm Double -gt Double
  • computeNorm d
  • allDistancesPositive d euclidNorm d
  • True negEuclidNorm d

20
Euclidean distance examplein Functional
Programming Language
  • -- Takes CP's QoC, App's QoC and computes
    difference for each dimension
  • distance (QoC,Double) -gt (QoC,Double) -gt
    Double
  • distance
  • distance ((xId,xValue)xs) ((yId,yValue)ys)
  • xId yId (xValue - yValue) distance xs
    ys
  • xId / yId distance ((xId,xValue)xs) (ys
    (yId,yValue))
  • -- Returns True iff all values in the input list
    are gt0
  • allDistancesPositive Double -gt Bool
  • allDistancesPositive (xxs) x gt 0
    allDistancesPositive(xs)
  • allDistancesPositive True

21
  • -- Returns normal Euclidian norm
  • euclidNorm Double -gt Double
  • euclidNorm d
  • let
  • euclidNorm2 Double -gt Double -gt Double
  • euclidNorm2 n sqrt n
  • euclidNorm2 (xxs) n euclidNorm2 xs (n x2)
  • in
  • euclidNorm2 d 0.0
  • negEuclidNorm Double -gt Double
  • negEuclidNorm d
  • let
  • negEuclidNorm2 Double -gt Double -gt Double
  • negEuclidNorm2 n -1 sqrt n
  • negEuclidNorm2 (xxs) n
  • x lt 0 negEuclidNorm2 xs (n x2)
  • x gt 0 negEuclidNorm2 xs n
  • in

22
Computing distancewith different measurement
units
  • Problem Have to sum values with different units,
    e.g. 1/metres with Hz.
  • Solution Standardise scale of each dim.
  • Manually pick a sensible scaling factor for each
    Quality of Context
  • Tedious, subjective.
  • Automated scaling factor Mahalanobis distance
  • For each QoC Attr
  • Compute Std Dev over all available CPs
  • Express distance of attr as multiple of Std Dev?
    apply scaling factor 1/si

23
Learning consumers utility fct
  • If consumer does not provide Util Fct
  • E.g. not supported (resource-constrained)
  • Can learn to predict consumers satisfaction with
    CPs (just yes/no)
  • Middleware chooses CP, consumer sends /-
    feedback about CP.
  • Relevance-based decision tree learning
  • Takes as input the set of QoC attributes
  • Predict whether consumer will like a CP (yes/no)

24
Relevance-based decision tree learning
precision
refresh rate
10
lt10
precision
no
CP2
CP3
CP1
40
lt40
CP4
ref (10,40)
yes
no
refresh rate
25
Relevance-based decision tree learning 2
precision
refresh rate
lt10
10
CP4
precision
precision
CP2
CP3
20
lt40
40
lt20
CP1
yes
yes
yes
no
no
refresh rate
26
The problem of trust
  • Trust CP to deliver context info according to
    advertised QoC attributes.
  • Trustworthiness (tw) is a QoC attribute
    determined by middleware, not CP
  • Use praise/complaint feedback from. consumers
    after CP use to determine tw.
  • Bayesian parameter learning
  • Number of /- feedbacks? probability
    distribution for CP tw.
  • tw a QoC attribute.
  • Consumer decides how much risk to take in the
    hope of good QoC.

27
Non-context applicationsExample printer service
  • App (eg on PDA) wants to find nearest printer.
  • Predefined utility function uses a map to
    determine nearest printer.
  • App selects nearest util fct in middleware
  • App neednt know topology of building
  • Apps printers only need to know their location,
    middleware does the rest.

P1
P2
U
28
Non-context applicationsExample printer service
2
  • Other utility functions
  • Shortest printing time
  • depends on print queue length and printer speed
  • adapt printer selection if paper jams, no toner.
  • Best quality
  • Resolution, colour, type of paper? Tree-based
    classification
  • Utility functions generally useful for service
    selection and adaptation when alternative
    providers can be ranked
  • On service failure, automatically switch to next
    best alternative

29
Thank you
Write a Comment
User Comments (0)
About PowerShow.com