Principal component aggregation in wireless sensor networks Y. Le Borgne 1 and G. Bontempi Machine Learning Group Department of Computer Science Université Libre de Bruxelles Brussels, Belgium August 29, 2007 1 Supported by the COMP2SYS project, sponsored by the Human Resources and Mobility program of the European community (MEST-CT-2004-505079)
Agenda 1 Overview of wireless sensor networks 2 Self-organization for data aggregation 3 Principal component aggregation Unsupervised compression Supervised compression
Overview of wireless sensor networks Wireless sensors Tiny electronic systems (aka motes) embedded in an environment that can collect, process and communicate data.
Overview of wireless sensor networks Wireless sensors Tiny electronic systems (aka motes) embedded in an environment that can collect, process and communicate data. Microprocessor: TI MSP430 8MHz Memory: 48KB prog flash, 10KB RAM, 512KB data flash Radio: 250kbps radio, ZigBee compliant Sensors: Light, temperature and humidity Energy supply: 2 AA batteries Tmote sky. MoteIV c.
Overview of wireless sensor networks Wireless sensors Tiny electronic systems (aka motes) embedded in an environment that can collect, process and communicate data. Microprocessor: TI MSP430 8MHz Memory: 48KB prog flash, 10KB RAM, 512KB data flash Radio: 250kbps radio, ZigBee compliant Sensors: Light, temperature and humidity Energy supply: 2 AA batteries Tmote sky. MoteIV c. Strong resource constraints: Energy : 2 AA batteries. Five days of autonomy at 100% duty cycle. Network bandwidth. Maximum 100 packets (56 bytes) /second. Computational power and memory. 48KB Flash for the code: no complex stuff.
Overview of wireless sensor networks Applications Applications in a wide variety of domains: Environmental monitoring: Forest fires, pollution, agriculture, Civil engineering: Building, pipeline monitoring, Defense: Battelfield surveillance, Industry: Failure prevention, failure diagnosis, Medical healthcare: Remote or non invasive monitoring,...
Overview of wireless sensor networks Applications Applications in a wide variety of domains: Environmental monitoring: Forest fires, pollution, agriculture, Civil engineering: Building, pipeline monitoring, Defense: Battelfield surveillance, Industry: Failure prevention, failure diagnosis, Medical healthcare: Remote or non invasive monitoring,... Ex: OASIS project - WSN architecture for volcano monitoring - 2007-2009. $1.6M NASA ESTO-AIST project, involving Washington State University, U.S. Geological Survey and NASA Jet Propulsion Laboratory. Long term unattended application. Real time, possibly high speed data rate (Vibrations). Remote data collection.
Overview of wireless sensor networks Deployments @ ULB Microclimate monitoring - Solbosch greenhouses. 18 sensors in three greenhouses. Several experiments. Data collected: temperature, humidity and light. Sampling interval: 5 minutes. Experimental setups monitoring - Department of Ethology. 18 sensors in three experimental labs, running for 5 days. Data collected: temperature, humidity and light. Sampling interval: 5 minutes. Localization - Library of the department of Computer Science. 20 sensors running for one day. Data collected: radio signal strength and link quality indicators. Sampling interval: 1 minute.
Part II Self organization for data aggregation
Self-organization for data aggregation Routing tree Scenario: Collect data from the WSN to a network node referred to as the sink, usually endowed with higher resources (e.g., desktop computer). Sink 4 8 12 16 3 7 11 15 2 6 10 14 1 5 9 13 radio range Radio range is limited. The sink is tipycally out of range of most sensor nodes. Sensor nodes build up a routing tree. Different metrics can be used (Nb of hops, link quality,...) for selecting a parent.
Self-organization for data aggregation Aggregation A synchronized routing tree allows to aggegrate data. A partially aggregated value is referred to as a partial state record S. In Tiny AGgregation (TAG, Madden et al., 2005), three primitives are defined for the computation of partial state records: An initializer i(.) = S, which initializes a partial state record. A merging function f (S 1, S 2 ) = S 3, which combines two partial state records in a new one. An evaluator e(s), which computes the eventual result of the aggregation process.
Self-organization for data aggregation Aggregation A synchronized routing tree allows to aggegrate data. A partially aggregated value is referred to as a partial state record S. In Tiny AGgregation (TAG, Madden et al., 2005), three primitives are defined 4 3 2 1 for the computation of partial state records: An initializer i(.) = S, which initializes a partial state record. A merging function f (S 1, S 2 ) = S 3, which combines two partial state records in a new one. An evaluator e(s), which computes the eventual result of the aggregation process. S4 = 4 i=1 x 2 i S8 = 8 i=1 x 2 i S12 = 12 i=1 x 2 i S3 = 3 i=1 x 2 i S1 = x 2 1 8 7 6 5 S7 = 7 i=5 x 2 i S5 = x 2 5 12 11 10 9 16 norm = e(s16) = i=1 x 2 i 16 15 14 13 S16 = 16 i=1 x 2 i Example: Computation of the norm of a set of measurements x i : Initializer: i(x i ) = x 2 i Merging function: f (S 1, S 2 ) = X 1 + X 2 Evaluator: e(s) = S Partial state records are of the form: S = x 2 i i I {1,..,16}
Part III Principal component aggregation
Principal component aggregation Principal component analysis (PCA) Let x 1 [t], x 2 [t], x 3 [t] be three sensor streams. At each cycle, an observation vector x[t] T = (x 1 [t], x 2 [t], x 3 [t]) is collected. Another basis can be chosen to represent x[t], for example the red basis {w k }, 1 k 3. The new coordinates x of x in {w k } are given by x k [t] = 3 i=1 x i [t] T w k,i The red crosses give the projections ˆx[t] = 2 k=1 x k[t]w k of x[t] in {w 1, w 2 }
Principal component aggregation Principal component analysis (PCA) Let x 1 [t], x 2 [t], x 3 [t] be three sensor streams. At each cycle, an observation vector x[t] T = (x 1 [t], x 2 [t], x 3 [t]) is collected. Another basis can be chosen to represent x[t], for example the red basis {w k }, 1 k 3. The new coordinates x of x in {w k } are given by x k [t] = 3 i=1 x i [t] T w k,i The red crosses give the projections ˆx[t] = 2 k=1 x k[t]w k of x[t] in {w 1, w 2 } Principal Component Analysis (PCA) unveils the basis that maximizes the variance retained for a given dimension. The PCs {w k }, 1 k q, are the eigenvectors of the covariance matrix C X = E t[x[t]x[t] T ].
Principal component aggregation Initialization XN p {xi[t]}i={1,..,4} {xi[t]}i={1,..,8} {xi[t]}i={1,..,12} 4 8 12 3 7 11 {xi[t]}i={1,..,3} {xi[t]}i={5,..,7} 2 6 10 16 15 14 {xi[t]}i={1,..,16} All measurements {x i [t]}, 1 i p, collected for N epochs A matrix X N p obtained at the sink Cost: Depends on the sensor node (up to N*16 packets) 1 x1[t] 5 x5[t] 9 13
Principal component aggregation Initialization XN p {xi[t]}i={1,..,4} {xi[t]}i={1,..,8} {xi[t]}i={1,..,12} 4 8 12 3 7 11 {xi[t]}i={1,..,3} {xi[t]}i={5,..,7} 2 6 10 16 15 14 {xi[t]}i={1,..,16} All measurements {x i [t]}, 1 i p, collected for N epochs A matrix X N p obtained at the sink Cost: Depends on the sensor node (up to N*16 packets) 1 x1[t] 5 x5[t] 9 13 {wk,4}k={1..q} {wk,8}k={1..q} {wk,12}k={1..q} 4 8 12 3 7 11 {wk,3}k={1..q} {wk,7}k={1..q} 2 6 10 1 5 9 {wk,1}k={1..q} {wk,5}k={1..q} CX = XN pxn p T {wk,i}k={1..q},i={1..p} 16 {wk,16}k={1..q} 15 14 13 After N epochs, the covariance matrix is computed at the sink The q first eigenvectors {w k }, 1 k q eigenvectors are computed and sent in the network Each node i retrieves the ith element of each w k Cost: p q packets
Principal component aggregation In-network projections Once the PC elements are distributed, network projections can be performed along the routing tree. S4[t] = 4 i=1 xi[t]w1,i S8[t] = 8 i=1 xi[t]w1,i S12[t] = 12 i=1 xi[t]w1,i 4 3 2 1 S3[t] = 3 i=1 xi[t]w1,i S1[t] = x1[t]w1,1 8 7 6 5 12 11 S7[t] = 7 i=5 xi[t]w1,i S5[t] = x5[t]w1,5 10 9 16 15 14 13 ˆx[t] = e(s16[t]) = w1 S16[t] = 16 i=1 xi[t]w1,i = Aggregation: example with one PC: Initializer: i(x i [t]) = x i [t]w 1,i Merging function: f (S 1 [t], S 2 [t]) = S 1 [t] + S 2 [t] Evaluator: e(s[t]) = x 1 [t] w 1 Partial state records are of the form: S[t] = i I {1,..,16} x i [t]w 1,i
Principal component aggregation In-network projections Once the PC elements are distributed, network projections can be performed along the routing tree. S4[t] = 4 i=1 xi[t]w1,i S8[t] = 8 i=1 xi[t]w1,i S12[t] = 12 i=1 xi[t]w1,i 4 3 2 1 S3[t] = 3 i=1 xi[t]w1,i S1[t] = x1[t]w1,1 8 7 6 5 12 11 S7[t] = 7 i=5 xi[t]w1,i S5[t] = x5[t]w1,5 10 9 16 15 14 13 ˆx[t] = e(s16[t]) = w1 S16[t] = 16 i=1 xi[t]w1,i = Aggregation: example with one PC: Initializer: i(x i [t]) = x i [t]w 1,i Merging function: f (S 1 [t], S 2 [t]) = S 1 [t] + S 2 [t] Evaluator: e(s[t]) = x 1 [t] w 1 Partial state records are of the form: S[t] = i I {1,..,16} x i [t]w 1,i The network load is the same for all sensors (q packets) The computational cost is negligible Approximations to all sensor measurements can be obtained at the sink by: ˆx[t] = q w k x k [t] Other uses of principal coordinates: Event detection, event classification k=1
Principal component aggregation Experimental results - Compression Temperature measurements at 52 locations, collected every 31 seconds for five days (From the Intel Lab dataset, Berkeley, 2003). Training: 1 day. Temperature profile Sensor 21 Temperature profile Sensor 49 Correlation coefficient: 0.99 Correlation coefficient: 0.59 Temperature ( C) 20 25 30 35 Temperature ( C) 16 18 20 22 24 26 28 Temperature Sensor 47 16 18 20 22 24 26 28 30 Temperature Sensor 21 20 25 30 35 0 4000 8000 12000 0 4000 8000 12000 16 18 20 22 24 26 28 16 18 20 22 24 26 28 Epochs Epochs Temperature Sensor 49 Temperature Sensor 49
Principal component aggregation Experimental results - Compression Temperature measurements at 52 locations, collected every 31 seconds for five days (From the Intel Lab dataset, Berkeley, 2003). Training: 1 day. Temperature profile Sensor 21 Temperature profile Sensor 49 Correlation coefficient: 0.99 Correlation coefficient: 0.59 Temperature ( C) 20 25 30 35 Temperature ( C) 16 18 20 22 24 26 28 Temperature Sensor 47 16 18 20 22 24 26 28 30 Temperature Sensor 21 20 25 30 35 0 4000 8000 12000 0 4000 8000 12000 16 18 20 22 24 26 28 16 18 20 22 24 26 28 Epochs Epochs Temperature Sensor 49 Temperature Sensor 49 Trade off between accuracy and network load: Unsupervised Variance retained (%) 75 80 85 90 95 100 Empirical Test CV Temperature ( C) 18 21 24 27 30 33 36 39 Approximations to sensor n 21 Original 1 PC 4 PCs 8 PCs Temperature ( C) 15 17 19 21 23 25 27 29 31 Approximations to sensor n 49 Original 1 PC 4 PCs 8 PCs 1 5 9 13 17 21 25 1st day 2nd day 3rd day 4th day 1st day 2nd day 3rd day 4th day Number of principal components
Principal component aggregation Coordinate feedback The principal coordinates x k [t], 1 k q, can be reinjected in the network. ˆx4[t] = w1,4 ˆx8[t] = w1,8 ˆx12[t] = w1,12 4 8 12 3 7 11 ˆx3[t] = w1,3 ˆx7[t] = w1,7 16 ˆx16[t] = w1,16 15 Example: Feedback of the first coordinate x 1 [t]: Network load incurred is one packet per sensor. Approximation is ˆx i [t] = x 1 [t] w 1,i 2 6 10 14 1 5 9 13 ˆx1[t] = w1,1 ˆx5[t] = w1,5
Principal component aggregation Coordinate feedback The principal coordinates x k [t], 1 k q, can be reinjected in the network. ˆx4[t] = w1,4 ˆx8[t] = w1,8 ˆx12[t] = w1,12 4 8 12 3 7 11 ˆx3[t] = w1,3 ˆx7[t] = w1,7 16 ˆx16[t] = w1,16 15 Example: Feedback of the first coordinate x 1 [t]: Network load incurred is one packet per sensor. Approximation is ˆx i [t] = x 1 [t] w 1,i 2 6 10 14 1 5 9 13 ˆx1[t] = w1,1 ˆx5[t] = w1,5 Sensors can check if ˆx i [t] x i [t] > ɛ, ɛ set by the application (e.g. 1 C), and notify the sink if the approximation error is too large.
Principal component aggregation Experimental results - Feedback Aggregation and feedback of q principal coordinates incurs 2q packet transmissions. An additional U(ɛ) packets are also sent for notifying the sink of measurements x i [t] whose approximation error was higher than ɛ. The network load at the sink is therefore: N(q, ɛ) = 2q + U(ɛ) As ɛ increases, the number q of principal components required to minimizes this quantity decreases. Absolute error sensor n 49 Overall number of updates for a 1 C tolerance Trade off between accuracy and network load Absolute error ( C) 0 5 10 15 0 PC 1 PC 4 PCs 8 PCs Number of updates due to approximation errors 0 10 20 30 40 50 Number of packets sent 0 20 40 60 80 100 Eps=0 C Eps=0.1 C Eps=0.25 C Eps=0.5 C Eps=1 C Eps=3 C Eps=10 C 0 2000 4000 6000 8000 10000 Epochs O PC 1 PC 4 PCs 8 PCs 0 5 10 15 20 Number of principal components
Conclusion Principal component aggregation: Balances the network load among sensors, Extracts information that can be used for compression, event detection, and recognition tasks. Extensions: Principal components can be computed in a distributed fashion, Possibility to deal with non stationary signals, Spatio temporal compression, Other bases: particularly independent components for blind source separation.
Bibliography Y. Le Borgne and G. Bontempi. Unsupervised and Supervised Compression with Principal Component Analysis in Wireless Sensor Networks. In Proceedings of the workshop on Knowledge Discovery from Sensor Data, 13th ICKDD, p35-40, 2007. ULB - MLG Wireless Sensor Networks lab: http://www.ulb.ac.be/di/labo/index.html. I. Jolliffe. Principal Component Analysis. Springer, 2002. S. Madden, M. Franklin, J. Hellerstein, and W. Hong. TinyDB: an acquisitional query processing system for sensor networks. ACM Transactions on Database Systems (TODS), 30(1):122173, 2005. Intel Lab Data webpage: http://db.csail.mit.edu/labdata/labdata.html.
. Thank you for your attention Questions?
Self-organization for data aggregation Synchronization The energy consumption varies depending on the sensor node activity. Activity Energy cost CPU 3mW Radio receive 38mW Radio transmit 35mW Flash read 7mW Flash write 27mW Idle 15µW TMote Sky s energy consumption profile.
Self-organization for data aggregation Synchronization The energy consumption varies depending on the sensor node activity. Activity Energy cost CPU 3mW Radio receive 38mW Radio transmit 35mW Flash read 7mW Flash write 27mW Idle 15µW TMote Sky s energy consumption profile. The transmissions are synchronized for minimizing the energy consumption. The last stage involves all sensors and allows unsynchronized communication (for network retasking e.g.). 4 3 1 2 3, 4 2 1 Sink Depth Start of epoch Time End of epoch Activities carried out by sensors depend on their depth in the routing tree. Sensing and processing, Radio reception radio idle Radio tansmission Radio and CPU idle Radio tansmission, radio reception and processing Synchronization. Adapted from Madden et al., 2005.
Principal component aggregation Illustrative example Three different phenomena, appearing and disappearing. Images are 100*100 pixels. The sensor grid is 10*10 (100 sensors). Thirty cycles of 20 epochs, i.e. 1 t 600.
Principal component aggregation Illustrative example Three different phenomena, appearing and disappearing. Images are 100*100 pixels. The sensor grid is 10*10 (100 sensors). Thirty cycles of 20 epochs, i.e. 1 t 600. PC basis computed with 3 appearing and disappearing cycles. Original dimensionality: 100. 3 PCs are enough for capturing the signal. Dramatic reduction of dimensionality! Memory and computational cost negligible.
Principal component aggregation Illustrative example Three different phenomena, appearing and disappearing. Images are 100*100 pixels. The sensor grid is 10*10 (100 sensors). Thirty cycles of 20 epochs, i.e. 1 t 600. PC basis computed with 3 appearing and disappearing cycles. Original dimensionality: 100. 3 PCs are enough for capturing the signal. Dramatic reduction of dimensionality! Memory and computational cost negligible. Efficiency depends on the degree of correlation between measurements. Usually high in sensor networks.