![]()
|
N-SMARTS: Data Acquisition and Analysis |
|
Home Platform Data Advanced Sensing Participatory Urbanism Publications People Internal Wiki Source Code Links |
![]() One day's worth of CO data from 10 sensor kits in Ghana, visualized with Google Earth.
Data acquisition softwareThe phone based software is written in C++ for the BREW Platform, since we can take advantage of Verizon's AGPS system. The BREW Platform has support for long term timers which will start up a BREW Applet at a scheduled time. By using this mechanism, we can allow the phone to enter its power-saving mode when we are not actively sampling. J2ME has a similar mechanism called the Push Registry.The data acquisition software takes advantage of the asynchronous characteristic of the SMS protocol. The sensor interface process wakes up, and a reading is taken from the sensor and placed in a permanent storage queue. Later, another process wakes up and reads the messages from the queue and sends them via SMS to an email address designated for that phone on server at UC Berkeley. This process then removes data from the queue which have been sent. This mechanism ensure that data is not lost if a message is interrupted by a power failure, network outage, etc. Since SMS messages are transmitted on a signaling channel, this mechanism will work even in the event of an incoming or outgoing phone call. A procmail process receives the data and inserts it into a database. The data can then be visualized or downloaded in a variety of formats, including Google Earth's KML format. InterpolationSince some locations will be heavily sampled, whereas large areas will be left completely un-sampled, and still others will be sparsely sampled, N-SMARTS needs a mechanism for interpolating data at any given location, and which also reflects the uncertainty about the interpolated value. There are several good mechanisms to do this including Support Vector Regression, Finite Element Methods, Gaussian Belief Propagation and Gaussian Process Regression. Our work mostly focuses on Gaussian Process Regression because of its natural support for variance estimation, the ability to take advantage of sparse data sets (like SVR), and easy integration of extra linear parameters, which are useful for automatic calibration of the sensors (see below).
Sensor CharacterizationIn order to validate our assumptions of gaussian measurement noise, and to accurately design algorithms for automatic calibration of the sensors and effective super-sampling for increased accuracy, we must first understand the noise and response characteristics of the sensor. We are currently doing this for the CO sensor platform (see the Platform page) with the help of Ron Cohen's Atmospheric Chemistry Group .To characterize the sensor, we are using two electronically controlled mass flow controllers, one attached to pure air, the other attached to 100ppm CO air. The output of the flow controllers is then pumped into a cylindrical chamber which contains the sensor and electronics. Finally, the gas is injected into the laboratory's exhaust system. The sensors and flow controller are monitored and controlled using a NI USB-6218 data acquisition module from National Instruments attached to a laptop. Using this setup, we have performed a series of experiments. We are still analyzing the data, so check back soon for some graphs. Pre-sensor volume measurementTo measure the volume of the plumbing between the flow controllers and the sensors themselves, we observe the response time of the sensor at different rates of flow. To do this we observe the time required for the sensor to change 10% towards the final final reading. Under the assumption that the sensor itself responds in roughly the same amount of time at different rates of flow (a reasonable assumption for high rates of flow in which the mixing of the gasses has completed before reaching the sensor), the difference in response times should be attributable to the different rates of flow. For known rates of flow, we can then calculate the volume of the plumbing.Step response measurementAt a constant flow of 10L/min, the mixture is immediately changed from 0ppm CO to 100ppm. Subtracting out the response delay attributable to the plumbing (see above), we get the step response of the sensor itself. With a known step response, we can deconvolve a series of readings to obtain faster response.Linearity characterizationThe response of the sensor is measured at 0ppm, 20ppm, 40ppm, 60ppm, 80ppm and 100ppm to verify the linearity of the sensor and circuitry.Precision characterizationIn order to test the precision of the sensor at small ppm values, at a roughly constant 15Lpm rate of flow, the mass flow controller which is attached to 100ppm CO mixture is stepped from 0 to 1L/min in increments of 0.1L/min. These parameters were chosen based on the accuracy of the flow controllers. We will use a flow controller which can regulate much lower flow rates, allowing a much more accurate characterization.In addition, we will measure the response of several (~10) identical sensors to characterize the error distribution for the sensors. This will help with super sampling (see below). Automatic CalibrationDuring its lifetime, the gain and bias of the sensor drifts. Sensors attached to mobile phones, however, will frequently be in close proximity with other mobile phones. In this case, they should give approximately the same reading. With enough penetration of sensor equipped phones, we can take advantage of these events in order to infer the reletive calibration of different phones.Infering the reletive miscalibration of each sensor is relatively easily accomplished using a gaussian process. Please see our tech report for more details. Super-SamplingWhereas the CO sensors we are using have a resolution of around 500ppb, we hope to achieve a precision of around 30ppb. With an accurate characterization of the sensor noise and error distribution, and accurately calibrated sensors, we can take many samples in the same location (using different sensors) in order to improve the precision of the system. Look for details soon.Context InferenceThere are, of course, some difficulties that arise when using phones as pollution sensors. First, the user will tend to place their phone in their pocket, purse or otherwise obstruct the sensor. The easy solution to this problem is to only sample when the phone is being used to make a call, without a headset. This, of course, will dramatically limit the amount of data that can be gathered. In some cases, such as when the phone is in a user's pocket, the obstruction can be factored in to the reading, if the impulse response of the sensor, and the fact that the phone is in the users pocket is known.Whether the phone is in a user's pocket and other relevant information can be inferred using the microphone and possibly the speaker of the phone. In some cases, the state of the phone (e.g. in the users pocket) can be inferred from ambient noise. In other cases, a tone emitted from the speaker can assist in the inference process. A similar technique can be used to determine whether the user is indoors, outdoors, in a car, etc. With a cheap three-axis accelerometer, other information such as whether the user is walking, sitting, driving, etc. can also be inferred. We are currently exploring these techniques. Look for details soon! Information about the state of the user and the phone can be used to either clean up or reject data that is sampled when the sensor is obstructed or otherwise biased. As it happens, the information about the state of the user (for example, are they driving, walking, riding a bike, indoors, outdoors, etc) is also valuable to social scientist and policy makers who are interested in understanding the impact of pollution on subsets of the population. Not only will understanding the state of the user and the phone help us to make accurate readings, it will also increase the value of the data set as a whole. |