Occupancy level estimation using pir sensors only

30
estimation using PIR sensors only BASTIEN PIETROPAOLI , DAVID ROJAS, PABLO CORBALAN, KIERAN DELANEY, DIRK PESCH

Transcript of Occupancy level estimation using pir sensors only

Occupancy level estimation using PIR sensors onlyBASTIEN PIETROPAOLI , DAVID ROJAS, PABLO CORBALAN, KIERAN DELANEY, DIRK PESCH

BASTIEN PIETROPAOLI 2

What’s occupancy? Three dimensions

Most common:• Binary/Head counts• At the room level• Time resolution app dependent

Heisenberg’s principle• Δoccupants × Δtime × Δspace ≥ min. cost• Costs: $$$ and privacy

15/02/2016

BASTIEN PIETROPAOLI 3

Summary

Existing approaches• Sensor used• Example of existing approaches

Our approach• Seeking a simpler solution• Small deployment• Saving energy

Binary occupancy, the classic

Machine learning• What features?• Linear regression• Results• Exploring the parameters

Pros and cons/Conclusion

15/02/2016

BASTIEN PIETROPAOLI 4

Summary

Existing approaches• Sensor used• Example of existing approaches

Our approach• Seeking a simpler solution• Small deployment• Saving energy

Binary occupancy, the classic

Machine learning• What features?• Linear regression• Results• Exploring the parameters

Pros and cons/Conclusion

15/02/2016

BASTIEN PIETROPAOLI 5

Sensors used for occupancy detection

CO2 / VOC Pros: Detect people independently of their activity, • Cons: Expensive, low time resolution, not suitable for open spaces, highly sensitive to ventilation

PIRs• Pros: Cheap, already deployed, well-known• Cons: Binary events, noisy peaks, cannot detect still people

Sound• Pros: ?• Cons: Sensitive to external noises

Cameras• Pros: Highly reliable• Cons: Privacy concerns, sensitive to obstruction and luminosity changes, computationally demanding

15/02/2016

BASTIEN PIETROPAOLI 6

Existing approaches (1/3) Counters at key places• Pairs of PIR sensors• Modified PIR sensors• Cameras• Wireless sensing

Pros• Simple in principle• Cost effective

Cons• Error prone• Propagated errors

15/02/2016

Zappi et al. 2010 Lin et al. 2011Erickson et al. 2013

Hutchins et al. 2007

BASTIEN PIETROPAOLI 7

Existing approaches (2/3) Costless methods• DHCP monitoring• Laptop monitoring• Calendars monitoring• Wi-Fi monitoring

Pros• No new hardware required

Cons• Low time/space resolution• Very low accuracy• Potential privacy concerns

15/02/2016

Melfi et al. 2011

Martani et al. 2012

BASTIEN PIETROPAOLI 8

Existing approaches (3/3) Artificial intelligence• Neural networks• Decision trees• Hidden Markov models• Classification• Topic identification• Graphical models

Pros• Reliable

Cons• Massive training sets• Complex modelling• Meaningless modelling

15/02/2016

Ekwevugbe et al. 2013

Hailemariam et al. 2011

BASTIEN PIETROPAOLI 9

Summary

Existing approaches• Sensor used• Example of existing approaches

Our approach• Seeking a simpler solution• Small deployment• Saving energy

Binary occupancy, the classic

Machine learning• What features?• Linear regression• Results• Exploring the parameters

Pros and cons/Conclusion

15/02/2016

BASTIEN PIETROPAOLI 10

Seeking a simpler solution

Required qualities• Cheap• Short training set• Simple models• Privacy friendly• Reliable head counts

15/02/2016

The solution we need!

BASTIEN PIETROPAOLI 11

Our (ridiculously) small deployment PIR sensors• One office• Two sensors• Four people

First to test binary occupancy• Integration to Wi-Fi sniffer project• Indoor localisation improvement

15/02/2016

BASTIEN PIETROPAOLI 12

Save energy, keep reactivity Wireless sensor nodes• Limited batteries• Wireless com’ consuming too much

Needs• Reactivity• All the events

Solution• Send a sequence start message• A message every 5s maximum• Over 11 days: 99727 msgs sent for 198842 events

15/02/2016

BASTIEN PIETROPAOLI 13

Summary

Existing approaches• Sensor used• Example of existing approaches

Our approach• Seeking a simpler solution• Small deployment• Saving energy

Binary occupancy, the classic

Machine learning• What features?• Linear regression• Results• Exploring the parameters

Pros and cons/Conclusion

15/02/2016

BASTIEN PIETROPAOLI 14

Binary occupancy, the classic (1/2)

15/02/2016

= bastard!

BASTIEN PIETROPAOLI 15

Binary occupancy, the classic (2/2)

15/02/2016

BASTIEN PIETROPAOLI 16

Summary

Existing approaches• Sensor used• Example of existing approaches

Our approach• Seeking a simpler solution• Small deployment• Saving energy

Binary occupancy, the classic

Machine learning• What features?• Linear regression• Results• Exploring the parameters

Pros and cons/Conclusion

15/02/2016

BASTIEN PIETROPAOLI 17

What features? Intuition• More people = more motion events• Integration might help• Take the number of events!

Enough data?

Correlated enough?

15/02/2016

Int. time 15s 30s 60s 90s 300s 900s 1800s

Corr. 0.741 0.803 0.846 0.866 0.909 0.929 0.928

BASTIEN PIETROPAOLI 18

Machine learning? Supervised, unsupervised? Which method? Training set? Enough features?

Let’s test the simplest: linear regression

15/02/2016

My colleagues when I explain how to use it.

Ground truth system made of two buttons.

BASTIEN PIETROPAOLI 19

Linear regression, the simplest A matrix of features: nb of motion events at various degrees

A vector of real measurements: our occupancy ground truth

A closed-form solution

Super fast prediction!

15/02/2016

𝑋=( 1 𝑥1,1 ⋯ 𝑥1,𝑛⋮ ⋱ ⋮

1 𝑥𝑚 , 1 ⋯ 𝑥𝑚 ,𝑛)

𝑌=( 𝑦1⋮𝑦𝑚)

Θ=(𝜃0⋮𝜃𝑛)=¿

𝑌=𝑋 Θ 𝑦 𝑖=𝜃0+∑𝑗=1

𝑛

𝜃 𝑗 .𝑥 𝑖 , 𝑗with

BASTIEN PIETROPAOLI 20

Some results

15/02/2016

BASTIEN PIETROPAOLI 21

Some results (rounded)

15/02/2016

BASTIEN PIETROPAOLI 22

Visualising the results (1/4) Seeking the best parameter combination• Integration time• Degree of the polynomial used

Various criteria• RMSE• Accuracy• Accuracy with tolerance

Results averaged over all the days used to learn

15/02/2016

BASTIEN PIETROPAOLI 23

Visualising the results (2/4) RMSE• Good estimate mixing both mean error

and standard deviation of the error

Best• Degree 2• 900s integration

15/02/2016

BASTIEN PIETROPAOLI 24

Visualising the results (3/4) Accuracy (when rounded)• Proportion of correct estimates

Best• Degree 1• 900s integration

15/02/2016

BASTIEN PIETROPAOLI 25

Visualising the results (4/4) Accuracy with tolerance 1• Take the floor or the ceiling of the

estimates• Discriminate binary occupancy

Best Degree 2 900s integration

15/02/2016

BASTIEN PIETROPAOLI 26

Does the day matter?Acceptable difference between worst and best day

The best day tends to be the same for all the parameter sets

The ordering of parameter sets tend to be respected for worst, average and best

15/02/2016

Int. Time Worst Average Best

15s 75.19% 77.08% 77.77%

30s 76.68% 78.97% 80.18%

45s 77.13% 79.49% 81.04%

60s 77.68% 79.83% 81.59%

90s 78.04% 79.99% 81.95%

120s 78.47% 80.18% 82.36%

150s 78.41% 80.29% 82.31%

180s 78.38% 80.33% 82.37%

300s 78.09% 80.43% 82.39%

600s 79.02% 81.30% 83.42%

900s 79.29% 81.56% 83.63%

1200s 79.66% 81.45% 83.42%

1800s 78.86% 81.09% 82.83%

BASTIEN PIETROPAOLI 27

Summary

Existing approaches• Sensor used• Example of existing approaches

Our approach• Seeking a simpler solution• Small deployment• Saving energy

Binary occupancy, the classic

Machine learning• What features?• Linear regression• Results• Exploring the parameters

Pros and cons/Conclusion

15/02/2016

BASTIEN PIETROPAOLI 28

Pros and consRequires only one type of sensor

Well-known sensors

Cheap and commonly deployed sensors

Simple model

Computationally extra light

Accurate with a small training set

Sensitive to sensor placement

Model might be specific to the room

Might not work in all types of environments

15/02/2016

BASTIEN PIETROPAOLI 29

Conclusion We did it!• Small training set• Computationally light• Model easily understood• Cheap sensors• Acceptable accuracy

15/02/2016

BASTIEN PIETROPAOLI 30

Thanks for your attention! Questions?CONTACT: [email protected]/@CIT.IE

15/02/2016