Distributed Sampling, Filtering And Synchronization In Wireless Sensor Networks